32-bit Protected Mode OS
NovumOS is a simple operating system that successfully boots from 16-bit real mode into 32-bit protected mode with a working console!
Features
- ✅ 32-bit Graphics - High-resolution Linear Framebuffer (LFB) with Double Buffering and Dirty Rectangles
- ✅ Dynamic Resolution - Change screen resolution on-the-fly with the
rescommand - ✅ Preemptive Multitasking - Round-robin scheduler with process lifecycle management (
ps,kill) - ✅ SMP (Symmetric Multiprocessing) - Support for multiple CPU cores with task balancing and work-stealing
- ✅ Relocated Kernel - Loaded at 1MB (0x100000) for maximum stability and compatibility
- ✅ A20 Line Support - Full access to high memory via BIOS & Fast A20 activation
- ✅ LBA Disk Support - Robust disk loading using Logic Block Addressing for larger kernels
- ✅ VGA Emulation Layer - High-speed text console with wrapping and scrolling over 32-bit graphics
- ✅ IDT Support - Interrupt Descriptor Table with exception handling
- ✅ PIT Timer - System timer (1kHz) for precise timing and uptime
- ✅ RTC Driver - Real-time clock support for date and time
- ✅ Keyboard Driver - Full keyboard input support with interrupts (Shift, CAPS, NUM)
- ✅ Command Shell - Interactive console with Tab Autocomplete, Command History (persisted to disk), and cycling matches
- ✅ Piping & Redirection - Support for pipes (
|) and output redirection (>,>>) - ✅ FAT12/16 Support - Native disk support for ATA drives with Long File Name (LFN) and Hidden Files support
- ✅ PCI Bus Enumeration - Support for scanning and identifying hardware devices on the PCI bus
- ✅ Nova Language v0.24 - Integrated custom interpreter with multi-line REPL, mandatory semicolons, modular system, and context-aware tab completion
- ✅ Filesystem Overhaul - Native implementation of
create_file,delete,rename, andcopydirectly in the Nova interpreter - ✅ Embedded Scripts - Built-in commands written in Nova (
syscheck,hello) - ✅ Native Commands - Native implementation of
installanduninstallfor Nova scripts - ✅ Recursive FS -
cpanddeletenow support recursive directory operations throughout the shell - ✅ Hierarchical Paths - Full support for Current Working Directory (CWD), absolute/relative paths, and quoted arguments for spaces
- ✅ Serial Terminal - Support for QEMU
-nographicmode with full bidirectional shell interaction
Building and Running
Requirements:
- NASM assembler
- Zig compiler (v0.12+)
- QEMU emulator
Build:
.\build.batRun:
qemu-system-i386 -drive format=raw,file=build\os-image.bin -serial stdioRun with Custom Res (BGA):
qemu-system-i386 -drive format=raw,file=build\os-image.bin -drive format=raw,file=disk.img -nographicAvailable Commands
help- Show available commands (auto-synced)res <w> <h>- Change resolution dynamically (e.g.,res 800 600)clear- Clear screenmatrix- Enterprise-grade Matrix screensaver (resolution-aware)about- Show OS information (Version, Architecture)nova- Start Nova Language Interpretersyscheck- Run system health check (Embedded Nova Script)uptime- Show system uptime and current RTC timetime- Show current date and timereboot- Reboot systemshutdown- Shutdown system (ACPI support)ls,la- List files (la shows hidden files)pwd- Print current working directorylspci- List PCI devices and hardware bridgescd <path>- Change directory (supports..,/, and relative paths)lsdsk- List storage devices and partitionsmount <d>- Select active disk (0/1 or ram)touch <file>- Create file on disk (Supports LFN)mkdir <dir>- Create directory (Supports LFN)cp <src> <dst>- Copy file or folder recursivelymv <src> <dst>- Move or rename file/foldercat <file>- Show file contents (Raw)more <file>- Paginated file viewer with scrolling and wrappingedit <file>- Open built-in text editorrm <file>- Delete file/folder (recursive support)history- Show command historymkfs-fat12- Format disk with FAT12 filesystemmkfs-fat16- Format disk with FAT16 filesysteminstall- Install a Nova script as a system commanduninstall- Remove an installed Nova commandecho <text>- Print text (supports pipes)top- Real-time CPU and Task Monitorps- List active system processeskill <pid>- Terminate a running processmem- Test memory allocatorsmp-test- Test global task queue across cores (Debug only)stress-test- Run heavy math on AP cores (Debug only)
SDK (Software Development Kit)
NovumOS includes a complete SDK for developing user-mode applications in C or Zig.
Quick Start:
cd sdk/examples/hello_world ../../build-app.bat main.c hello.elf # Windows ../../build-app.sh main.c hello.elf # Linux
Available APIs:
nv_print()- Print text to consolenv_getchar()- Read keyboard inputnv_set_cursor()- Position cursornv_clear_screen()- Clear displaynv_exit()- Exit program
See sdk/README.md for full documentation and examples.
Nova Language
A powerful statement-based interpreted language built into NovumOS. Version 0.23-beta.6 introduces Modular Sub-systems, Multi-line REPL, Mandatory Semicolons, and Context-aware Tab Completion.
Features:
- Variables:
set string name = "Value";,set float pi = 3.14159; - Arithmetic:
+,-,*,/,%with full support for integer and floating point math. - Precision Math: Built-in high-precision
sin()andcos()using Bhaskara I approximation. - Math Functions:
abs(),min(),max(),random(),rad(),deg() - Filesystem:
create_file,write,mkdir,delete,copy,rename,read,size,exists - Interactive:
input()for reading user input,set_color()for UI control. - System:
reboot();,shutdown();,exit(); - Scripting:
argc(),args(n)with full argument persistence.
Architecture
BIOS → Bootloader (16-bit) → Protected Mode Switch → Copy (0x10k to 1MB) → Kernel (32-bit) → Zig Modules
Bootloader:
- Loads kernel via LBA (Logical Block Addressing)
- Activates A20 Line (BIOS + Port 0x92)
- Performs VBE mode detection and validation
- Switches CPU to protected mode
- Relocates kernel to 1MB in 32-bit mode for EBDA safety
Kernel:
- Written in x86 Assembly and Zig
- Interrupt management (IDT & PIC remapping)
- System timer (PIT) and Real-Time Clock (RTC)
- 32-bit Linear Framebuffer (LFB) drawing logic
- Keyboard driver (IRQ1 based)
- Command shell with persistent history (hidden
.HISTORY) and LFN autocomplete - Preemptive Scheduler - Multi-process management with time-slicing
- SMP Core Balancing - Handshake-based AP initialization and global task distribution
- Integrated Nova Interpreter
Roadmap
Current progress (v0.24)
- Graphic mode support (VBE/BGA) (32-bit LFB, dynamic resolution)
- Kernel Relocation to 1MB (EBDA safety, A20 activation)
- PCI Bus Enumeration (Config space access, device ID database)
- Modular Sub-systems (sys, math mod)
- Multi-line REPL (Accumulator buffer, continuation prompt)
- Mandatory Semicolons (Complete statement tracking)
- Context-aware Tab Completion (Import detection)
- Enhanced Error Handling (Soft errors in REPL)
- Full Floating Point Engine
- High-Precision Trig (Bhaskara I formula)
- Informative REPL (Descriptive status strings)
- Advanced VM FS Functions (Native delete, rename, copy)
- Multicore Support
- FAT32 Support
- IDT (Interrupt Descriptor Table)
- Timer (PIT) & Precise Sleep
- RTC Driver (Date/Time)
- Keyboard Interrupts (Extended keys, Shift/Caps/Num)
- Command Shell with LFN Tab Autocomplete
- Persistent command history on disk (Hidden
.HISTORY) - FAT12/FAT16 file system with LFN and Hidden Files
- Recursive Directory Operations (cp, rm)
- Hierarchical Path Support & CWD (Absolute/Relative paths, cd, pwd)
- Built-in Text Editor (
edit) - Dynamic Shell Commands table
- Nova Language (Multi-line REPL, Modules, Mandatory Semicolons, Context-aware Tab)
- Native script management (install, uninstall)
- File Management improvements (LFN create/read/delete)
- PCI Bus Enumeration
- Preemptive Multitasking
- SMP Support (4 cores tested)
- Process Management (kill, exit, return stubs)
- Paging & Virtual Memory Management (Basic implementation)
- User Mode (Ring 3) (Experimental ELF loading)
- Security Fixes (CVE-2026-40317)
- GitHub CI/CD (Automated build and build-test validation)
Future improvements
- Improved User Mode & Syscall API
- PS/2 Mouse Support
- Simple Sound Driver (PC Speaker)
- Network Stack (Initial research)
Author
MinecAnton209
License
See LICENSE file for details.
Made with ❤️ in x86 Assembly & Zig