rdos/boot/vbr.asm

50 lines
864 B
NASM
Raw Normal View History

2019-03-25 09:51:37 +01:00
org 0x7C00
bpb:
jmp _startup ; 2 bytes
nop ; 1 byte
.oem:
db "2A " ; OEM
.bps:
dw 0x200 ; bytes per sector
.spc:
db 1 ; sectors per cluster
.rsectors:
dw 2 ; number of reserved sectors
.fatcnt:
db 2 ; number of file allocation tables
.dirents:
dw 2 ; Number of directory entries
.seccnt:
dw 720 ; total number of sectors
.mtd: ; media descriptor type
db 0xFD ; 5.25-inch Double sided, 40 tracks per side, 9 sectors per track (360 KB)
.spfat: ; sectors per fat
dw 0
.spt:
dw 9 ; sectors per track
.headcnt:
dw 2 ; number of heads
.hidseccnt:
dd 0 ; number of hidden sectors
.lrgseccnt:
dd 0 ; large sector count
times (0x3E - ($-$$)) nop
_startup:
mov ah, 0x08
mov dl, 0x00
int 0x13
mov ax, cx
and ax, 0x003F
call print16
.end:
hlt
jmp .end
%include "print.asm"
times (0x1FE - ($-$$)) nop
dw 0xAA55