Show HN: MyraOS – My 32-bit operating system in C and ASM (Hack Club project) (github.com)
This took me on the most interesting ride, where I’ve learned about OS theory and low level programming on a whole new level. I’ve spent hours upon hours, blood and tears, reading different OS theory blogs, learning low level concepts, debugging, testing and working on this project.
I started by reading University books and online blogs, while also watching videos. Some sources that helped me out were OSDev Wiki (https://wiki.osdev.org/Expanded_Main_Page), OSTEP (https://pages.cs.wisc.edu/~remzi/OSTEP), open-source repositories like MellOS and LemonOS (more advanced), DoomGeneric, and some friends that have built an OS before.
This part was the longest, but also the easiest. I felt like I understood the theory, but still could not connect it into actual code. Sitting down and starting to code was difficult, but I knew that was the next step I needed to take! I began by working on the bootloader, which is optional since you can use a pre-made one (I switched to GRUB later), but implementing it was mainly for learning purposes and to warm up on ASM. These were my steps after that:
1) I started implementing the VGA driver, which gave me the ability to display text.
2) Interrupts - IDT, ISR, IRQ, which signal to the CPU that a certain event occurred and needs handling (such as faults, hardware connected device actions, etc).
3) Keyboard driver, which enables me to display the same text I type on my keyboard.
4) PMM (Physical memory management)
5) Paging and virtual memory management
6) RTC driver - clock addition (which was, in my opinion, optional)
7) PIT driver - Ticks every certain amount of time, and also
8) FS (File System) and physical HDD drivers - for the HDD I chose PATA (HDD communication protocol) for simplicity (SATA is a newer but harder option as well).
For the FS I chose EXT2 (The Second Extended FileSystem), which is a foundational linux FS structure introduced in 1993. This FS structure is not the simplest,
but is very popular in hobby-OS, it is very supported, easy to set up and upgrade to newer EXT versions, it has a lot of materials online, compared to other
options. This was probably the longest and largest feature I had worked on.
9) Syscall support.
10) Libc implementation.
11) Processing and scheduling for multiprocessing.
12) Here I also made a shell to test it all.
At this point, I had a working shell, but later decided to go further and add a GUI! I was working on the FS (stage 8), when I heard about Hack Club’s Summer of Making (SoM). This was my first time practicing in HackClub, and I want to express my gratitude and share my enjoyment of participating in it.At first I just wanted to declare the OS as finished after completing the FS, and a bit of other drivers, but because of SoM my perspective was changed completely. Because of the competition, I started to think that I needed to ship a complete OS, with processing, GUI and the bare minimum ability to run Doom. I wanted to show the community in SoM how everything works.
Then I worked on it for another 2 months, after finishing the shell, just because of SoM!, totalling my project to almost 7 months of work. At this time I added full GUI support, with dirty rectangles and double buffering, I made a GUI mouse driver, and even made a full Doom port! things I would've never even thought about without participating in SoM.
24 comments
[ 3.3 ms ] story [ 42.2 ms ] threadi would suggest to providing an iso or co-operating / looking into copy.sh which provides a large number of iso files which you can boot/play around with in the browser itself!
I was just today tinkering around with the ibm iso (exploring ibm) and others too, its always fun seeing new operating system!
I would love if you could, as I said, co-operate with copy.sh/v86 team to also include your iso and also provide iso files in github releases if possible
Source: https://copy.sh/v86/ Their github page : https://github.com/copy/v86
If I were you I'd investigate why it needs so much. Keep in mind how much functionality older OSs had, and how much computing power they needed. Always good to see more OS projects nonetheless, but always remember that efficiency is important.
That said, I’m once again reminded that we sorely need some updated resources for aspiring OS developers in 2025. Targeting 32-bit x86 and legacy devices that haven’t been “the norm” for decades suggests to me a heavy influence from resources like the osdev wiki which, while occasionally useful, are increasingly outdated in the modern world and lead to many questionable choices early on.
I have come to believe (through multiple iterations of my own OS projects) that there’s more value in largely ignoring resources such as osdev and focusing instead on first-principles design, correct layering, and building based on modern platforms (be that x86_64 or something else) and ignoring legacy devices like the PIT and PS2 etc.
I just wish we had good introductory documentation resources to reflect that, and that outdated resources weren’t overwhelmingly surfaced by search engines and now AI “summaries”.
None of the above is intended to take away from OPs achievement, which is fantastic, or from the work done over the years by the osdev community, who I’m sure largely do the best they can with what they have.
i did something similar when i was 18. got to the point of filesystem and mouse driver.
Interesting that 128 MB was not enough. What did you do to find this issue and how are you measuring memory usage?