Syscall 2: Firmware, home

SignalChapter 7: Frames and loops

50ACKNOWLEDGE

The task

P must receive a copy of X. The line from tx to rx is locked and loses values.

Every third value it carries comes out as a 0, starting with the first. X is from 1 to 99.

The board

The board of ACKNOWLEDGE3 cores: tx, ln, and rx. Locked: ln. Inputs X; outputs P.txSC-2 15 LINESlnLOCKEDS: IN P0XCHJZ DNSUB 1XCHOUT P1JMP SDN: ADD 2MOV B, ASUB BOUT P1rxSC-2 5 LINESP0P1P2P0P1P0P1P2XP
The board as the puzzle screen lays it out. Cyan pins read, lemon pins write, violet pins go both ways. On a narrow screen, scroll the board sideways to see all of it.

Key idea

A locked lossy line turns every third value into a 0; the receiver acks and the sender resends.

Hints

Each hint goes a step further than the one before. Open them one at a time.

Hint 1Show

rx can tell a lost value because X is never 0.

Hint 2Show

Have rx answer tx after every value, so tx knows whether to send it again.

Hint 3Show

tx must keep the value in B until rx says it arrived.

Solution

Reveal the Full SolutionThe complete program for ACKNOWLEDGE. Open it only when you want the answer.

The reference program

The game's own solution. It passes every test and scores exactly par on every benchmark.

txSC-2 standard

IN P0
MOV B, A
R: MOV A, B
OUT P1
IN P2
JZ R

rxSC-2 standard

S: IN P0
OUT P2
JZ S
OUT P1
CYCLES
809
at par
ENERGY
3180
at par
NODES
2
at par
INSTRUCTIONS
10
at par