the bootloader loads this block of code to 0x10000.... here is the bootloader
org 0x7c00
start:
reset: ;reset drive
xor ax,ax
mov bx,ax
int 0x13
jc reset
read: ;load sectors off drive
xor ax,ax
mov bx,ax
mov dx,ax
mov ax,0x1000
mov es,ax
mov ax,0x210
mov cx,0x2
int 0x13
jc read
off: ;turn off floppy motor
mov dx,0x3F2
mov al,0xc0
out dx,al
pmode:
jmp 0x1000:0
cli ;disable interrupts and clear direction flag
cld
in al,0x92 ;enable a20
or al,2
out 0x80,al
out 0x92,al
xor ax, ax ;move ds 0
mov ds, ax
lgdt [gdt_desc] ;load gdt
mov eax,cr0 ;set cr0 0 bit
or eax,1
mov cr0,eax
jmp dword 0x8:0x10000 ;jmp to loaded code
gdt:
dd 0x0 ;gdt null 0x0
dd 0x0
dw 0xffff ;gdt data 0x8
dw 0x0
db 0x0
db 0x9a
db 0xcf
db 0x0
dw 0xffff ;gdt code 0x010
dw 0x0
db 0x0
db 0x92
db 0xcf
db 0x0
gdt_end:
gdt_desc:
dw gdt_end - gdt - 1
dd gdt
times 510-($-$$) db 0
dw 0x0aa55