This commit is contained in:
nub31
2025-09-03 15:22:35 +02:00
parent 022dde6c7c
commit 020e09c4e1
3 changed files with 25 additions and 14 deletions

View File

@@ -39,20 +39,17 @@ section .data
section .data
align 8
multiboot_info:
dq 0
dd 0
multiboot_magic:
dd 0
section .text
bits 32
_start:
mov esp, stack_top
; Multiboot will place a magic value in eax
; If this magic value is not present, then we might not have multiboot info in ebx,
; therefore we throw an error
cmp eax, 0x2BADB002
jne error
; Save multiboot info pointer for later
mov [multiboot_magic], eax
mov [multiboot_info], ebx
; Check if cpuid is available by flipping bit 21
@@ -150,7 +147,8 @@ section .text
mov ss, ax
; Finally, we call in to c
mov rdi, [multiboot_info]
mov edi, [multiboot_magic]
mov esi, [multiboot_info]
call entry
.hang:
hlt