Syscall 2: Firmware, home

SignalChapter 8: Scarcity

64SHARED LINE

The task

P must receive X plus Y, and Q must receive X minus Y. Both streams reach dx on one wire.

mx, r1, and r2 are SC-1s: register A only, 8 lines. dx is a standard core cut to 8 lines.

The board

The board of SHARED LINE4 cores: mx, r1, r2, and dx. Inputs X and Y; outputs P and Q.mxSC-1 8 LINESr1SC-1 8 LINESr2SC-1 8 LINESdxSC-2 8 LINESP0P1P2P0P1P0P1P0P1P2XYPQ
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

Two streams share one wire and the reader knows each by its turn; the order decides whether dx fits in 8 lines.

Hints

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

Hint 1Show

When two streams share one wire, the reader knows each value by its turn.

Hint 2Show

The order on the wire decides how many lines dx needs.

Hint 3Show

SUB B takes back an ADD B, so two of them after X plus Y leave X minus Y.

Solution

Reveal the Full SolutionThe complete program for SHARED LINE. 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.

mxSC-1 lite

IN P1
OUT P2
IN P0
OUT P2

r1SC-1 lite

IN P0
OUT P1

r2SC-1 lite

IN P0
OUT P1

dxSC-2 standard

IN P0
MOV B, A
IN P0
ADD B
OUT P1
SUB B
SUB B
OUT P2
CYCLES
436
at par
ENERGY
3276
at par
NODES
4
at par
INSTRUCTIONS
16
at par