now it should boot on an IBM PC correctly (tested on pcem)
[eightysix] / boot / boot.asm
index 2b74db8..96506de 100644 (file)
@@ -27,21 +27,29 @@ cur_cyl             equ 7b14h       ; 2 bytes - current cylinder
 %%end: popf
 %endmacro
 
+; 5.25" 360K floppy
+BPB_DISK_SECTORS       equ 720
+BPB_TRACK_SECTORS      equ 9
+BPB_MEDIA_TYPE         equ 0fdh
+; 3.5" 1.44M floppy
+;BPB_DISK_SECTORS      equ 2880
+;BPB_TRACK_SECTORS     equ 18
+;BPB_MEDIA_TYPE                equ 0f0h
 
 bios_param_block:
        jmp start       ; 2 bytes
        nop             ; 1 byte
        ; start of BPB at offset 3
-       db "BSPL 0.1"   ; 03h: OEM ident, 8 bytes
+       db "86BOOT00"   ; 03h: OEM ident, 8 bytes
        dw 512          ; 0bh: bytes per sector
        db 1            ; 0dh: sectors per cluster
        dw 1            ; 0eh: reserved sectors (including boot record)
        db 2            ; 10h: number of FATs
        dw 224          ; 11h: number of dir entries
-       dw 2880         ; 13h: number of sectors in volume
-       db 0fh          ; 15h: media descriptor type (f = 3.5" HD floppy)
+       dw BPB_DISK_SECTORS     ; 13h: number of sectors in volume
+       db BPB_MEDIA_TYPE       ; 15h: media descriptor type (f0 = 3.5" HD floppy)
        dw 9            ; 16h: number of sectors per FAT
-       dw 18           ; 18h: number of sectors per track
+       dw BPB_TRACK_SECTORS    ; 18h: number of sectors per track
        dw 2            ; 1ah: number of heads
        dd 0            ; 1ch: number of hidden sectors
        dd 0            ; 20h: high bits of sector count