www.beck-ipc.com

@CHIP-RTOS C Library - BIOS API


BIOS_Disk_Info

Get disk drive information.

void BIOS_Disk_Info ( unsigned int drive,
                      BiosDiskInfo * disk_info );

Parameters

drive

Drive index:
    0 = current drive
    1 = A: drive
    2 = B: drive
    ... and so on.

disk_info

Output parameter:   Pointer to BiosDiskInfo data structure that will be set by this API.

Return Value

-- none --

Comments

This function may be used for any drive, but it will be required for drives which exceed the DOS interrupt 0x21 service 0x36 API's reporting capacity of 0xFFFF clusters maximum.

The resulting value for the SectorsPerCluster member 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.

See Also

RTOS API

This library function invokes a RTOS software interrupt.   Refer to this RTOS API function's documentation for more details.

Supported since or modified in @CHIP-RTOS version

    SC12SC13SC11SC1x3SC2x
    V1.23V1.23V1.23V1.16V1.00

Supported by @CHIP-RTOS C Library since version

    CLIB
    V2.11

This API List
List of C Libraries
@CHIP-RTOS Main Index


End of document