summaryrefslogtreecommitdiff
path: root/arch/i386/boot
diff options
context:
space:
mode:
authorDanny Holman <dholman@gymli.org>2021-11-28 15:55:59 -0600
committerDanny Holman <dholman@gymli.org>2021-11-29 09:53:14 -0600
commit45e882197b3c2ab97d671bad87c995dff0380661 (patch)
treeeb559d0d3dd97d153e415152ebf7c708655e4f7c /arch/i386/boot
parentedaf05c85ddfc91904643b603bb5dd074b7d3e8f (diff)
arch: i386: add support for tab characters
Add support for the tab character in the virtual terminal. Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'arch/i386/boot')
-rw-r--r--arch/i386/boot/tty.c10
1 files changed, 10 insertions, 0 deletions
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) {