Hi Lucho! > Now our SYS stores 0 if the drive is A: or B: and FF in all other cases. > Then the boot sectors check if this value is FF and if so, use DL from > BIOS, else use the drive number from the boot sector. > ... > someone decides to overwrite our boot sector later with a boot sector from > another DOS? The FF will remain there...
Good point! > So, I propose that SYS stores 0 if the drive is A: or B:, 80 if the drive > is C: or D:, and FF in all other cases... I think there should be a command line option for SYS, yes. For floppy, I vote for default 00. For harddisk, I am undecided. Only very few boot managers fail to pass the correct drive number to the boot sector. Some even need the boot sector to follow the value (e.g. you should be able to boot FreeDOS from drive 0x81 with help of the LILO "table" option). My suggestion - maybe kludgy - would be to STORE a value of 80 but to USE the value passed by the MBR / boot manager! This can be done by replacing the "if value is FF, use value from MBR" by "depending on command line options of SYS, either keep or NOP out the copy-value-from-MBR-to-variable-in-boot- sector section of the boot sector". There will certainly be an "elegant enough" way to do this patching. One fun implementation would be to toggle between "mov variable,register" and "mov register,variable" :-). Whatever you select, please make sure that: - 8086 bootability is preserved (at least for FAT1x and FAT32 CHS). Recently we had a boot sector which used "shift register by 4 bits" opcode. Oops. - the patch is stable / universal enough so that we do not have to adjust SYS after every boot sector improvement. Best wishes... 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