; start.asm

global KernelEntry
extern KernelMain
global page_dir_addr

bits 32
segment .text

F_PAGE_ALIGN equ 1<<0
F_MEM_FIELDS equ 1<<1

MAGIC        equ 0x1BADB002
FLAGS        equ F_PAGE_ALIGN | F_MEM_FIELDS
CHECKSUM     equ -(MAGIC + FLAGS)

KernelEntry:
mov esp, 0x00101000
push ebx
call KernelMain

; The Multiboot header

align 4
dd MAGIC
dd FLAGS
dd CHECKSUM

align 4096
segment .bss
page_dir_addr: times 1024 resd 1				;page directory

