First commit: add folder structure, make process, kernel main function, base for framebuffer driver

This commit is contained in:
xamidev
2024-05-18 22:06:31 +02:00
commit 25405a7c11
21 changed files with 444 additions and 0 deletions

28
loader.s Normal file
View File

@@ -0,0 +1,28 @@
global loader
MAGIC_NUMBER equ 0x1BADB002 ; multiboot magic
FLAGS equ 0x0
CHECKSUM equ -MAGIC_NUMBER
KERNEL_STACK_SIZE equ 4096
section .text:
align 4
dd MAGIC_NUMBER
dd FLAGS
dd CHECKSUM
extern kmain
loader:
; mov eax, 0xCAFEBABE
push dword 42
call kmain
.loop:
jmp .loop
section .bss
align 4
kernel_stack:
resb KERNEL_STACK_SIZE
mov esp, kernel_stack + KERNEL_STACK_SIZE