From 45e882197b3c2ab97d671bad87c995dff0380661 Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 28 Nov 2021 15:55:59 -0600 Subject: arch: i386: add support for tab characters Add support for the tab character in the virtual terminal. Signed-off-by: Danny Holman --- arch/i386/boot/tty.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/i386/boot/tty.c b/arch/i386/boot/tty.c index 2c75760..aa77736 100644 --- a/arch/i386/boot/tty.c +++ b/arch/i386/boot/tty.c @@ -54,6 +54,16 @@ void tty_putchar(char c) { terminal_scroll(); } break; + case '\t': + terminal_column += 4; + if (++terminal_column == VGA_WIDTH) { + terminal_column = 4; + if (++terminal_row == VGA_HEIGHT) { + terminal_row--; + terminal_scroll(); + } + } + break; default: tty_putentryat(uc, terminal_color, terminal_column, terminal_row); if (++terminal_column == VGA_WIDTH) { -- cgit v1.2.3