boot.asm (370B)
1 section .multiboot 2 align 4 3 dd 1BADB002h 4 dd 0003h ; set align boot modules to page boundaries, supply memory map 5 dd -(1BADB002h + 0003h) 6 7 section .bootstrap_stack nobits 8 stack_bottom: 9 resb 16384 ; 16 KiB 10 stack_top: 11 12 section .text 13 extern kernel_main 14 global _start 15 _start: 16 mov esp, stack_top 17 call kernel_main 18 19 cli 20 hlt 21 .lhang: 22 jmp .lhang