nexOS
| nexOS | |
|---|---|
![]() Yazeed Omari, creator of nexOS | |
| Type | Hobby operating system |
| CPU | i386, 32-bit protected mode |
| Kernel | Monolithic, ring 0 only |
| Memory | Paging + bitmap allocator |
| Storage | ATA/IDE PIO + FAT32 |
| Network | RTL8139, ARP/TCP/HTTP |
| Display | VESA framebuffer, 800×600, VMware VGA |
| Theme | Alpine Linux dark (#1E1E2E, #89B4FA) |
| Image | nexos.img, 64 sectors (32 KiB raw) |
| Source | boot.asm, kernel_entry.asm, kernel.c, ata.c, fat32.c, net.c, io.h |
| Author | Yazeed Omari |
This article documents the current tree (paging + ATA/FAT32 + RTL8139 phases). The old “v1.8, no paging, no filesystem” description is obsolete. See Build for how to build nexos.img and nexOS on GitHub for source.
Contents[hide] |
Summary
nexOS is a hobby operating system kernel written in C and x86 assembly. It boots via BIOS, initializes a VESA framebuffer, enables paging, and renders a graphical desktop with windows, Paint, a terminal, and a browser. It includes a FAT32 file system over ATA/IDE PIO, a 32-bit paging memory manager, an RTL8139 Ethernet driver with TCP/IP networking, and an HTTP client.
This is a hobby project. It is not a production operating system.
What nexOS is not
There is no userspace, no privilege separation, and no system-call interface. Everything — window manager, drivers, terminal, browser — runs in ring 0 as C functions called from main(). There is no scheduler in the Unix sense; there is a 100 Hz PIT tick used for polling and redraw timing (see Interrupts). There is no VFS layer beyond FAT32, no USB, no SMP, no power management beyond a QEMU ACPI shutdown port.
System overview
| Component | Implementation | Details |
|---|---|---|
| Boot | NASM MBR bootloader | BIOS INT 13h, 60 sectors to 0x8000, VESA probe, GDT, CR0.PE |
| Kernel | 32-bit protected-mode C + asm | kernel_entry.asm _start → _main → main(), kernel.c ~1098 lines |
| Paging | Page directory + tables, CR0.PG | Identity map 0–16 MiB + LFB, bitmap allocator, kmalloc/kfree |
| Graphics | VESA framebuffer, VMware VGA | 800×600, 24bpp preferred, double-buffered at 0x200000 |
| Disk I/O | ATA/IDE PIO (ata.c) | LBA28 PIO, ports 0x1F0–0x1F7 |
| File System | FAT32 BPB parsing (fat32.c) | FAT traversal, LS/CAT, 1 MiB disk buffer |
| Network | RTL8139, ARP/TCP/HTTP (net.c) | I/O base 0x300, IRQ11, 4×1536 packet buffers |
| Browser | Browser window + URL bar | HTML-lite tag stripper, 44×8 text view |
| Desktop | Window manager, Paint, terminal | Alpine theme, START menu, PS/2 input |
| Input | PS/2 mouse + keyboard, IDT | Vectors 32/33/44, 8259 remap, PIT 100 Hz |
| Build | GCC -m32 -ffreestanding, NASM, ld, objcopy | Make + QEMU with rtl8139 |
Terminal commands
Open the terminal from the START menu and type a command. Classic commands (HELP, ABOUT, CLEAR, ECHO, CREDITS, SUDO, YAZEED, OMARI, NEXOS, HELLO, SECRET, GOD) still reply with canned text. New disk and net commands are wired to real drivers:
| Command | Description |
|---|---|
| HELP | Display available commands |
| ABOUT | About nexOS |
| CLEAR | Clear terminal |
| ECHO | Echo text |
| CREDITS | Project credits |
| SUDO | Sudo command (joke reply) |
| LS | List files (ATA disk via FAT32) |
| CAT FILE | Display file contents (fat32_read_file) |
| PING | Send ARP request to gateway |
| FETCH | Execute HTTP GET, load result into browser |
| BROWSER | Open/close the browser window |
| YAZEED / OMARI / NEXOS / HELLO / SECRET / GOD | Easter-egg replies |
Desktop features
- START menu (bottom-left): Terminal, Notepad, About, Browser, Shutdown.
- Paint: draw with the left mouse button (80×50 cell canvas).
- Terminal: type commands and press Enter; 6-line scrollback.
- Browser: HTTP browser with URL bar (click BROWSER in START menu or type BROWSER).
- Notepad: text input buffer.
- Mouse: PS/2 mouse with 2× gain, edge-clamped, 4-deep press queue.
- File Manager: browse ATA disk files via FAT32 (NAME/TYPE list).
File layout
boot.asm # MBR bootloader (BIOS int 0x13) kernel_entry.asm # Protected-mode entry (_start, _isr32/_isr33/_isr44) kernel.c # Desktop, terminal, paging, drivers, browser (~1098 lines) ata.c / ata.h # ATA/IDE PIO disk access fat32.c / fat32.h # FAT32 file system net.c / net.h # RTL8139, TCP/IP, HTTP client, DNS io.h # I/O primitives + string functions link.ld # ELF linker script (. = 0x8000) Makefile # Build system nexos.img # Bootable disk image (built, 64 sectors)
