Systems

Bare-Metal Snake Game Bootloader

A two-stage x86 bootloader that loads a Snake game from a floppy image and runs it in VGA text mode with no OS, kernel or C runtime. Each stage logs a checkpoint over the COM1 serial port, so a headless QEMU run proves the full chain from the INT 13h disk read to the game-over collision.

Stack
NASM assembly, x86 real mode, QEMU
Code
github.com/ADM1SH/bootloader-snake

Overview

Install

./build.sh

This runs, equivalently:

nasm -f bin boot.asm -o boot.bin        # stage 1: 512-byte MBR
nasm -f bin stage2.asm -o stage2.bin    # stage 2: the game
truncate -s 4096 stage2.bin             # pad stage2 to 8 sectors
cat boot.bin stage2.bin > snake.img     # 512 + 4096 = 4608-byte floppy image

Docs

The full documentation covers how it works, configuration and results.