eb9b704933e07001689231f2221262f1a46cef30
[bootcard] / bootcard.asm
1 ; ---- boot me! ----
2 ; nasm -f bin -o bootcard.img bootcard.asm
3 ; cat bootcard.img >/dev/<usbstickdevice>
4 ; reboot
5
6         org 7c00h
7         bits 16
8
9         xor ax, ax
10         mov ds, ax
11         mov ss, ax
12
13         mov ax, 13h
14         int 10h
15
16         mov ax, 0a000h
17         mov es, ax
18         mov ax, 0303h
19         mov cx, 32000
20         rep stosw
21
22 infloop:
23         hlt
24         jmp infloop
25
26         times 446-($-$$) db 0
27         db 80h          ; active partition
28         db 20h          ; start head
29         db 21h          ; start cylinder
30         db 0            ; start sector
31         db 0ch          ; type
32         db 28h          ; last head
33         db 20h          ; last cylinder
34         db 08h          ; last sector
35         dd 00000800h    ; first lba
36         dd 0001f800h    ; number of sectors (lba)
37
38
39         times 510-($-$$) db 0
40         dw 0aa55h
41
42 ; vi:ft=nasm ts=8 sts=8 sw=8: