I've been building a 16-bit OS entirely in NASM, not to replace Linux, but as a study in minimalism.
No paging. No multitasking. No protected mode. Just a bootloader, a Real Mode kernel, a flat filesystem, and a scripting engine. It's about 50KB total.
The interesting part isn't the OS itself — it's the constraints. In Real Mode you get:
- Direct BIOS access (int 0x10, int 0x13, int 0x16)
- 64KB segments, no memory protection
- CHS addressing for disk I/O (no LBA, no DMA)
- No MMU, no virtual memory, no interrupts from hardware
It forces you to think about what an OS actually needs. My "filesystem" is one sector for the directory and raw sectors for data. No inodes, no journaling. My "scheduler" doesn't exist — programs run until they return. My "shell" is a loop that reads a line and compares it to a list of strings.
The scripting engine (PyShell) is the most interesting piece. It parses lines of a script, maintains a variable table, and handles if/else with indentation. No arithmetic, no loops, no string comparison in conditions. It's intentionally limited.
This isn't practical. It's not meant to be. But it asks: where is the line between "hobby OS" and "toy"? And does the line matter if the goal is understanding?
The code is on GitHub. Curious what the purists here think about Real Mode vs Protected Mode, and whether "bloat-free" is a useful goal or just nostalgia.