[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
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 = function
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
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
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.0
SeeAlso: AH=69h,INT 2F/AX=0802h,INT 2F/AX=122Bh
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
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+) 1.44M floppy
08h read/write optical disk
09h (DOS 5.0) 2.88M floppy
0Ah other type of block device
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
always 00h for other drive types
07h 31 BYTEs device BPB (see AH=53h), bytes after BPB offset 1Eh omitted
26h WORD number of sectors per track (start of track layout field)
not used by function 60h
28h N word pairs: number,size of each sector in track
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 functions 42h, 62h:
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+)
bits 1-7 reserved, must be zero
on return (DOS 4.x):
bit 0: set if specified tracks, sectors/track supported
bit 1: set if function not supported by BIOS
bit 2: set if specified tracks, sectors/track not supported
bit 3: set if no disk in drive
01h WORD number of disk head
03h WORD number of disk cylinder
Format of parameter block for functions 46h, 66h:
Offset Size Description
00h WORD info level (00h)
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
01h BYTE 02h for 720K, 07h for 1.44M, 09h for 2.88M
See Also:
21440C
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson