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 sevice (interrupt 0x13). Please refer to a BIOS reference manual for detailed information about the parameters of this call. All known calls are supported. A sector size of 512 bytes is assumed.
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. Since this buffer is big enough to hold 18 sectors, requests for more sectors than that will fail.
Request eight returns values in buffer as follows:
The value of AH returned by the BIOS.
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.