Syscall 2: Firmware, home

ShuffleChapter 5: Half duplex

S14QUIET DROP

The task

A short one. The three lines are out of order.

Every value from X must reach P reduced by 1.

The board

The board of QUIET DROP1 core: a. Inputs X; outputs P.aSC-2 15 LINESP0P1XP
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

Par is 2 swaps. Core a needs 2 operand swaps. One of them trades two tiles that hold each other's places; look for it first, since one swap mends both.

Hints

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

Hint 1Show

SUB 1 takes one from A. It sits between IN and OUT.

Hint 2Show

IN replaces A, so a subtract before the read is lost.

Hint 3Show

The core repeats from the top. One pass of the three lines is the whole loop.

Solution

Reveal the Full SolutionThe complete program for QUIET DROP. Open it only when you want the answer.

The board as dealt

This is the arrangement the game deals. Framed tiles are the ones out of place.

aSC-2 standard

IN P1
SUB P0
OUT 1

2 swaps back

Make these swaps in order. Lines are numbered from 1 in each core.

  1. In core a, swap the operand P1 on line 1 with P0 on line 2.
  2. In core a, swap the operand P1 on line 2 with 1 on line 3.

The finished program

Every tile back in place: the reference solution, which scores exactly par on every benchmark.

aSC-2 standard

IN P0
SUB 1
OUT P1
CYCLES
157
at par
ENERGY
702
at par
NODES
1
at par
INSTRUCTIONS
3
at par
SWAPS
2
at par