I tried building an operating system from scratch

For a long time, when someone said “operating system,” I pictured a desktop, some windows, a taskbar, and an application launcher.

Then I started writing SYPAS in C and Assembly. That mental picture fell apart in about five minutes.

Once you drop below user space, an enormous amount of work has to go right before a single pixel shows up on a monitor.

Before the kernel even runs

Pressing the power button does not start an operating system. First the motherboard runs firmware, either UEFI or legacy BIOS, which wakes up enough hardware to find a bootable drive and load a bootloader. Only after the bootloader finishes setting up CPU mode and a memory map does your kernel get control.

At that point there is no standard library, no malloc, no filesystem, and no helpful stack trace when you make a mistake. Your code has to set up physical and virtual memory, CPU privilege levels, interrupt descriptor tables, timers, and a framebuffer on its own.

Saying “I’ll write a small OS over the weekend” stops sounding casual very quickly.

Printing five characters

I was not trying to replace Linux or Windows. My first goal fit in one sentence: boot the machine into my own code and put visible characters on the screen.

No window manager, no shell, no keyboard driver yet. Just clear proof that the processor had jumped into my C entry point without crashing.

It took hours of fighting boot descriptors and calling conventions to print a few letters on a black screen. Looking at it afterward felt almost funny, because any beginner Python script prints text in one line. Still, that tiny screen changed how I think about computers: at the bottom layer, the CPU only does very simple operations, yet wiring thousands of them together without a single bad pointer is genuinely hard.

Paging without a safety net

In TypeScript, Python, or Go, you create a variable and let the runtime and OS kernel worry about physical RAM. Inside a kernel, nobody else is watching the store. You have to read the firmware memory map, avoid trampling reserved regions, build page tables by hand, and decide what happens when code touches an unmapped address.

Paging and virtual memory used to feel like dry textbook chapters to me. The first time a bad page table entry triggered a triple fault and rebooted QEMU in a blink, the whole subject suddenly made complete sense.

What stuck with me

Working on SYPAS changed how I read everyday application code. Opening a file in Smart File Organizer, flushing a B-Tree page in SQLite Clone, or reading a socket in Wiremark all sit on top of decades of careful kernel work that most of us never have to look at.

You also do not need the whole roadmap figured out before you start. Getting five characters onto a blank screen is plenty for day one.


Linked mentions

You might also enjoy