[Windows 95 only.]
Allows absolute disk read/write to FAT32, FAT16, and FAT12 drives. This call replaces Int 25h/26h.
mov si, 6001h ;write normal file data. SI=0 for read
;see "In Write Mode" below for more write values
mov cx, -1 ;cx must be -1
mov dx, seg Buffer
mov ds, dx
mov bx, offset Buffer ;See below
mov dl, DriveNum ;See below
mov ax, 7305h ;Ext_ABSDiskReadWrite
int 21h
jc error_handler ;carry set means error
DISKIO STRUC
diStartSector dd ? ;sector number to start
diSectors dw ? ;number of sectors
diBuffer dd ? ;address of buffer
DISKIO ENDS
The drive number is 1-based (0 = default drive) and is specified in DL instead of AL.
This call does not leave a flag word on the stack like Interrupts 25h and 26h.
This call modifies only the AX register and the flags.
Bit 0 of SI specifies whether the call is to do a READ (INT 0x25) or a WRITE (INT 0x26):
SI bit 0 clear | READ |
SI bit 0 set | WRITE |
15 | 14 | 13 | Description |
---|---|---|---|
0 | 0 | 0 | Other/Unknown. |
0 | 0 | 1 | FAT data. |
0 | 1 | 0 | Directory data. |
0 | 1 | 1 | Normal File data. |
1 | x | x | Reserved. Bit 15 must be 0. |
All other bits of SI (1 through 12) are reserved and must be 0.
This provides information to apps (like compression drivers) so that they can write the data properly based upon the data type specified by the above bits.
Do not set the flags improperly, this information is to be used only to indicate what "type" the data is.
If the function is successful, clears the carry flag. Otherwise, sets the carry flag, and sets the AX register with the error code as it is documented for Int 25h/26h.
When calling this function with DeviceIoControl, it is recommended to set the dwloControlCode parameter to VWIN32_DIOC_DOS_DRIVEINFO (defined as 6 in VWIN32.H). For more information on this, see Using VWIN32 to Carry Out MS-DOS Functions.