Syscall 2: Firmware, home

SignalChapter 12: Shared buses

91BUS STOP

The task

a, b, and c share one bus. X arrives at a.

P and Q must each receive every value of X, in order.

The board

The board of BUS STOP3 cores: a, b, and c. Inputs X; outputs P and Q. 1 shared bus.aSC-2 4 LINESbSC-2 15 LINEScSC-2 15 LINESP0P1P0P1P0P1XPQ
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

The bus: one value goes to one reader, so X goes out twice, once for each.

Hints

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

Hint 1Show

A value on the bus goes to one core only: the first to read it.

Hint 2Show

When b and c both read, the bus gives the value to b, the one farther left.

Hint 3Show

So a sends each X twice, once for b and once for c.

Solution

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

aSC-2 standard

IN P0
OUT P1
OUT P1

bSC-2 standard

IN P0
OUT P1

cSC-2 standard

IN P0
OUT P1
CYCLES
198
at par
ENERGY
1638
at par
NODES
3
at par
INSTRUCTIONS
7
at par