linuxgazette.net— This article is a hands-on tutorial for building a small boot sector. The first section provides the theory behind what happens at the time the computer is switched on. It also explains our plan.
Sep 16, 2007View in Crawl 4
God, its been over 20 years, I think we can get away with dropping some backward compatibility now. Most any of that crap would have to be emulated anyways.
"So every modern processor on the market today (like the latest Intel's CoreDuo CPU) operates at the very start in the 80's archaic 16bit-8086 realmode"Err.. no, not exactly. All modern /x86/ processors on the market today operates like a legacy 80[2+]86 in real mode at boot. Some firmwares (like EFI and some hypervisors) are smart enough to put the system in protected mode before handing over control to the OS.And this code won't work at all for ARM, PPC, etc. Most of us who have at least a degree in Computer Science would have already done everything here in some shape or form during the coursework (whether or not it was for x86 or for a MIPS board, the freshman hacker's standby, is a whole other question).
srg13Sep 16, 2007
For a little more in-depth tutorial about very basic kernel development, see <a class="user" href="http://www.osdever.net/bkerndev/index.php?the_id=90">http://www.osdever.net/bkerndev/index.php?the_id=90</a>
greyfadeSep 16, 2007
Yes, and they even go so far as to emulate the keyboard controller on A20. (Which you have to enable to get out of the 1MB area.)
joshuagrossSep 16, 2007
You'd have better luck with Bochs or Qemu.
Closed AccountSep 16, 2007
God, its been over 20 years, I think we can get away with dropping some backward compatibility now. Most any of that crap would have to be emulated anyways.
geminitojanusSep 16, 2007
"So every modern processor on the market today (like the latest Intel's CoreDuo CPU) operates at the very start in the 80's archaic 16bit-8086 realmode"Err.. no, not exactly. All modern /x86/ processors on the market today operates like a legacy 80[2+]86 in real mode at boot. Some firmwares (like EFI and some hypervisors) are smart enough to put the system in protected mode before handing over control to the OS.And this code won't work at all for ARM, PPC, etc. Most of us who have at least a degree in Computer Science would have already done everything here in some shape or form during the coursework (whether or not it was for x86 or for a MIPS board, the freshman hacker's standby, is a whole other question).
stealthcSep 16, 2007
Why write your own toy OS when Apple has already made one for you? =P/mac owner angst
phirenSep 18, 2007
Or, if your computer supports it, you could boot off a usb flash drive, or even use grub to load a boot image off your hard drive.
crossersJul 16, 2008
it's grate article. thanks!<a class="user" href="http://www.shpe-sac.org">http://www.shpe-sac.org</a><a class="user" href="http://www.ocflex.com/">http://www.ocflex.com/</a> <a class="user" href="http://www.trgovinca.org">http://www.trgovinca.org</a><a class="user" href="http://www.chasr.org/">http://www.chasr.org/</a>