Go to the first, previous, next, last section, table of contents.
#include <bios.h> int biosdisk(int cmd, int drive, int head, int track, int sector, int nsects, void *buffer);
This function interfaces with the BIOS disk service (interrupt 0x13). Please refer to a BIOS reference manual for detailed information about the parameters of this call. The function assumes a sector size of 512 bytes.
The following functions of Int 13h are currently supported:
The first request with more sectors than will fit in the transfer buffer will cause a DOS buffer to be allocated. This buffer is automatically freed when your application exits. Requests for more sectors than 18 sectors (9K) will fail.
Function 8 returns values in buffer as follows:
The value of AH returned by the BIOS. See section _bios_disk, for a detailed list of possible status and error codes.
not ANSI, not POSIX
char buffer[512]; if (biosdisk(2, 0x80, 0, 0, 0, 1, buffer)) error("disk");
Go to the first, previous, next, last section, table of contents.