This project implements a console-based binary conversion puzzle game in MIPS assembly. Players progress through 10 levels of mixed binary→decimal and decimal→binary challenges, earning points for every completed level.
- Random puzzle generation with an LCG-based PRNG
- Full-screen board rendering that tracks puzzle progress
- Input validation for decimal and 8-bit binary answers
- Level-based scoring with cumulative totals
- Replay support without restarting the emulator
| File | Description |
|---|---|
main.asm |
Entry point, game loop, replay handling, and global data |
random.asm |
Linear congruential generator for repeatable randomness |
puzzle.asm |
Puzzle storage helpers and generation routines |
drawboard.asm |
Text-mode board renderer and screen clearing |
input.asm |
Player prompt and input validation logic |
validation.asm |
Conversion helpers and puzzle answer checking |
score.asm |
Score calculation utilities |
utils.asm |
Basic I/O helpers used throughout the game |
The game keeps puzzle data in an 8-byte structure per entry and updates puzzle status as the player progresses through each level.
- Open the project in a MIPS simulator such as MARS or QtSPIM.
- Load all
.asmfiles into the simulator. In MARS you can useFile → Openand select multiple files, or use theAssemblebutton after adding them to the current project. - Assemble the program to resolve all cross-module labels.
- Start execution at the
mainlabel (the default entry point). - Follow the on-screen prompts to solve each puzzle. Input validation will re-prompt on invalid entries.
- The renderer uses ASCII characters and Unicode glyphs (✓/✗). If your terminal emulator does not support these glyphs you can update the message strings in
main.asmanddrawboard.asm. clear_screenprints a sequence of newline characters to simulate clearing the console.- Random seed initialization uses syscall 30; emulators that do not implement it will fall back to a default seed.