There are some additional values of cmd which are used only by biosdisk functions. These values of cmd are allowed only for the XT, AT, PS/2, and compatibles. Values have been described in the table given next:
cmd |
What it does |
6 |
Formats a track and sets bad sector flags |
7 |
Formats the drive beginning at a specific track |
8 |
Returns the current drive parameters in first 4 bytes of buffer |
9 |
Initializes drive-pair characteristics |
10 |
Does a long read (512 plus 4 extra bytes per sector) |
11 |
Does a long write (512 plus 4 extra bytes per sector) |
12 |
Does a disk seek |
13 |
Alternates disk reset |
14 |
Reads sector buffer |
15 |
Writes sector buffer |
16 |
Tests whether the named drive is ready |
17 |
Recalibrates the drive |
18 |
Controller RAM diagnostic |
19 |
Drive diagnostic |
20 |
Controller internal diagnostic |
diskinfo_t Structure
diskinfo_t structure is used by _bios_disk function. The description of the structure is as follows:
struct diskinfo_t {
unsigned drive, head, track, sector, nsectors;
void far *buffer;
};
Where drive specifies the disk drive which is to be used. Always remember that for the hard disks, the physical drive is specified, not the disk partition. If you want to operate partitions, the application program must also interpret the partition table information of that disk itself.
|