Nullcore

Nullcore is a puzzle about writing tiny assembly programs for a made-up microcontroller. You read numbers from input pins, do arithmetic in a register called ACC, and write answers out to output pins. Each level gives you a target behavior and three or four test cases — when your program passes all of them, the level is solved.

The machine

The microcontroller has four input pins (IN0–IN3), four output pins (OUT0–OUT3), and two scratch registers: ACC (where arithmetic happens) and DAT (a second slot, used by the last level to remember things between runs). Inputs are decided by the level; your job is to set the outputs.

Instruction reference
MOV src dstCopy a value. src can be IN0-3, OUT0-3, ACC, DAT, or a number. dst can be OUT0-3, ACC, or DAT.
ADD valACC = ACC + val
SUB valACC = ACC - val
MUL valACC = ACC * val
AND valACC = ACC bitwise-AND val
OR valACC = ACC bitwise-OR val
NOTACC = bitwise NOT of ACC (8-bit)
JMP labelUnconditional jump to label.
JEZ labelJump if ACC is equal to zero.
JNZ labelJump if ACC is not zero.
JGZ labelJump if ACC > 0.
JLZ labelJump if ACC < 0.
NOPDo nothing.
HALTStop execution.
label:Define a jump target on its own line.
; commentEverything after a semicolon is ignored.
How to run code
  • Step runs one instruction so you can watch ACC and OUT change.
  • Run executes until HALT or 100 instructions (loop guard).
  • Reset clears registers and outputs but keeps your code.
  • Test runs your program against every test case and checks the outputs. Pass all of them and the level is complete.