32 lines
317 B
NASM
32 lines
317 B
NASM
[ORG 0x7c00]
|
|
jmp 0:start
|
|
|
|
start:
|
|
|
|
;Initialise ds
|
|
mov ax, 0x0
|
|
mov ds, ax
|
|
|
|
;Set the source
|
|
mov dh, 0x0
|
|
mov ch, 0x0
|
|
mov cl, 0x2
|
|
;Set the destination
|
|
mov ax, 0x1000
|
|
mov es, ax
|
|
mov bx, 0
|
|
;Set the size
|
|
mov al, 0x20
|
|
;Load
|
|
mov ah, 0x2
|
|
int 0x13
|
|
|
|
;Boot
|
|
jmp 0x1000:0
|
|
|
|
;Padding
|
|
times 0x1fe-($-$$) db 0
|
|
|
|
;Boot signature
|
|
dw 0xaa55
|