@CHIP-RTOS C Library - BIOS API
Get disk drive information.
void BIOS_Disk_Info ( unsigned int drive,
BiosDiskInfo * disk_info );
- Drive index:
0 = current drive
1 = A: drive
2 = B: drive
... and so on.
- Output parameter: Pointer to
data structure that will be set by this API.
- -- none --
- This function may be used for any drive, but it will be required
for drives which exceed the DOS interrupt 0x21
API's reporting capacity of 0xFFFF clusters maximum.
The resulting value for the SectorsPerCluster
of the output data structure will be 0xFFFF if the drive specified
was not valid.
The number of
bytes disk free space can be calculated as
FreeClusters * sectorsPerCluster * bytesPerSector
and the drive's total number of bytes as
TotalClusters * sectorsPerCluster * bytesPerSector
Note that for drives larger than 4 Giga-byte, mulitple precision
integer arithmetic will be required for these calculations.
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
for more details.
Supported since or modified in @CHIP-RTOS version
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document