Newlines and no cursor
This commit is contained in:
parent
bc3165eeb8
commit
af4b198341
3 changed files with 14 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
|
@ -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!");
|
||||
}
|
Loading…
Reference in a new issue