bits 16
org 7c00h

cli
xor ax,ax
mov ds,ax
mov es,ax
lgdt [gdt_desc]
mov si,7e00h ; if your kernel has been placed at offset 200h, like you did
mov di,1000h ; the address where the kernel should be
mov cx,512 ; whatever the size of the kernel is
rep movsb
mov eax,cr0
or al,1
mov cr0,eax
jmp 08h:clear_pipe
bits 32
clear_pipe:
mov ax,10h
mov ds,eax
mov es,eax
mov ss,eax
mov esp,90000h
jmp 08h:00001000h
;mov byte [ds:0B8000h], 'P'      ; Move the ASCII-code of 'P' into first video memory
;mov byte [ds:0B8001h], 1Bh      ; Assign a color code

jmp $
gdt dd 0ffffh,0cf9a00h,0ffffh,0cf9200h
gdt_desc dw 23
dd gdt-8
times 510-($-$$) db 0           ; Fill up the file with zeros

        dw 0AA55h                ; Boot sector identifyer
