diff --git a/bootloader/main.asm b/bootloader/main.asm index c369f98..67da8d8 100644 --- a/bootloader/main.asm +++ b/bootloader/main.asm @@ -142,6 +142,13 @@ ret .start: +; disable vga cursor +mov ah, 0x01 +mov ch, 0b00100000 +mov cl, 0b00000000 +int 0x10 + + ; reset disk system mov ah, 0x00 mov dl, DISK_ID diff --git a/bootloader/test_kernel.asm b/bootloader/test_kernel.asm deleted file mode 100644 index 2abfd80..0000000 --- a/bootloader/test_kernel.asm +++ /dev/null @@ -1,9 +0,0 @@ -[bits 32] - -mov byte [ds:0B8000h], 0h ; Move the ASCII-code of 'P' into first video memory -mov byte [ds:0B8001h], 0h ; Assign a color code - -.loop: -inc byte [ds:0B8000h] -inc byte [ds:0B8001h] -jmp .loop \ No newline at end of file diff --git a/kernel/kernel.c b/kernel/kernel.c index 86f55e7..3bed179 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -85,6 +85,12 @@ void terminal_putentryat(char c, uint8_t color, size_t x, size_t y) void terminal_putchar(char c) { + if (c == '\n') { + terminal_column = 0; + terminal_row++; + return; + } + terminal_putentryat(c, terminal_color, terminal_column, terminal_row); if (++terminal_column == VGA_WIDTH) { terminal_column = 0; @@ -115,4 +121,5 @@ void kernel_main(void) terminal_writestring("kernel"); terminal_setcolor(vga_entry_color(VGA_COLOR_LIGHT_GREY, VGA_COLOR_BLACK)); terminal_writestring(" World!\n"); + terminal_writestring("Newlines!"); } \ No newline at end of file