Mail Archives: djgpp/1996/02/13/10:01:52
On Mon, 12 Feb 1996 kaikow AT standards DOT com wrote:
> Where are the valid values for the device numbers documented?
> I thought that the device numbers were just 0, 1, 2, ...
>
> The following program works for devices A and B, but not for C.
This is BIOS, not DOS. DOS indeed enumerates drives starting from 0 in
the order it sees them when your system boots, so 0 = A:, 1 = B:, 2 = C:
etc. But BIOS treats floppies and hard disks differently (not
surprisingly, because they usually use entirely different methods of
moving the data), so 0 and 1 are still A: and B:, but the hard disks
start with 0x80 (if the 7th bit is set, BIOS knows it's a hard disk). So
C: is 0x80, D: is 0x81 (assuming D: is the second hard disk), etc.
- Raw text -