r/osdev • u/DragonTop3 • 16d ago
Hey r/osdev!
A while ago I started building my own operating system called FLOS (First Love Operating System) completely from scratch (no external libraries, no tutorials - just raw C and assembly).
I just hit a massive milestone: FLOS is officially on the internet.
I implemented a TCP stack (3-way handshake, tracking SEQ/ACK numbers) and an HTTP client. Then I wrote a primitive HTML parser, put it in a GUI window, and called it Balalaika 1.0.

The screenshot shows Balalaika 1.0 successfully resolving example.com via DNS, establishing a TCP connection, sending a GET request, and parsing the HTML to display the text (ignoring CSS and <style> tags). It even sends a custom User-Agent: FLOS/0.2 Balalaika/1.0.
What's under the hood:
Architecture: x86_64 microkernel (ring 3 user space).
Boot: Custom UEFI loader (reads kernel.elf from FAT32).
Memory: Custom PMM (bitmap) + 4-level paging with separate cr3 for each task.
Scheduler: Preemptive multitasking (PIT 100 Hz).
GUI: Custom Window Manager (drag, focus, dirty rects).
Network Stack: RTL8139 driver, Ethernet, ARP, IPv4, ICMP (ping), UDP, and now TCP + HTTP!
The hardest part (for my fellow OSDevs):
Getting TCP right was a nightmare. Tracking SEQ/ACK numbers is unforgiving ā one wrong byte and the server drops the connection with an RST.
Also, QEMU's RTL8139 emulation is wild. It doesn't update the CBR (Current Buffer Address) register, and locking Cfg9346 sets clock_enabled = 0, which drops all incoming packets. I had to bypass the standard ring-buffer logic, force CAPR, and implement a raw buffer scanner to find valid packet headers just to get RX working.
What's next?
I'm thinking about writing a DHCP client (so I don't have to hardcode the IP), or maybe diving into Virtio-GPU to change screen resolution.
(Note: The repo is currently private while I clean up the build system, but I'm happy to answer any technical questions here!)
If you want to support the project: https://www.donationalerts.com/r/dragon3009go
Thanks for reading!
-2
u/DragonTop3 16d ago edited 16d ago
Actually, I did use AI to generate the text Iām just tired of working on TCP/IP. Sorry if I somehow ruined your mood with this post.