Why this project?
Games like Turing Complete and Foundry-5 teach you to write assembly. But the more valuable skill is reading it — looking at a few lines of unfamiliar machine-level code and knowing what the CPU will do. This project trains that exact skill through progressive puzzles on a simple, learnable instruction set.
What is it?
Op-Code is a 10-level puzzle game. Each level presents a short program in OPCODE-1, a fictional 3-register, 8-bit instruction set. Your job: read the program, trace it in your head, and predict the final value of a target register. Submit your answer and verify it against the actual step-by-step execution trace.
How does it work?
The OPCODE-1 CPU has four 8-bit registers (A, B, C, D) and a program counter. The emulator loads the instruction at PC, performs the operation, increments PC, and repeats until HALT. All arithmetic wraps at 8 bits (mod 256). You can reveal the full trace at any time — it shows register state after every instruction.
Instructions: LOAD r, n (constant), ADD r1, r2, SUB r1, r2 (8-bit wrap), MOV r1, r2, SWP r1, r2, SHL r, n / SHR r, n (shifts), AND / OR / XOR r1, r2 (bitwise), JMP label, JZ r, label, HALT.