Changed to using Boch to better handle debugging the kernel. Updated build system with a new script to handle working with the build_numbers.c file.

This commit is contained in:
2020-05-07 19:24:42 -05:00
parent 4616ce63b3
commit e1a1169240
11 changed files with 80 additions and 63 deletions
+5
View File
@@ -0,0 +1,5 @@
void kmain()
{
asm("hlt");
}
+25
View File
@@ -0,0 +1,25 @@
global loader
MAGIC_NUMBER equ 0x1BADB002
FLAGS equ 0x0
CHECKSUM equ -MAGIC_NUMBER
KERNEL_STACK_SIZE equ 4096 ; size of stack in bytes
section .text:
align 4
dd MAGIC_NUMBER
dd FLAGS
dd CHECKSUM
loader:
extern kmain
call kmain
;mov eax, 0xCAFEBABE
;mov esp, kernel_stack + KERNEL_STACK_SIZE ; piont ESP to the start of the stack (end of memory area)
.loop:
jmp .loop
section .bss
alignb 4
resb KERNEL_STACK_SIZE ; reserve stack for kernel
kernel_stack: