Modified on 2016/04/26 20:23 by — Categorized as: Uncategorized

BOX-256 is a game played by writing assembly code to pass graphics tests.

Table of Contents [Hide/Show]



BOX-256 was released for Windows and as an in-browser game by Juha Kiili in April 2016. The first release includes 4 puzzles. v1.1 adds another 8 puzzles and two new opcodes.



The BOX-256 virtual CPU supports 13 instructions:

MOV A B Ccopy C cells from A to B
PIX A Bdisplay a pixel of colour B in location A
FLP A B Cexchange C cells at A and B
ADD A B CSet C = A + B
SUB A B CSet C = A - B
MUL A B CSet C = A * B
DIV A B CSet C = A / B
MOD A B CSet C = A % B (added in v1.1)
JMP Ajump to the instruction at A
JEQ A B Cjump to the instruction at C if A = B
JNE A B Cjump to the instruction at C if A != B (added in v1.1)
JGR A B Cjump to the instruction at C if A > B
THR Astart a new thread at A

There are three different addressing modes:


The instruction pointer is stored in address @FF. The instruction pointer for any additional threads is stored at @FE, @FD, etc. Edit


The following example displays a checkerboard pattern:

FLP @16 @17 001
PIX 000 @17 000
ADD 010 @05 @05
JGR @05 00F @00
ADD 001 @05 @05
JMP @04 002 003


Inspired By


External Links