Is there any way to list the BIOS drive indexes in real mode (E.g. 0x80, 0x81 ...)?
I did not find any interrupt that is in charge of listing drive numbers!!
If you installed a new hard disk, check whether the hard disk was successfully installed. When starting or restarting the computer, press F2 to enter the BIOS Setup screen. All of the installed disks will appear in the Disk Information area. If the newly installed disk does not appear, reinstall the disk.
In My Computer, right-click the drive you want to rename. In the drop-down menu that appears, select Properties. In the Properties window, on the General tab, type a new name in the Label box (A), click Apply (B), and then click OK (C).
The G-list table. The G-list or “growth” defect table contains sectors which have become corrupted while the drive is in use. Although data operations are automatically redirected to uncorrupted sectors, the G-list table does reduce drive access speed and it may become necessary to replace the drive.
I'm not aware of any way to 'list' the available bios drives in real mode.
However, there are some things that might help:
40:75
in the the BIOS Data Area. While I don't 'know' that drive numbers are assigned sequentially, I'd expect them to be. If so, the list of hard drives would run from 0x80 to 0x80 + (40:75 - 1) (although conceivably there could be 0 hard drives, so 0x80 might not be valid either).int 21h function 0E
(select default drive), which returns "the highest drive present." Without checking, I'm guessing this is related to LastDrive, but it might be useful.int 13h function 08
(read drive parameters) and incrementing the drive number until you get an error. I'm pretty sure DOS maxed out at 26 drives (including hard disks, cds, floppies, etc), so this loop wouldn't run very long.Note that for bios functions, hard drives typically have the most significant bit set. So hard drive #0 is referred to as 0x80, #1 is 0x81, etc. Floppy drives don't have this bit set and so count from 0.
By the time USB drives came along, I had stopped using DOS, so I'm not sure whether they appear as hard drives or floppies. Since they are removable, I wouldn't expect them to be listed as hard drives, but it may depend on the driver you use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With