VenomOS is a 64-bit educational operating system built from scratch using Assembly (NASM) and Modern C++. It features a custom BIOS bootloader, Long Mode support, a freestanding kernel, interrupt handling, PS/2 keyboard driver, VGA terminal, interactive shell, and a built-in Snake game.
Made possible by BassemMohamed
A 64-bit educational operating system built completely from scratch using Assembly and Modern C++.
No external operating system libraries.
No GRUB.
No Limine.
No UEFI Framework.
Everything boots directly from BIOS.
- Custom Stage 1 Bootloader
- Custom Stage 2 Bootloader
- BIOS Disk Loading
- A20 Line Enable
- Global Descriptor Table (GDT)
- Protected Mode Transition
- Long Mode (64-bit)
- Custom Linker Script
- Freestanding C++17 Kernel
- VGA Text Terminal
- Interrupt Descriptor Table (IDT)
- Hardware Interrupt Handling
- PS/2 Keyboard Driver
- Interactive Command Shell
- Built-in Snake Game
- Fully bootable disk image
- QEMU Ready
BIOS
│
▼
Stage 1 Bootloader
│
▼
Stage 2 Bootloader
│
├── Enable A20
├── Load GDT
├── Switch to Protected Mode
├── Setup Paging
├── Enter Long Mode
│
▼
64-bit Kernel
│
▼
Drivers
│
▼
Interactive Shell
VenomOS
│
├── boot/
│ ├── stage1.asm
│ ├── stage2.asm
│ ├── disk.asm
│ ├── gdt.asm
│ ├── a20.asm
│ └── print.asm
│
├── kernel/
│ ├── kernel.cpp
│ ├── kernel_entry.asm
│ ├── linker.ld
│ ├── interrupts.*
│ ├── keyboard.*
│ ├── shell.*
│ ├── snake.*
│ └── vga.*
│
├── include/
│
├── build/
│
└── Makefile
The bootloader is divided into two stages.
Responsible for:
- Initial BIOS startup
- Disk access
- Loading Stage 2
- Boot validation
Responsible for:
- Enabling the A20 line
- Loading the Global Descriptor Table
- Switching to Protected Mode
- Configuring Long Mode
- Loading the 64-bit kernel
- Jumping into C++ code
The kernel is written in freestanding C++17.
Current responsibilities include:
- Kernel initialization
- Terminal setup
- Driver initialization
- Interrupt initialization
- Launching the interactive shell
Features:
- PS/2 keyboard support
- Interrupt driven input
- Character translation
- Shell integration
- Snake game controls
The VGA subsystem provides:
- Colored text output
- Cursor management
- Screen clearing
- Formatted terminal output
Implemented features include:
- Interrupt Descriptor Table (IDT)
- Assembly interrupt stubs
- C++ interrupt handlers
- Keyboard IRQ handling
- Timer support
The operating system includes a simple interactive shell.
Current commands:
| Command | Description |
|---|---|
| help | Show available commands |
| clear | Clear the screen |
| version | Show OS version |
| whoami | Display current user |
| snake | Launch Snake game |
A simple built-in Snake implementation demonstrates:
- Real-time keyboard input
- Screen rendering
- Game loop
- Collision detection
- Integration with the kernel shell
- NASM
- x86_64-elf GCC Toolchain
- x86_64-elf LD
- GNU Make
- QEMU
makemake run- NASM Assembly
- C++17
- Freestanding Environment
- Custom Linker Script
- BIOS Boot
- x86_64 Architecture
- QEMU
Implemented:
- Bootloader
- Long Mode
- Kernel
- VGA
- Keyboard
- Interrupts
- Shell
- Snake
Planned:
- Physical Memory Manager
- Heap Allocator
- Virtual Memory Manager
- FAT File System
- ATA Driver
- Process Scheduler
- Multitasking
- User Mode
- ELF Loader
- System Calls
VenomOS is an educational operating system project created to explore low-level software development, operating system internals, bootloaders, CPU architecture, memory management, interrupt handling, and kernel programming from scratch.
MIT License
Made with Bassem Mohamed using Assembly and Modern C++



