holy crap im an idiot, i was getting constatnt gpf because i forgot to pop the stack

This commit is contained in:
2025-06-01 20:57:12 -04:00
parent ecc91fdc7d
commit 4c938a0855
7 changed files with 19 additions and 14 deletions

View File

@ -4,6 +4,7 @@
global loader ; entry symbol for ELF
extern kmain
extern gdt_init
MAGIC_NUMBER equ 0x1BADB002 ; magic number constant
FLAGS equ 0x3
@ -30,6 +31,8 @@ section .text
loader:
mov esp, kernel_stack + KERNEL_STACK_SIZE ; move the top of the stack into esp
call gdt_init
call kmain ; pass execution over to our kmain function, where all of the real stuff is done
; Should the system exit, we clear the interrupt flag