glowieStopper boots into a 32-bit protected mode kernel with:
- VGA text console (80×25, hardware cursor)
- PS/2 keyboard input with echo
- Serial console (COM1, 38400 baud, 8N1)
- PIC-remapped interrupts (IRQ0=timer @ 100 Hz, IRQ1=keyboard)
- Ctrl+P panic shutdown (ACPI poweroff via port 0x604)
- Shift for uppercase letters
Requirements: none. No Python, no C compiler, no external assembler, no Make.
The only build artifact needed is ./build/tools/seed — our own 331-byte
hand-crafted x86_64 ELF. If it is missing, bootstrap it once from
tools/hex2bin.hex and toolchain/seed/seed.hex (see tools/README.md).
cd /path/to/glowieStopper
./bootstrap.shWhich is literally:
./build/tools/seed < boot/image.hex > build/glowieStopper.imgOutput: build/glowieStopper.img — a raw disk image (MBR + 32-bit PM kernel).
| Region | Offset | Size | Description |
|---|---|---|---|
| Sector 0 (MBR) | 0x000 | 512 B | Real mode: load kernel, enter PM |
| Sectors 1–4 | 0x200 | 2 KB | 32-bit PM kernel code + data |
| Sectors 5–16 | 0xA00 | 6 KB | Zero padding (BIOS reads 16 sectors) |
qemu-system-x86_64 -drive file=build/glowieStopper.img,format=rawqemu-system-x86_64 -drive file=build/glowieStopper.img,format=raw -serial stdioThis mirrors all serial output to your terminal. Keyboard input in the QEMU window is echoed both on VGA and serial.
qemu-system-x86_64 -drive file=build/glowieStopper.img,format=raw -display none -serial stdio# GTK (recommended on Linux)
qemu-system-x86_64 -drive file=build/glowieStopper.img,format=raw -display gtk -serial stdio
# SDL
qemu-system-x86_64 -drive file=build/glowieStopper.img,format=raw -display sdl -serial stdio| Key | Action |
|---|---|
| Any letter | Echo to VGA + serial |
| Shift+letter | Uppercase letter |
| Enter | New line + prompt |
| Backspace | Delete previous character |
| Tab | Insert 4 spaces |
| Ctrl+P | Shutdown the OS (ACPI off) |
| Address | Size | Purpose |
|---|---|---|
| 0x7C00–0x7DFF | 512 B | MBR (sector 0) |
| 0x7E00–0x85FF | ~2 KB | Kernel code + strings + scan table |
| 0x9C00↓ | ~1 KB | Stack (grows down) |
| 0xA000–0xA7FF | 2 KB | IDT (256 × 8-byte entries) |
| 0xB000–0xB0FF | 256 B | Scan code lookup table (US QWERTY) |
| 0xB100–0xB10F | 16 B | State: tick count, ctrl/shift, cursor |
| 0xB110–0xB20F | 256 B | Keyboard ring buffer |
| 0xB8000 | 4 KB | VGA text framebuffer (80×25) |
- BIOS loads MBR (sector 0) at 0x7C00
- MBR prints "glowieStopper booting..." via BIOS INT 10h
- MBR loads 16 sectors via BIOS INT 13h to 0x7E00
- MBR enables A20 line (fast method, port 0x92)
- MBR loads GDT (null + code32 + data32)
- MBR sets PE bit in CR0 → protected mode
- MBR far-jumps to 0x0008:0x7E00 (kernel entry)
- Kernel disables interrupts, sets segment registers + stack
- Kernel initializes COM1 serial (38400 8N1)
- Kernel remaps PIC (IRQs 0–15 → INT 32–47)
- Kernel programs PIT channel 0 at 100 Hz
- Kernel builds 256-entry IDT at 0xA000
- Kernel installs timer ISR (INT 32) and keyboard ISR (INT 33)
- Kernel copies scan code table to 0xB000
- Kernel clears VGA screen, prints banner
- Kernel sends banner to serial
- Kernel enables interrupts (STI)
- Main loop: HLT → process key buffer → echo → repeat
- Scrollback buffer — keep history of scrolled-off lines
- Command parsing — interpret typed lines as built-in commands
help— show available commandsmem— display memory mapuptime— show tick countreboot— triple-fault resetshutdown— same as Ctrl+P
- More scan codes — F1–F12, arrow keys, Delete, Home/End
- Color themes — toggle VGA color attributes via command
- RTC clock — read CMOS RTC for date/time display
- Long mode (64-bit) — page tables, 64-bit GDT, jump to kernel64
- Physical memory manager — bitmap allocator for available RAM
- Virtual memory — proper page fault handling
- ATA PIO disk driver — read/write sectors in protected mode
- Simple filesystem — flat file table on disk
- Bootstrap assembler in hex —
tasm_stage1.hexto bridge seed → tasm
- tLang compiler — self-hosting compiler (codegen ~90% done)
- Preemptive multitasking — TSS, context switching, scheduler
- Userspace — ring 3 processes, syscall interface
- GUI — framebuffer graphics via VESA/VBE
- Self-hosting — glowieStopper builds itself on glowieStopper
| File | Purpose |
|---|---|
boot/image.hex |
Full boot image as commented hex — fed to seed to produce build/glowieStopper.img |
boot/boot.hex |
Original simple MBR (print + halt demo) |
bootstrap.sh |
Thin POSIX-sh wrapper: seed < boot/image.hex > build/glowieStopper.img |
boot/stage1.asm |
Reference: MBR design (NASM syntax) |
boot/stage2.asm |
Reference: A20, E820, VESA, GDT, PM entry |
boot/stage3.asm |
Reference: page tables, long mode, ATA PIO |
build/tools/hex2bin |
326-byte hex→binary converter |
build/tools/seed |
331-byte bootstrap assembler |
Every byte in the boot image is stored verbatim in boot/image.hex
and fed through seed (our own 331-byte ELF). There is no assembler (NASM/GAS),
no linker, no C compiler, no Python, and no Make involved anywhere in the
build chain. The .asm files are reference documentation only.
QEMU is used as a testing convenience — it is not part of the build chain.