TIS-100: small programs, blocking ports and explicit protocols

TIS-100 gives each compute node a small instruction set, an accumulator and a saved register. Nodes exchange integers through directional ports, and a transfer blocks until its counterpart is ready.

My solution archive contains nineteen puzzles with per-node code, layouts and source screenshots. It is a record of solutions and reasoning, not a benchmark suite: the archived screenshots do not establish verified cycle scores or optimality.

The useful constraints are easy to inspect. There is little room for hidden state, and a blocked port makes a dependency between two nodes visible.

Routing is part of the program

An early puzzle only asks for input streams to reach their outputs. A forwarding node can be as small as:

MOV UP, DOWN

A corner changes the destination port:

MOV UP, LEFT

The instruction is simple, but placement decides which transfers can proceed independently and which share a bottleneck. Reading the source for one node is not enough to explain the whole program; its neighbours determine when it can advance.

The self-test layout is a compact example of that relationship.

Consume the unused input too

The signal multiplexer selects between two inputs or adds them. One branch forwards the right input and explicitly discards the left:

B: MOV RIGHT, DOWN
MOV LEFT, NIL

Discarding is part of the protocol. Each selection consumes a corresponding pair of values. Leaving the unused value waiting would block its producer or misalign a later selection with the wrong input pair.

This is the detail that makes the example useful: output correctness depends on consuming the input stream consistently, not only on computing the selected value.

State competes with intermediate results

The edge detector compares successive samples and reports whether the absolute difference crosses a threshold. The computation is split between a node retaining the previous sample and another classifying the difference.

The classification stage is short:

MOV LEFT, ACC
JGZ POS
NEG
POS:
SUB 10
JLZ ZERO
MOV 1, DOWN
JMP END
ZERO:
MOV 0, DOWN
END:

The SAV and SWP operations in the preceding stage matter because the saved register has to retain the previous sample while the accumulator participates in the next calculation. The complete edge-detector entry includes the layout and both stages; the isolated snippet cannot explain their timing on its own.

A sequence needs a boundary

The sequence reverser uses stack storage plus a count passed between nodes. One part pushes values; another drains exactly the corresponding number and signals completion.

The count and completion signal define the protocol. If the producer begins a new sequence before the consumer finishes the old one, correct push/pop operations can still produce the wrong output. The boundary between batches is state that has to be represented somewhere.

Division without a divide instruction exposes a different constraint. The divider entry distributes repeated subtraction and quotient bookkeeping across nodes. It is an inspectable algorithm, not a claim about efficient hardware division.

What the archive demonstrates

The exercise is useful for reasoning about blocking communication, small state machines and producer/consumer protocols. It does not establish performance expertise in a real CPU, GPU or distributed system; the game's timing and machine model are its own.

The archive's next verification step is replaying the transcribed programs in the game and recording completion results. Until then, the code, diagrams and screenshots are evidence of the documented approach, with transcription and execution checks kept distinct.