inital commit

This commit is contained in:
plane000
2018-10-07 15:16:25 +01:00
parent 9d99a5ff25
commit ae052c66f1
7 changed files with 178 additions and 0 deletions

21
kernel.asm Normal file
View File

@@ -0,0 +1,21 @@
;;kernel.asm
bits 32 ; tells nasm to use 32 bit
section .text
;multiboot spec
align 4
dd 0x1BADB002 ;magic
dd 0x00 ;flags
dd - (0x1BADB002 + 0x00) ;checksum. m+f+c should be zero
global start
extern kmain
start:
cli ; blocks interupts i think
mov ESP, stack_space ; sets stack pointer
call kmain ; calls kmain c++ function
hlt ; halts CPU
section .bss
resb 8192 ; 8 kb stack
stack_space: