![]() ![]() ![]() Some other boot sectors are smarter I wrote one back in the 90s that: The DOS boot program simply loads a bunch of sectors from the start of the disk, performs some basic checks to make sure they were loaded correctly, and jumps into them to start the actual OS. The rest of the sector is available for the boot program. In addition to this, most useful boot programs will also include the data structures that are necessary for some file system or other, typically a FAT12 header which occupies the space between bytes 3 and 30. The BIOS then jumps to 0000:7c00h, which is expected to contain a jump instruction to the actual code (again, some BIOSs may check whether this is present or not before booting it).In some BIOSs, there may be a check that the last two bytes of the sector are 55h AAh (my tests on compatible machines show that this isn't necessarily true there, but I suspect IBM BIOSs do perform this test based on documents I've read about it), and the BIOS will ignore the disk if this signature isn't present.First, it loads the first sector (512 bytes) of the first track of the first side (if the disk is double sided) of the disk into memory at 0000:7c00h. ![]() In any case, the key to writing a useful bootable disk is to understand what the BIOS does when it boots from floppy (booting from a hard disk is subtly different, and adds a little extra complexity), which is this: It's worth noting that almost all floppies you're likely to have are actually bootable: it's just that they boot a program that isn't especially useful (it either displays a message saying to insert a system disk, or they execute INT 18h - which runs BASIC if it's installed in ROM, or displays a boot error if it isn't). The notion of a bootable-vs-non-bootable floppy is a little odd. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |