Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hi all,
How can we get the BIOS drive (int 13h drive) where the system was booted from in real mode?
For example if we boot the system from the first floppy unit it should be 0x00 and if we boot the system from the first hard drive it should be 0x80.
Thanks in advance
Specifically, when the BIOS hands control to your boot sector, the drive number you were booted from is in dl. NOTE: If you did not receive control for the BIOS and instead got control from a bootloader (like GRUB) dl may or may not contain the correct value. You should check the documentation for whatever bootloader you are using in this case.