diff --git a/Makefile b/Makefile index 2600c58..9f66305 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ QEMU = qemu-system-$(QEMU_ARCH) QEMU_ARGS = $(addprefix --option-rom ,$(ROMS)) NASM = nasm -NASM_ARGS = -s -I. -Ilib -w-macro-params -DFLOPPY=$(FLOPPY) +NASM_ARGS = -s -I. -Iinc -w-macro-params -DFLOPPY=$(FLOPPY) EMUL = utils/emul diff --git a/inc/bpb.inc b/inc/bpb.inc new file mode 100644 index 0000000..01f2f51 --- /dev/null +++ b/inc/bpb.inc @@ -0,0 +1,29 @@ +; DOS 3.31 Bios Parameter Block +bpb_ss: equ 0x00 ; WORD sector size +bpb_sc: equ 0x02 ; BYTE sector / cluster +bpb_rsc: equ 0x03 ; WORD reserved sector count +bpb_fn: equ 0x05 ; BYTE fat number +bpb_rde: equ 0x06 ; WORD root dir entries +bpb_ts: equ 0x08 ; WORD total sectors +bpb_md: equ 0x0A ; BYTE media descriptor +bpb_sf: equ 0x0B ; WORD sectors / fat +bpb_spt: equ 0x0D ; WORD sectors per track +bpb_nos: equ 0x0F ; WORD number of sides +bpb_po: equ 0x11 ; DWORD partition offset +bpb_lts: equ 0x15 ; DWORD large total sectors + +; DOS 4.0 Extended Bios Parameter Block +bpb4_dn: equ 0x19 ; BYTE drive number +bpb4_sig: equ 0x1B ; BYTE 29h +bpb4_ser: equ 0x1C ; DWORD serial + +; DOS 7.1 Extended Bios Parameter Block +bpb7_lsf: equ 0x19 ; DWORD large sectors / fat +bpb7_rdc: equ 0x21 ; DWORD root directory cluster +bpb7_fsc: equ 0x25 ; WORD fsinfo sector +bpb7_bsc: equ 0x27 ; WORD backup boot sector +bpb7_dn: equ 0x35 ; BYTE drive number +bpb7_sig: equ 0x37 ; BYTE 28h or 29h +bpb7_ser: equ 0x38 ; DWORD serial + +bpb_len: equ 0x4F