; bootloader - setup system and get to the kernel. assemble with nasm BITS 16 org 0x7c00 jmp start times 0x3e -( $ - $$ ) db 0 ; FAT headers stops at 3e start: mov ax, 0 mov ds, ax mov es, ax mov ss, ax mov sp, 0 ; setup hardware stack mov ah, 0x02 ; fn: Read Sectors From Drive mov al, 2 ; sector count mov ch, 0 ; cylinder mov cl, 2 ; sector mov dh, 0 ; head mov bx, 0x500 ; destination addess int 0x13 mov ax, 0x0003 ; video mode 80x25 int 0x10 jmp 0:0x500 times 510 -( $ - $$ ) db 0 db 0x55, 0xaa