[BITS 32] global _start CODE_SEG equ 0x08 DATA_SEG equ 0x10 ; No access to BIOS from now on.... _start: ; Set all segments to the same as the DATA_SEG mov ax, DATA_SEG mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax ; Set the stack pointer and base pointer further in mem mov ebp, 0x00200000 mov esp, ebp ; Enable A20 line in al, 0x92 or al, 2 out 0x92, al jmp $ ; Hack to align the source code at 16bytes (because 512 is a multiple of 16) times 512 - ($ - $$) db 0