In the third after-school robotics meeting of the year, I ventured into that frightening and mysterious land of operating system development. It’s the hardest thing you’ll ever fail to do – and I started it while listening suggestions for the name of this OS. I think Freddy ultimately decided on “Sloth”. Great day. Interestingly enough, the only hard-core programmer who I told about this project who did not inform me that it would be an utter failure was also the only person I know who has ever worked on writing his own OS (although it wasn’t very successfull). So I’m hopeful – probably more so than I have a right to be.
Briefly, I can now start up the computer and print an ‘A’ to the screen. That means that I can claim to be 3 months ahead of schedule, since I wasn’t planning on starting this project until early January (I got bored). Of course, when I tried to print an ‘A’ to the second line, I got a blue rectangle instead. But hey, that’s pretty cool too!
Now for the long story. Walking in today, I had made progress: I had acquired several computers to be used for this project and some other (all the meantime fighting back the greed of my bosses, who actually wanted to use them for things that were – god forbid – practical *shudder*), I had acquired a floppy disk on which to write the OS, and… well yeah, that’s about it. I also knew nothing about how to write an OS.
First, I set up grub. It turned out to be pretty simple. Next, I started figuring out how to write the OS to the disk (no, I didn’t have an OS yet – did I mention that I’ve never done this before?). At this point, Freddy pointed out that I could just store the file on the hard drive, and have grub read it. Oh. Right. Thanks. And I spent 45 minutes acquiring that floppy disk why?
Next I went to my favorite wiki, and looked up the boilerplate OS code. Pretty simple, so I copied it onto qweffor and ran it. Well, actually, I told qweffor to reboot, but I was logged on via SSH, so I had to walk over to the room with qweffor in order to watch what was happening. Freddy had already started up the right OS. So, yeah, it had printed out an ‘A’. Grub had also printed out some stuff. I specified that grub should be ‘quiet’, and retried, but that didn’t fix it. So I got a message like:
Aooting from (hd0,0)...
I decided to let that message appear, and print out the rest of the stuff to the following lines. So instead of just setting the first character to be ‘A’, I set it to be a newline, and set the second character to be ‘A’. Result: a blue square with a white circle in the middle. Then I had to catch my bus.
Result: its time to actually read the documentation. And for those of you who were planning to look on, you didn’t miss much.
Oh, and today was the first day of training for freshmen. Not that that’s unimportant, but it was somewhat less than exciting…
Related posts: