Slashdot Mirror


Building Your Own Operating System?

sonictooth asks: "I have dreams of writing a toy operating system, as I know some people have already done in college. Unfortunately, I don't have that opportunity. I was wondering what books (as there are so many) and methods people [have used], either in college or on their own. Amazon is littered with books from varying authors, Tanenbaum in particular, and there are both positive and negative reviews of his books. Does anyone recommend a simple book to walk you through the early stages, and then explain the more complex theories later on."

5 of 102 comments (clear)

  1. offtopic, but... by ru-486 · · Score: 3, Interesting

    Slashdot needs more items like this! Reminds me of the pre-SCO days...

  2. Google is your friend. by linuxkrn · · Score: 3, Interesting

    I did this years ago. Had a quick boot floppy with a dumb OS that did almost nothing. But it was still cool "just for fun."

    As I suggested, google is your friend.

    Google gives you this first: http://mega-tokyo.com/osfaq2/.

    And this might be good for FS (Fat12) http://www.free2code.net/tutorials/other/20/os1.ph p

  3. Re:Here's a list for ya.. by edalytical · · Score: 3, Interesting
    Write a bootloader

    Why? What experience do you gain from this? I only ask because every other tutorial or FAQ, that I have come across, strongly advises you not to do this-- especially as the first step.

    --
    Win a signed Stephen Carpenter ESP Guitar from the Deftones: http://def-tag.com/?r=0008781
  4. Re:Here's a list for ya.. by Satan's+Librarian · · Score: 4, Interesting
    Actually, depending on what you are looking to get out of the experience and how determined you are, it's a *very* small piece of code that you can learn quite a bit about the PC by writing.

    If you're writing a toy OS to learn the upper level OS concepts, then you're probably better off writing your 'OS' as an app that runs on top of your favorite existing OS. But if you're doing it to learn more about low level programming and the hardware/firmware you're running on, the bootloader is at least a portion you can get done before loosing interest, and it teaches its own lessons.

    Also, if all you want is a baby utility OS/program, you can bootstrap the entire program into memory from a floppy (or bootable CD) bootsector, run it, and be done with it.

    Lessons learned:

    • Assembler language
    • BIOS interrupts
    • BIOS memory architecture
    • Disk structure and I/O
    • How a PC boots
    • How to get lilo back quickly and easily if you install XP onto a partition after linux.
    • Why you should backup your partition table and MBR sector before writing a buggy program to it.
  5. Re:Don't do it for Intel by chthon · · Score: 3, Interesting

    There are also plenty of nice Z80 emulators. That way you don't need to reboot a machine every time and you have easier code stepping capabilities.