- boot.asm
[code:1]
[org 0]
jmp start
start:
mov ax, 7C0h
mov ds, ax
mov ax, 08000h
mov es, ax
xor dh, dh
xor ch, ch
mov cl, 2
mov al, 1
xor bx, bx
mov dl, 0
mov ah, 2
int 13h
mov ax, 0B800h
mov es, ax
xor di, di
mov al, 'M'
stosb
mov ax, 9000h
mov es, ax
xor di, di
xor si, si
mov cl, 32
rep movsb
cli
lidt [ds:idt_48]
lgdt [ds:gdt_48]
mov ecx, CR0
inc cx
mov CR0, ecx
db 66h, 0EAh
dw 0
dw 8
dw 10h
gdt:
dw 0, 0, 0, 0
dw 0, 0, 0, 0
dw 0FFFFh