Computer Organization & Assembly Language (COAL)
SUPER MARIO (X86)
Fully playable Mario clone engineered entirely in x86 Assembly — register by register.
OVERVIEW
A fully playable, console-based recreation of Super Mario Bros engineered entirely from scratch in x86 Assembly. Features platforming physics, dynamic enemies, asynchronous sound, custom power-ups, and persistent file I/O — all implemented at the register level.
KEY HIGHLIGHTS
- 01Manual CPU register management (EAX/EBX/ECX stack) for game loop, physics, and state transitions
- 02Custom Assembly macros (mGotoxy, mSetColor, mWriteStr) for direct console buffer manipulation
- 03WinMM async sound (SND_ASYNC) without blocking the main thread; precise keyboard interrupt handling
TECHNICAL IMPLEMENTATION
Low-Level Architecture & Register Management
Programmed strictly in x86 Assembly utilizing the Irvine32 library. Manually managed CPU registers (EAX, EBX, ECX, etc.), stack pointers, and memory offsets to control the game loop, physics calculations, and state transitions such as ShowGameOverScreen and BossWinSequence. Every frame update required explicit register save/restore sequences.
Direct Console Graphics & Custom Macros
Bypassed high-level graphics engines by writing custom Assembly macros — mGotoxy, mSetColor, mWriteStr — to directly manipulate console output buffers. This allowed real-time, flicker-free rendering of levels, UI elements, and character sprites using ASCII/ANSI text manipulation at the hardware output layer.
Hardware-Level Audio & I/O
Integrated the Windows Multimedia API (winmm.lib) via external procedure calls to implement asynchronous, non-blocking sound effects (SND_ASYNC). Engineered precise keyboard interrupt handling for responsive player jumping and movement. Wrote low-level disk access subroutines (SaveDataToFile) for persistent game state and score tracking.
Custom Game Logic
Engineered specialized memory states to implement a custom rule set: initialized the player base state with 5 lives and coded logic for a unique Golden Mushroom entity. Implemented timing loops and point arithmetic to grant 1000 bonus points and a precise 5-second invincibility window upon item collision.
TECH STACK