A Look At Bootstrapping
markmcb writes "OmniNerd posted an interesting article on the often-overlooked process of bootstrapping. The author does a nice job of showing how to take an x86 system from BIOS to OS once it's powered on. A complete set of commented code is provided and explained in the article."
When I modified the boot sector of some floppy disks and spread them around at work. If you tried to boot them, you'd see the following message:
You can't boot this floppy. Pull the floppy out of the drive and your head out of your ass and try again
"Eve of Destruction", it's not just for old hippies anymore...
Old it is. Convoluted? Is that such a simple asm program that's giving you headaches? That's REALLY REALLY simple stuff for anyone who's ever done asm at all (on x86). Plain 386 instructions, nothing 32bit (no "db 66" or e?x registers even). No interrupt handlers, no direct I/O to the hardware, etc. If you find this complex, it just goes to say you've never coded asm, perhaps on any platform (I've coded in asm on several - motorola, PICs, Atmels, etc - and all programs were typically more complicated than this little "bootloader"). I find it's one of the easiest platforms when it comes down to machine code, coding things like a simple PLC emulator (that runs ladder) in asm, interfaced over the parallel port is pretty much trivial (did that in a weekend as a teen, just for fun). Extensive documentation was easy to find (schematic of the XT boards - whose chips were easy to understand and control, ralf brown's interrupt list, etc). Interfacing was easy too, just throw a 8255 on a "blank" ISA card and you were pretty much set (24 IOs at TTL level), although PICs have changed this whole thing quite a bit. I still miss these days - I loved coding in asm. Those were the best days of my life (as a geek/programmer/computer hobbyist), things just aren't the same anymore, and programming lacks that little something...
We're "stuck" on x86 mostly by choice - backward compatibility is a great thing. You can buy a dual core high end machine and install anything from say, dos 3.3 to XP (and every version between) and most of it will run just fine (and other OS'es). That's very important to a lot of people. Decent hardware for the platform is quite cheap really, readily avaialble virtually everywhere, and you can get parts that fits your needs no matter what (slow or fast, be it a CPU, video card or whatever). You can assemble what you exactly need. There's tons of reasons to stay on x86, I can't see myself switching to something else anytime soon.