Case study · Fall 2025
Custom 64-bit Operating System
A small operating system that boots from hand-written assembly into a 64-bit C kernel and interactive shell.
- Discipline
- Systems programming · OS internals
- Technology
- C · x86 Assembly · QEMU · GDT · Page Tables
boot: entering long mode
gdt: loaded
paging: initialized
kernel: ready
akkash-os> _Overview
I built the boot path from scratch, moving the processor through real mode, 32-bit protected mode, and 64-bit long mode before handing execution to a C kernel.
System map
How the pieces connect
The challenge
What made the problem worth solving
At boot there is no runtime, operating system, or safety net. CPU state, descriptor tables, paging, and memory layout all have to be correct before higher-level code can run.
The approach
Turning the problem into an engineering plan
- 01
Wrote an x86 assembly bootloader and explicitly managed each processor-mode transition.
- 02
Configured the Global Descriptor Table and page tables required for long-mode operation.
- 03
Used QEMU for short debugging cycles while developing an interactive kernel shell.
Result
The system boots reliably into a 64-bit kernel shell, demonstrating the entire path from the first instruction to an interactive program environment.