INT 21 - DOS 3.2 - IOCTL - BLOCK DEVICE REQUEST
Input |
DOS1 |
N |
DOS2 |
N |
DOS3.2 |
Y |
DOS5 |
Y |
Output |
AX |
44h |
0Dh |
Error
Code |
AX |
BX |
|
Drive
(0=Def) |
|
|
BX |
CX |
Category
Code |
Function |
|
|
CX |
|
|
|
|
|
DX |
DS:DX |
Parameter
Block |
Set
if Error |
CF |
Category Code:
08h = Disk drive
Function:
40h = Set device parameters
41h = Write logical device track
42h = Format and verify logical device track
46h = Set media ID
60h = Get device parameters
61h = Read logical device track
62h = Verify logical device track
66h = Get media ID
68h = Sense media type
Parameter Block
CL=40h,60h
BYTE Special Functions Code
Special
Functions Code |
Bit |
Dec |
Hex |
Description |
0 |
1 |
01h |
Use current BPB |
1 |
2 |
02h |
Use only Track Layout
field |
2 |
4 |
04h |
Sectors in Track are all
same size |
3 |
8 |
08h |
Reserved |
4 |
16 |
10h |
5 |
32 |
20h |
6 |
64 |
40h |
7 |
128 |
80h |
BYTE Device Type Code
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 other type of block device
WORD Device Attributes Code
Device
Attributes Code |
Bit |
Dec |
Hex |
Description |
0 |
1 |
0001h |
Nonremovable media |
1 |
2 |
0002h |
Change line supported |
2 |
4 |
0004h |
Reserved |
3 |
8 |
0008h |
4 |
16 |
0010h |
5 |
32 |
0020h |
6 |
64 |
0040h |
7 |
128 |
0080h |
8 |
256 |
0100h |
9 |
512 |
0200h |
10 |
1024 |
0400h |
11 |
2048 |
0800h |
12 |
4096 |
1000h |
13 |
8192 |
2000h |
14 |
16384 |
4000h |
15 |
32768 |
8000h |
WORD Number of Cylinders
BYTE Media Type Code
00h 1.2M disk (default)
01h 320K/360K disk
31 BYTEs Device BPB
WORD Bytes/sector.
BYTE Sectors/cluster.
WORD Reserved sectors.
BYTE Number of FATs.
WORD Number of root dir entries.
WORD Total number of sectors.
BYTE Media descriptor byte.
WORD Number of sectors/FAT.
WORD Number of sectors per track
WORD Number of heads
DWORD Number of hidden sectors
11 BYTEs Reserved
WORD Number of Sectors in Track
N WORD pairs Numbr of Track / Size of First Sector in Track
CL=41h,61h
BYTE Reserved, must be zero
WORD Number of disk head
WORD Number of disk cylinder
WORD Number of first sector to read/write
WORD Number of sectors
DWORD Transfer address
CL=42h,62h
BYTE Special Function: ZERO for format, ONE for verify
WORD Number of disk head
WORD Number of disk cylinder
CL=46h
WORD Information Level
DWORD Serial Number
10 BYTEs ASCII Volume Label
8 BYTEs File System Type ("FAT12 " / "FAT16")
CL=68h
BYTE Default Flag
0 = Media is not default type
1 = Media is default type
BYTE Media Type
2 = 720K disk
7 = 1.44M disk
9 = 2.88M disk |