diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/kernel/commands/command.c | 2 | ||||
-rw-r--r-- | src/kernel/graphics/vga.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/commands/command.c b/src/kernel/commands/command.c index c673b44..df33a24 100644 --- a/src/kernel/commands/command.c +++ b/src/kernel/commands/command.c @@ -16,6 +16,8 @@ void exec_command(char *command) { terminal_write_line("I can't help you write now"); else if (starts_with(command, "ping")) terminal_write_line("pong!"); + else if (starts_with(command, "clear")) + terminal_clear(); else if (starts_with(command, "shutdown")) acpi_poweroff(); else if (starts_with(command, "zzz")) diff --git a/src/kernel/graphics/vga.c b/src/kernel/graphics/vga.c index a72ea91..3e910f1 100644 --- a/src/kernel/graphics/vga.c +++ b/src/kernel/graphics/vga.c @@ -44,6 +44,8 @@ uint16_t *terminal_buffer; char text[1024] = {0}; void terminal_clear() { + terminal_row = 0; + terminal_column = 0; for (size_t y = 0; y < VGA_HEIGHT; y++) { for (size_t x = 0; x < VGA_WIDTH; x++) { const size_t index = y * VGA_WIDTH + x; |