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:
@@ -0,0 +1,5 @@
|
||||
|
||||
void kmain()
|
||||
{
|
||||
asm("hlt");
|
||||
}
|
||||
@@ -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:
|
||||
Reference in New Issue
Block a user