Rolling Your Own Bootloader: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
m added references to hard disks, make floppy outdated
Line 58:
=== How do I actually load bytes ===
 
[[BIOS]] interrupt 13h. Get info about it at [[Ralf Brown's Interrupt List]], make sure you know (the now outdated) floppies may fail one or two times, that you cannot read more than a track at once, and you're done.have Toto readuse fromCHS theaddressing hard drive,and you're probably want int 13h, ah=0x42, drive number 0x80. Details in the interrupt listdone.
 
To read from the hard drive (which is the preferred way these days, also used by CDROMs and USB-sticks), you probably want int 13h, ah=0x42, drive number 0x80 that uses simple LBA addressing. Details in the interrupt list.
 
If you need guidance, feel free to check [http://clicker.cvs.sourceforge.net/clicker/c32-lxsdk/kernel/src/sosflppy/lowlevel.asm?view=log lowlevel.asm]
 
 
Note also that most [[File Systems]] involve some conversion between allocation units (blocks/clusters) and physical "Cylinder:Head:Sector" values. Those conversions are simple once you know the ''sectors-per-track'' and ''heads'' counts. Check out [http://www.nondot.org/sabre/os/articles OSRC] for additional info. This is only relevant for outdated floppies; everything else, like hard drives, CDROMs, USB-sticks all use the simple LBA addressing scheme.
 
<pre>