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> _

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.

16 → 32 → 64 bitBoot stages
CKernel language
x86 AssemblyBootloader
QEMUTest environment

How the pieces connect

01Assembly bootloader
02GDT · paging · long mode
03C kernel + shell

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.

Turning the problem into an engineering plan

  1. 01

    Wrote an x86 assembly bootloader and explicitly managed each processor-mode transition.

  2. 02

    Configured the Global Descriptor Table and page tables required for long-mode operation.

  3. 03

    Used QEMU for short debugging cycles while developing an interactive kernel shell.

The system boots reliably into a 64-bit kernel shell, demonstrating the entire path from the first instruction to an interactive program environment.

Next case studyMalware triage tool