refactor a ton of code to be multiboot compatible

This commit is contained in:
fekhesk 2022-10-26 00:05:53 -07:00
parent f2ff9da1fb
commit 3222bcbfe2
No known key found for this signature in database
GPG key ID: 6B3D8CB511646891
20 changed files with 382 additions and 197 deletions

View file

@ -1,31 +0,0 @@
;; bootstrap code from osdev.org
MBALIGN equ 1 << 0
MEMINFO equ 1 << 1
FLAGS equ MBALIGN | MEMINFO
MAGIC equ 0x1BADB002
CHECKSUM equ -(MAGIC + FLAGS)
section .multiboot
align 4
dd MAGIC
dd FLAGS
dd CHECKSUM
section .bss
align 16
stack_bottom:
resb 16384 ; 16 KiB stack
stack_top:
section .text
global _start:function (_start.end - _start)
_start:
mov esp, stack_top
extern kernel_main
call kernel_main
cli
.hang: hlt
jmp .hang
.end: