Syscall 2: Firmware, home

SignalChapter 2: Workshop

8ECHO

The task

P must receive each value from X doubled.

Only the other core can double it, and it shares a single two way wire with you.

The board

The board of ECHO2 cores: c0 and c1. Inputs X; outputs P.c0SC-2 15 LINESc1SC-2 15 LINESP0P1P2P0XP
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 bi wire: send, then read the reply; HEAD ON.

Hints

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

Hint 1Show

A two way pin can read or write. Your P1 is the shared wire.

Hint 2Show

Send the value up on P1, then read the reply on P1.

Hint 3Show

If both ends write at once, neither reads. That is a HEAD ON.

Solution

Reveal the Full SolutionThe complete program for ECHO. 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
IN P1
OUT P2

c1SC-2 standard

IN P0
ADD A
OUT P0
CYCLES
313
at par
ENERGY
1638
at par
NODES
2
at par
INSTRUCTIONS
7
at par