فهرست منبع

Remove keyboard debug code

Johannes Zellner 8 ماه پیش
والد
کامیت
e9575144c1
1فایلهای تغییر یافته به همراه0 افزوده شده و 31 حذف شده
  1. 0 31
      terminal.c

+ 0 - 31
terminal.c

@@ -11,36 +11,6 @@ static const unsigned char busy_chars[4] = { 0x2D, 0x5C, 0x7C, 0x2F };
 static int cursor_visible;
 static unsigned int last_cursor_tick;
 
-static unsigned int puthex(unsigned int pos, unsigned char byte)
-{
-	static const char hex[] = "0123456789ABCDEF";
-	unsigned short cell = (unsigned short)(0x0A << 8);
-	io_vga_write(pos++, (unsigned short)(cell | hex[byte >> 4]));
-	io_vga_write(pos++, (unsigned short)(cell | hex[byte & 0x0F]));
-	return pos;
-}
-
-static void debug_line(unsigned char sc, char c)
-{
-	unsigned int i, pos = IO_DEBUG_ROW * IO_VGA_COLS;
-	for (i = 0; i < 79; i++)
-		io_vga_write(pos + i, (unsigned short)(0x0A << 8));
-	pos = IO_DEBUG_ROW * IO_VGA_COLS;
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | 'S'));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | 'C'));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | ':'));
-	pos = puthex(pos, sc);
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | ' '));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | 'C'));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | 'H'));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | ':'));
-	pos = puthex(pos, (unsigned char)c);
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | ' '));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | '\''));
-	io_vga_write(pos++, (unsigned short)((0x0A << 8) | (c >= 0x20 && c < 0x7F ? (unsigned char)c : '.')));
-	io_vga_write(pos,   (unsigned short)((0x0A << 8) | '\''));
-}
-
 static void update_busy(void)
 {
 	unsigned int t = get_ticks_ms();
@@ -83,7 +53,6 @@ void terminal_run(void)
 		{
 			char c = io_poll_key();
 			if (c) {
-				debug_line(io_last_scancode(), c);
 				io_putchar(c);
 				if (c == '\n')
 					io_putstr(prompt);