C Project Turns Into Full-Fledged OS

While some of us may have learned C in order to interact with embedded electronics or deep with computing hardware of some sort, others learn C for the challenge alone. Compared to newer languages like Python there’s a lot that C leaves up to the programmer that can be incredibly daunting. At the beginning of the year [Ethan] set out with a goal of learning C for its own sake and ended up with a working operating system from scratch programmed in not only C but Assembly as well.

[Ethan] calls his project Moderate Overdose of System Eccentricity, or MooseOS. Original programming and testing was done in QEMU on a Mac where he was able to build all of the core components of the operating system one-by-one including a kernel, a basic filesystem, and drivers for PS/2 peripherals as well as 320×200 VGA video. It also includes a dock-based GUI with design cues from operating systems like Macintosh System 1. From that GUI users can launch a few applications, from a text editor, a file explorer, or a terminal. There’s plenty of additional information about this OS on his GitHub page as well as a separate blog post.

The project didn’t stay confined to the QEMU virtual machine either. A friend of his was throwing away a 2009-era desktop which [Ethan] quickly grabbed to test his operating system on bare metal. There was just one fault that the real hardware threw that QEMU never did, but with a bit of troubleshooting it was able to run. He also notes that this was inspired by a wiki called OSDev which, although a bit dated now, is a great place to go to learn about the fundamentals of operating systems. We’d also recommend checking out this project that performs a similar task but on the RISC-V instruction set instead.

6 thoughts on “C Project Turns Into Full-Fledged OS

  1. MIT had one operating system which was really a multitasking debugger that had grown to the point of becoming a complete, though very idiosyncratic, multi-user environment. A classic example of creeping featurism.

    (As opposed to feeping creaturism, which was a speculation upon what would happen if the AI lab ever really achieved artificial intelligence. The terminals in that building were said to feep rather than beep.)

    1. “valid reason to keep tabs on older hardware, instead of letting them end up in a landfill.”

      “Land-field” eWaste is not always “waste”; 22% plus (says Gemini) is recycled worldwide in an environmentally responsible manner. An owner of retired hardware needs only to ensure they take the old hardware to a certified recycling center rather than sneaking it into recyclable home waste (or public dumpster) where “responsible” is likely not a fair term to describe.

      Experimentation and personal educational growth are great reasons to (temporarily) repurpose old PC hardware. Sadly, repurposing power-hungry desktops and towers and old monitors into always ON home servers is not environmentally responsible due to the grid electrical draw and the effects on home air conditioning offsets (for warmer climates); not a huge individual concern, but a factor if the practice was widely adopted. As always, environmental harm is a numbers-driven problem.

      An old Win-10 PC is a great educational device for Linux knowledge and a message to Microsoft that sleeping with hardware manufacturers is frowned upon by the technically competent users. The EU agrees and has forced MS to delay terminating Win-10 support by 12 months. The amount of eWaste created is often a result of consumers being led down the “bigger, better, faster, shinier, safer” path by greedy corporations just to establish a new revenue stream and usage patterns by individuals (no way in Hades my PC will ever be joined to the Microsoft domain.)

    2. It makes me feel the opposite because it forces me to confront that all of the cool things i did before the internet aren’t remotely interesting compared to what happened after networking. And networking just opens such a pandora’s box of complication and compatibility requirements that you almost have to abandon any elegance or simplicity in exchange for relying on deep layering to obscure unpleasant parts.

  2. as well as 320×200 VGA video

    Originally, mode 13h, 320×200 256c was known as MCGA or PS/2 Graphics. 🙂

    However, it also can be considered VGA if it’s tweaked.
    If, say, the palette was a custom palette.
    Because, the old MCGA circuit in IBM PCs is merely software compatible to software that uses unaltered mode 13h.

    Mode 11h, 640×480 mono, also was supported by MCGA. It’s easy to program, too.
    Both mode 11h and 13h work with just 64 KB of video memory and need no bank-switching.

    64 KB also is the segment size of 8086 processors and the maximun size of DOS *.COM files, which is conveniant here.
    If everything fits into 64 KB, programming is easier to manage.

Leave a Reply to JoeCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.