Obtains allocation information about the specified disk drive and a pointer to the media identification byte from its file allocation table.
Call with:
AH = 1CH
DL = drive code (0 = default, 1 = A, etc.)
Returns:
If function successful
AL = sectors per cluster
DS:BX = segment:offset of media ID byte
CX = size of physical sector (bytes)
DX = number of clusters for default or specified drive
If function unsuccessful (invalid drive or critical error)
AL = FFH
Notes:
The media ID byte has the following meanings:
0F0H 3.5-inch double-sided, 18 sectors or "other"
0F8H fixed disk
0F9H 5.25-inch double-sided, 15 sectors or 3.5-inch double-sided, 9 sectors
0FCH 5.25-inch single-sided, 9 sectors
0FDH 5.25-inch double-sided, 9 sectors
0FEH 5.25-inch single-sided, 8 sectors
0FFH 5.25-inch double-sided, 8 sectors
In general, this call is identical to Int 21H Function 1BH, except for the ability to designate a specific disk drive. See also Int 21H Function 36H, which returns similar information.
[1] The address returned in DS:BX points to a copy of the first sector of the actual FAT, with the media ID byte in the first byte.
[2.0+] The address returned in DS:BX points only to a copy of the media ID byte from the disk's FAT; the memory above that address cannot be assumed to contain the FAT or any other useful information. If direct access to the FAT is required, use Int 25H to read it into memory.
Example:
Determine whether disk drive C is fixed or removable.
.
.
.
mov ah,1ch ; function number
mov dl,3 ; drive code 3 = C
int 21h ; transfer to MS-DOS
; check media ID byte
cmp byte ptr ds:[bx],0f8h
je fixed ; jump if fixed disk
jmp floppy ; else assume floppy
.
.
.