Hi Jeremy, I vote for 2) - use 0 or 80 only in the boot sector (or really any value the user wants, but default to 0 or 80) - the boot sector code has at a fixed location useBIOSorNotFixedLocation: mov [drive], dl - SYS is then responsible for determining if BIOS provided value is used or not by patching useBIOSorNotFixedLocation with NOPs ... *but* with different SYS behaviour: Make "/B drivenumber" and "/USEBPBDRIVE" work independent from each other. Sometimes you will want "/B 81 /USEBPBDRIVE", sometimes "/USEBPBDRIVE" (with default drive 0 or 80 that is), and in rare cases even "/B 81" (where the 81 is only read by disk tools but DOS uses the value passed by the boot loader / MBR instead). And of course "" (use value passed by MBR and write default 0 or 80 value into boot sector).
MS DOS 5 behaves as "/USEBPBDRIVE" MS DOS 4 same IBM DOS 3 probably the same Win9x same but skips int 13.00 depending on drive number high bit? WinNT same as DOS 5 ... and so on. According to: http://home.att.net/~rayknights/pc_boot/pc_boot.htm Win9x scans the MBR to find the primary partition which starts at the same LBA offset as stored in the boot sector... (if drive number is 0x80 or higher) ... So all MS operating systems require that either the BIOS maps around the drive numbers or that something stores 0x81 in the boot sector. Otherwise they cannot boot from a secondary harddisk. They all ignore the drive number passed from the BIOS / MBR / boot loader. Or course this does not stop us from ACCEPTING the drive number passed from the BIOS / MBR / boot loader :-). But it seems to be okay to make /USEBPBDRIVE on by default. Then the user can use either the default drive numbers (0 or 0x80) or select a different number (e.g. 0x81) manually with the /B ... option. Some "/DONOTUSEBPBDRIVE" option would only be needed for smart boot managers / BIOSes which can pass other drive numbers than 0x80 to the boot sector. You would have to test yourself if your BIOS is able to do that, and if not, how it implements booting from secondary harddisks (e.g. by mapping drive numbers in a different way or by patching around in boot sectors?). Eric ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ Freedos-kernel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-kernel