Search code examples
diskbios

BIOS INT 13 call, what does "1st hard disk" or "2ed hard disk" mean?


From wikipedia "BIOS interrupt 13th" page, we can see the following drive table:

Drive Table

  • DL = 00h 1st floppy disk ( "drive A:" )
  • DL = 01h 2nd floppy disk ( "drive B:" )
  • DL = 80h 1st hard disk
  • DL = 81h 2nd hard disk

What I am confused about is that what determines the order of disks?

Is it the boot priority that we can set in BIOS setup menu?

Here is my BIOS boot setting: My BIOS boot setting

So does it mean that with DL=0x80, we can read/write the first device and with DL=0x81 and 0x82, we can read/write the remaining devices?


Solution

  • The BIOS determines the order of the drives (at least with the BIOS call).

    The drive you booted to will be the first hard drive. For the other drives, there are no well defined rules about it. Different BIOSes behave differently (AMI vs Phoenix). Some will list them per the boot order, others will simply list them in the order they were detected (SATA before USB).