A small x86-64 kernel. Stage 0 goes from real mode to long mode inside the boot sector.
1; boot.asm — Kestrel stage 0.
2;
3; The BIOS loads this sector at 0x7C00 and jumps to it in 16-bit real mode.
4; For now it only proves that the sector boots: it halts, forever.
5;
6; nasm -f bin boot.asm -o boot.bin
7; qemu-system-x86_64 -drive format=raw,file=boot.bin
9 bits 16
10 org 0x7C00
12start:
13 cli
14.halt: hlt
17 times 510 - ($ - $$) db 0
18 dw 0xAA55 ; boot signature