Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 21 - dos 2+ internal - translate bios parameter block http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 21 - DOS 2+ internal - TRANSLATE BIOS PARAMETER BLOCK
        AH = 53h
        DS:SI -> BPB (BIOS Parameter Block)
        ES:BP -> buffer for DOS Drive Parameter Block (see below)
Note:   translates BPB into a DOS Drive Parameter Block (see AH=32h)

Format of BIOS Parameter Block:
Offset  Size    Description
 00h    WORD    bytes/sector
 02h    BYTE    sectors/cluster. Get from (DPB byte 4) + 1
 03h    WORD    number of reserved sectors
 05h    BYTE    number of FATs
 06h    WORD    number of root directory entries
 08h    WORD    total number of sectors. Get from:
                  ((DPB bytes 0Dh-0Eh) - 1) * (sectors/cluster (BPB byte 2))
                    + (DPB Bytes 0Bh-0Ch)
                for DOS 4.0, set to zero if partition >32M, then set DWORD at
                  15h to actual number of sectors
 0Ah    BYTE    media descriptor byte
 0Bh    WORD    number of sectors per FAT
---DOS 3+---
 0Dh    WORD    number of sectors per track
 0Fh    WORD    number of heads
 11h    DWORD   number of hidden sectors
 15h 11 BYTEs   reserved
---DOS 4.0---
 15h    DWORD   total number of sectors if word at 08h contains zero
 19h  6 BYTEs   ???
 1Fh    WORD    number of cylinders
 21h    BYTE    device type
 22h    WORD    device attributes (removable or not, etc)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson