INT 21 - DOS 3.2+ - IOCTL - GENERIC BLOCK DEVICE REQUEST AX = 440Dh BL = drive number (00h=default,01h=A:,etc) CH = category code 08h disk drive 00h-7Fh reserved for Microsoft 80h-FFh reserved for OEM/user-defined CL = minor code (function) (see below) DS:DX -> (DOS) parameter block (see below) SI:DI -> (OS/2 comp box) parameter block (see below) Return: CF set on error AX = error code (01h,02h) (see AH=59h) CF clear if successful DS:DX -> data block if CL=60h or CL=61h Notes: DOS 4.01 seems to ignore the high byte of the number of directory entries in the BPB for diskettes. functions 46h and 66h undocumented in DOS 4.x, documented for DOS 5+ the DUBLDISK.SYS v2.6 driver only supports minor codes 60h and 67h DR-DOS 3.41-6.0 only support minor codes 40h-42h and 60h-62h; all other minor codes return error code 16h SeeAlso: AX=440Ch,AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh Values for minor code: 00h (OS/2) \ used to lock/unlock a drive 01h (OS/2) / 40h set device parameters 41h write logical device track 42h format and verify logical device track 46h (DOS 4+) set volume serial number (see also AH=69h) 47h (DOS 4+) set access flag 50h (PCMCIA) attribute memory write 51h (PCMCIA) common memory write 52h (PCMCIA) force media change 53h (PCMCIA) erase drive 54h (PCMCIA) erase media 56h (PCMCIA) set erase status callback 57h (PCMCIA) append Card Information Structure (CIS) tuple 58h (PCMCIA) erase CIS tuples 60h get device parameters 61h read logical device track 62h verify logical device track 66h (DOS 4+) get volume serial number (see also AH=69h) 67h (DOS 4+) get access flag 68h (DOS 5+) sense media type 70h (PCMCIA) attribute memory read 73h (PCMCIA) get memory media information 76h (PCMCIA) get erase status callback 77h (PCMCIA) get first Card Information Structure (CIS) tuple 78h (PCMCIA) get next CIS tuple Format of parameter block for functions 40h, 60h: Offset Size Description 00h BYTE special functions bit 0 set if function to use current BPB, clear if Device BIOS Parameter Block field contains new default BPB bit 1 set if function to use track layout fields only must be clear if CL=60h bit 2 set if all sectors in track same size (should be set) bits 3-7 reserved 01h BYTE device type (see below) 02h WORD device attributes bit 0 set if nonremovable medium bit 1 set if door lock ("changeline") supported bits 2-15 reserved 04h WORD number of cylinders 06h BYTE media type for 1.2M drive 00h 1.2M disk (default) 01h 320K/360K disk F8h for DUBLDISK.SYS v2.6 expanded drives always 00h for other drive types 07h 31 BYTEs device BPB (see AH=53h), bytes after BPB offset 1Eh omitted ---function 40h only--- 26h WORD number of sectors per track (start of track layout field) max 63 28h N word pairs: number,size of each sector in track Values for device type: 00h 320K/360K disk 01h 1.2M disk 02h 720K disk 03h single-density 8-inch disk 04h double-density 8-inch disk 05h fixed disk 06h tape drive 07h (DOS 3.3+) other type of block device, normally 1.44M floppy 08h read/write optical disk 09h (DOS 5+) 2.88M floppy Format of parameter block for functions 41h, 61h: Offset Size Description 00h BYTE special functions (reserved, must be zero) 01h WORD number of disk head 03h WORD number of disk cylinder 05h WORD number of first sector to read/write 07h WORD number of sectors 09h DWORD transfer address Format of parameter block for function 42h: Offset Size Description 00h BYTE reserved, must be zero (DOS <3.2) bit 0=0: format/verify track 1: format status call (DOS 3.2+), don't actually format bits 1-7 reserved, must be zero value on return (DOS 3.3+): 00h specified tracks, sectors/track supported by BIOS 01h function not supported by BIOS 02h specified tracks, sectors/track not allowed for drive 03h no disk in drive 01h WORD number of disk head 03h WORD number of disk cylinder Format of parameter block for function 62h: Offset Size Description 00h BYTE reserved, must be zero (DOS <3.2) bit 0=0: verify single track 1: verify multiple tracks bits 1-7 reserved, must be zero value on return (DOS 3.3+): 00h specified tracks, sectors/track supported by BIOS 01h function not supported by BIOS 02h specified tracks, sectors/track not allowed for drive 03h no disk in drive 01h WORD number of disk head 03h WORD number of disk cylinder 05h WORD number of tracks to verify (equivalent to 255 or fewer sectors) Format of parameter block for functions 46h, 66h: Offset Size Description 00h WORD (call) info level (should be 0000h) 02h DWORD disk serial number (binary) 06h 11 BYTEs volume label or "NO NAME " 11h 8 BYTEs filesystem type "FAT12 " or "FAT16 " (CL=66h only) Format of parameter block for functions 47h, 67h: Offset Size Description 00h BYTE special-function field (must be zero) 01h BYTE disk-access flag, nonzero if access allowed by driver Format of parameter block for function 68h: Offset Size Description 00h BYTE 01h for default media type, 00h for any other media type (see also INT 13/AH=20h) 01h BYTE 02h for 720K, 07h for 1.44M, 09h for 2.88M .