/* Segment constants */ #define BOOT_SEG 0x7C0 /* Segment we reside on startup */ .code16 _start: /* Normalize CS + other selectors */ ljmp $BOOT_SEG,$1f 1: xor %ax, %ax mov %ax, %ds mov %ax, %ss mov %ax, %es mov %ax, %gs mov %ax, %fs 2: cli hlt jmp 2b .org 510 .byte 0x55 .byte 0xAA