From f45698bb00e819be76dbe9f2d5fecc4d27e7c4d4 Mon Sep 17 00:00:00 2001 From: Jarkko Toivanen Date: Wed, 14 Jun 2023 20:49:47 +0300 Subject: [PATCH] Cursor disabling moced from assembly to C --- kernel.c | 5 ++--- start32.asm | 20 -------------------- 2 files changed, 2 insertions(+), 23 deletions(-) diff --git a/kernel.c b/kernel.c index 6fc31c9..e03eb37 100644 --- a/kernel.c +++ b/kernel.c @@ -34,9 +34,8 @@ char* itoa(int value, int base) { void kmain (unsigned int mbootmagick, multiboot_info_t* mbootinfo) { // Cursor disabling - // TODO: outb function - //outb(0x3D4, 0x0A); - //outb(0x3D5, 0x20); + outb(0x3D4, 0x0A); + outb(0x3D5, 0x20); //cls(); vga_init(VGA_COLOR_BLACK, VGA_COLOR_GRAY); diff --git a/start32.asm b/start32.asm index 4d80e11..29fb6c4 100644 --- a/start32.asm +++ b/start32.asm @@ -32,30 +32,10 @@ section '.text' executable public _start extrn kmain -disable_cursor: - pushf - push eax - push edx - - mov dx, 0x3D4 - mov al, 0xA ; low cursor shape register - out dx, al - - inc dx - mov al, 0x20 ; bits 6-7 unused, bit 5 disables the cursor, bits 0-4 control the cursor shape - out dx, al - - pop edx - pop eax - popf - ret - _start: ; Setup stack mov esp, stack_top - call disable_cursor - ; Call the main kernel function. push ebx push eax