Hi, Does anyone know of an interrupt that returns the boot devices drive number? (the one put in DL for most int 0x13 functions).
The reason is because I want to be able to boot from both MBR and GPT partitions. At the moment I'm having to loop through each device checking what type of partition table it uses, reading the first sector of each partition entry, and then check for a signature I've put in the bootloader. Unfortunately, this just wont all fit in 510 bytes, no matter how heavily optimized. If i knew which drive was being booted from, I wouldn't have to loop through every single one.
Boot device interrupt?
- furryfreak
- Member
- Posts: 28
- Joined: Mon Nov 03, 2008 12:45 pm
- Location: SW England
Re: Boot device interrupt?
The boot device ID is stored in DL on bootup, so if you just save that to a known location or variable, then you can reuse it later.
Website: https://joscor.com
- furryfreak
- Member
- Posts: 28
- Joined: Mon Nov 03, 2008 12:45 pm
- Location: SW England
Re: Boot device interrupt?
Really? nice one, thanks for the fast reply!