Skip to content
DnsLister Forum

Where domain hunters compare notes

I built a ~1.1 MB kernel operating system entirely in x86_64 assembly

NOTE: This project contains heavy usage of multiple AI models. I’ll answer questions as much as I can, but I’m not going to pretend I personally remember every single line of assembly in this thing. At the end of the day, it’s still a “vibe coded” project — although I’ve spent a lot of time testing, debugging, integrating, and figuring out why the damn thing breaks. 😭

Also, the source code will be available as a read-only educational reference, rather than as a project intended for people to directly copy and modify.

So, what did I actually make?

ShellyForever is a hobby x86_64 operating system written entirely in assembly that boots on real hardware.

The kernel itself is around 1.1 MB, while the current disk image is 256 MB.

🖥️ Core system

  • Custom two-stage BIOS bootloader
  • x86_64 long mode + paging
  • Custom filesystem (SFFS)
  • PS/2 keyboard support
  • Hierarchical filesystem
  • Built-in shell and utilities
  • No libc
  • No external runtime dependencies
  • Mostly polling-based architecture

The system boots from a raw disk and manages its own filesystem and programs.

🌐 Networking

ShellyForever has its own networking stack rather than relying on an existing OS.

It currently includes:

  • RTL8168 PCIe NIC driver
  • TCP/IP
  • DHCP
  • DNS
  • TCP retransmission/state handling
  • HTTP/1.1
  • HTTPS
  • TLS 1.3

The TLS implementation includes:

  • X25519
  • ChaCha20-Poly1305
  • HKDF
  • SHA-256

Certificate validation isn't implemented yet, so HTTPS is currently closer to curl -k than a browser you should trust with your banking credentials.

The system can actually connect to HTTPS servers and download files.

🌍 Text-mode web browser

Yes, there's a browser.

It takes HTML and converts it into text for the terminal.

It handles things like:

  • Lists
  • Tables
  • <pre>
  • Blockquotes
  • Links
  • Images
  • Video/audio references
  • Forms and inputs

It's obviously not Chromium, but it can browse actual HTTP/HTTPS content.

📦 Package manager

ShellyForever has its own package format called .sin.

Packages contain a whattodo.inst installation script with commands for things like:

  • Creating directories
  • Copying files
  • Registering programs
  • Setting package metadata

For example:

sin install tetris.sin sin uninstall tetris 

Currently there are packages for things like Tetris and a Matrix-style screensaver.

Packages can be installed from local .sin files.

🧑‍💻 Its own programming language

The OS has a programming language called Party.

Party programs use .pa files and can either be interpreted or compiled into .run executables.

The compiler runs on ShellyForever itself.

Party can interact with OS functionality through built-in functions such as:

beep() stake() sgive() fs_read() print() 

The goal is for the OS to become increasingly self-hosting instead of requiring another OS to build everything.

🔊 Audio

There is a PC speaker interface:

beep 1000 100 

I also created a text-based music format called Shelly Sound (.ss).

It contains things like tempo, octave, notes and durations.

The parser currently has a particularly entertaining bug where a tiny change in memory layout can make it start working.

So naturally, I have spent an unreasonable amount of time debugging it.

🔄 The system updater

This is probably the most dangerous feature in the entire OS.

ShellyForever can download system components and update them directly on disk.

The update process can:

  1. Download the new system files
  2. Verify their metadata
  3. Write the new bootloader/stage2/kernel directly to disk sectors
  4. Set the boot pivot
  5. Reboot

⚠️ EXTREMELY IMPORTANT WARNING

DO NOT RUN THE SYSTEM UPDATER ON A DISK CONTAINING WINDOWS OR ANOTHER OPERATING SYSTEM.

The updater writes directly to disk sectors.

It can destroy:

  • Windows bootloaders
  • GRUB
  • Other boot managers
  • Partition boot information
  • Potentially other important disk structures

This is not hypothetical. I've tested the updater on real hardware and it works.

Unfortunately, it also means that if you point it at the wrong disk, things can get very bad very quickly.

I strongly recommend using a dedicated disk/USB drive for testing.

🧪 Current status

Feature Status
Real hardware boot ✅
Custom filesystem ✅
RTL8168 networking ⚠️ 50–85% reliable
TCP/IP ✅
DHCP ✅
DNS ✅
TLS 1.3 ✅
HTTPS ✅
Text browser ✅
Package manager ✅
Party compiler ✅
PC speaker ✅
.ss music ⚠️ Heisenbug
System updater ✅ Works on real hardware — and can destroy other bootloaders
Intel HDA ⚠️ Works in QEMU, hardware still angry
USB 3/xHCI ❌ I surrendered
Certificate validation ❌ Not implemented

🧠 The philosophy

The project is basically:

There is no libc.

There is no Linux underneath.

There isn't a giant collection of existing OS components doing the work.

It's a hobby OS built from the ground up in x86_64 assembly, with heavy AI assistance along the way.

It is absolutely not production-ready.

It is absolutely not secure.

It is absolutely not something I would recommend installing on your main Windows drive.

But it boots.

It has a filesystem.

It has networking.

It speaks TLS.

It has a browser.

It can install programs.

It can compile its own programming language.

And it makes a noise when you tell it to.

So that's ShellyForever.

The source will be available as a read-only educational reference for anyone interested in looking through the implementation.

If you've worked on hobby operating systems, assembly, filesystems, bare-metal networking, or just enjoy watching someone make questionable decisions at 3 AM, I'd love to hear what you think.

https://github.com/TheServer-lab/ShellyForever

Source: r/Assembly_language · by /u/Limp_Arachnid7323

Leave a Reply

Your email address will not be published. Required fields are marked *