Syscall 2: Firmware, home

SignalChapter 9: Special nodes

71SLOPE

The task

Each X code, 1 or -1, moves a level that starts at 0 by the code times a step.

The step is 1, or twice the last one when a code matches the two before it.

P must receive each level. s is an SC-4, with C and D, and lv an SC-2D, with slow jumps.

The board

The board of SLOPE2 cores: s and lv. Inputs X; outputs P.sSC-4 15 LINESlvSC-2D 5 LINESP0P1P0P1XP
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 two models together: the SC-4 keeps the last two codes and the step, and the SC-2D keeps the running level.

Hints

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

Hint 1Show

Give each model the work it suits: the SC-4 keeps the codes and the step, the SC-2D adds.

Hint 2Show

C and D can hold the last two codes. A code matches both when their sum is twice the code.

Hint 3Show

s can send the step times the code, and lv can keep the level in B.

Solution

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

sSC-4 quad

IN P0
XCH A, C
XCH A, D
ADD D
SUB C
SUB C
JNZ ONE
MOV A, B
ADD B
JMP GO
ONE: MOV A, 1
GO: MOV B, A
MUL C
OUT P1

lvSC-2D signal processor

IN P0
ADD B
MOV B, A
OUT P1
CYCLES
501
at par
ENERGY
5037
at par
NODES
2
at par
INSTRUCTIONS
18
at par