git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: separate syscall interfaces from kernel space, into posix compliant structure.
[lunaix-os.git]
/
lunaix-os
/
kernel
/
tty
/
tty.c
diff --git
a/lunaix-os/kernel/tty/tty.c
b/lunaix-os/kernel/tty/tty.c
index 6db2417a7d81c5524e2c66f0c3460c3aeed4ab11..399b28df6f3f23d474337709aa8ba0966ad31ac4 100644
(file)
--- a/
lunaix-os/kernel/tty/tty.c
+++ b/
lunaix-os/kernel/tty/tty.c
@@
-6,7
+6,7
@@
#include <lunaix/tty/tty.h>
#include <stdint.h>
#include <lunaix/tty/tty.h>
#include <stdint.h>
-vga_attribute* tty_vga_buffer
= (vga_attribute*)VGA_BUFFER_PADDR
;
+vga_attribute* tty_vga_buffer;
vga_attribute tty_theme_color = VGA_COLOR_BLACK;
vga_attribute tty_theme_color = VGA_COLOR_BLACK;
@@
-83,11
+83,10
@@
tty_flush_buffer(struct fifo_buf* buf)
case '\r':
x = 0;
break;
case '\r':
x = 0;
break;
- case '\x08':
- x = x ? x - 1 : 0;
- *(tty_vga_buffer + x + y * TTY_WIDTH) =
- (current_theme | 0x20);
- break;
+ // case '\x08':
+ // *(tty_vga_buffer + x + y * TTY_WIDTH) =
+ // (current_theme | 0x20);
+ // break;
default:
*(tty_vga_buffer + x + y * TTY_WIDTH) =
(current_theme | chr);
default:
*(tty_vga_buffer + x + y * TTY_WIDTH) =
(current_theme | chr);
@@
-114,7
+113,7
@@
tty_set_cursor(uint8_t x, uint8_t y)
if (x >= TTY_WIDTH || y >= TTY_HEIGHT) {
x = y = 0;
}
if (x >= TTY_WIDTH || y >= TTY_HEIGHT) {
x = y = 0;
}
- u
int
32_t pos = y * TTY_WIDTH + x;
+ u32_t pos = y * TTY_WIDTH + x;
io_outb(0x3D4, 14);
io_outb(0x3D5, pos / 256);
io_outb(0x3D4, 15);
io_outb(0x3D4, 14);
io_outb(0x3D5, pos / 256);
io_outb(0x3D4, 15);