Int 21h Function 440Dh Minor Code 61h (FAT32)

[Windows 95 only.]

Reads data from a track on the specified device and places the data in memory.

mov     bx, Drive               ;See below
mov     ch, DeviceCat           ;See below
mov     cl, 61h                 ;Read track on logical drive
mov     dx, seg ReadBlock       ;See below
mov     ds, dx
mov     dx, offset ReadBlock    ;ds:dx points to RWBLOCK structure
mov     ax, 440Dh               ;IOCTL for block device
int     21h

jc      error_handler           ;carry set means error

Parameters

Drive
Specifies the drive to be read from (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive.
Value Description
08h FAT16 or FAT12 drive. (Will fail on a FAT32 drive).
48h FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.

Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.

ReadBlock
Points to an RWBLOCK structure that contains information specifying the sectors to be read from. The RWBLOCK structure has the following form:
RWBLOCK STRUC
    rwSpecFunc      db  0  ;special functions (must be zero)
    rwHead          dw  ?  ;head to read/write
    rwCylinder      dw  ?  ;cylinder to read/write
    rwFirstSector   dw  ?  ;first sector to read/write
    rwSectors       dw  ?  ;number of sectors to read/write
    rwBuffer        dd  ?  ;address of buffer for read/write data
RWBLOCK ENDS

Return Values

If the function is successful, clears the carry flag. Otherwise, sets the carry flag and sets the AX register to one of the following error values.

Value Name
0001h ERROR_INVALID_FUNCTION
0002h ERROR_FILE_NOT_FOUND
0005h ERROR_ACCESS_DENIED

Remarks

Read Track on Logical Drive returns 0002h (ERROR_FILE_NOT_FOUND) if the specified drive number is invalid.