Johannes Zellner 8 месяцев назад
Родитель
Сommit
4789aaffc6
3 измененных файлов с 2 добавлено и 21 удалено
  1. 1 2
      io.h
  2. 1 18
      terminal.c
  3. 0 1
      terminal.h

+ 1 - 2
io.h

@@ -2,13 +2,12 @@
 #ifndef IO_H
 #define IO_H
 
-/* Content area: rows 0..(IO_DEBUG_ROW-1). Debug row and busy position. */
+/* Content area: rows 0..(IO_DEBUG_ROW-1). Row IO_DEBUG_ROW is below content. */
 #define IO_VGA_COLS      80
 #define IO_VGA_ROWS      25
 #define IO_DEBUG_ROW     24
 #define IO_CONTENT_ROWS  IO_DEBUG_ROW
 #define IO_CONTENT_SIZE  (IO_CONTENT_ROWS * IO_VGA_COLS)
-#define IO_BUSY_POS      (IO_DEBUG_ROW * IO_VGA_COLS + 79)
 
 void io_init(void);
 void io_clear_screen(void);

+ 1 - 18
terminal.c

@@ -1,26 +1,12 @@
-/* Terminal: prompt, busy indicator, blinking cursor, echo loop. */
+/* Terminal: prompt, blinking cursor, echo loop. */
 
 #include "io.h"
 #include "terminal.h"
 #include "timer.h"
 
-static unsigned int busy_idx;
-static unsigned int last_busy_tick;
-static const unsigned char busy_chars[4] = { 0x2D, 0x5C, 0x7C, 0x2F };
-
 static int cursor_visible;
 static unsigned int last_cursor_tick;
 
-static void update_busy(void)
-{
-	unsigned int t = get_ticks_ms();
-	if (t - last_busy_tick >= BUSY_MS) {
-		last_busy_tick = t;
-		busy_idx = (busy_idx + 1) % 4;
-	}
-	io_vga_write(IO_BUSY_POS, (unsigned short)((0x0A << 8) | busy_chars[busy_idx]));
-}
-
 static void update_cursor_blink(void)
 {
 	unsigned int t = get_ticks_ms();
@@ -40,15 +26,12 @@ static const char prompt[] __attribute__((section(".text"))) = "\n> ";
 void terminal_run(void)
 {
 	last_cursor_tick = get_ticks_ms();
-	last_busy_tick   = get_ticks_ms();
 	cursor_visible   = 1;
-	busy_idx         = 0;
 
 	io_putstr(msg);
 	io_putstr(prompt);
 
 	for (;;) {
-		update_busy();
 		update_cursor_blink();
 		{
 			char c = io_poll_key();

+ 0 - 1
terminal.h

@@ -3,7 +3,6 @@
 #define TERMINAL_H
 
 #define CURSOR_MS  500
-#define BUSY_MS    33
 
 void terminal_run(void);