"Bare-metal development at the highest privilege level."
0x00-Kernel is a minimalist micro-kernel developed in x86 Assembly (Real Mode). The name references the Ring 0 privilege level (DPL 00), where the code interacts directly with the silicon without the abstractions of a modern operating system. This project was built to explore fundamental concepts of computer architecture, hardware interrupts, and memory management.
- Two-Stage Bootloader: Overcomes the 512-byte MBR limit by loading the Kernel from Sector 2 of the disk into RAM address
0x8000. - VGA Video Driver: Direct manipulation of video memory at
0xB8000for screen clearing and color control. - Keyboard Driver (PS/2): Interception of Scan Codes via I/O Port
0x60with ASCII translation using a lookup table. - Interface Security: Implementation of a logic lock on the Backspace key to prevent visual interface corruption using interrupt
0x10, AH=0x03. - Modularization: Code organized into reusable modules (
.asm) using the%includedirective.
.
├── src/
│ ├── boot/
│ │ └── boot.asm # Stage 1: Boot sector loader
│ └── kernel/
│ ├── kernel.asm # Stage 2: Entry point and main loop
│ ├── keyboard.asm # Input driver (Keyboard)
│ └── screen.asm # Text output functions
├── bin/ # Compiled binaries (.bin)
└── run.bat # Automation script to compile/run in QEMU.
- NASM (Netwide Assembler)
- QEMU (Hardware Emulator)
Simply run the automation script to compile the stages, merge the binaries, and start the emulation:
./run.bat- The BIOS loads the first 512 bytes (
boot.asm) at0x7C00. boot.asmuses interruptint 0x13to read the Kernel from the disk and move it to0x8000.- Control is transferred via
jmp 0x8000, starting the kernel in real mode.
The Kernel operates in polling mode, monitoring the status register of the 8042 controller (Port 0x64). When bit 0 is active, the code reads the Scan Code from port 0x60 and uses a mapping table to convert the electrical signal into a human-friendly ASCII character.
This project was developed as part of independent Low-level studies, focusing on:
- Reverse Engineering and Binary Analysis.
- Low-level Driver Development.
- Register and Stack management in x86 Assembly.
Developed by 0xRobert de Souza Lages.
Interested in high-performance systems, hardware, and what happens under the hood.