Syscall 2: Firmware, home

SignalChapter 3: Chains and rings

15WINDOW

The task

P must receive the sum of each value from X and the two before it.

Count 0 before the start. Three cores stand in a line, and only the last reaches P.

The board

The board of WINDOW3 cores: c0, c1, and c2. Inputs X; outputs P.c0SC-2 15 LINESc1SC-2 15 LINESc2SC-2 15 LINESP0P1P0P1P0P1XP
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 moving sum of the last 3, held across cores.

Hints

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

Hint 1Show

The sum of the last three is the newest value plus the sum of the two before it.

Hint 2Show

One core can keep the previous value and send the sum of each pair.

Hint 3Show

The last core holds the pair sum from last time and adds the newest value to it.

Solution

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

c0SC-2 standard

IN P0
OUT P1

c1SC-2 standard

IN P0
OUT P1
ADD B
OUT P1
SUB B
MOV B, A

c2SC-2 standard

IN P0
ADD B
OUT P1
IN P0
MOV B, A
CYCLES
351
at par
ENERGY
3012
at par
NODES
3
at par
INSTRUCTIONS
13
at par