WORM Solution

PAIR SWAP

WORM row 6

In-game screenshot of PAIR SWAP
In-game view
FamilyWORM Graph0.537 Difficulty0.537 Ring04 IDw27

Prerequisites

TRIPWIRE

Unlocks

DRIP FEEDPARITY MIX

Reference rack program w27 solved
Active cores1, 4, 7 Program lines9 DetailWORM row 6

Walkthrough

PAIR SWAP: (a,b,c,d,...) -> (b,a,d,c,...); odd tail dropped.

Core 0 reads a into ACC, then MOV DOWN,UP forwards b, then MOV DOWN,ACC

forwards a; values run down column 0 (0 -> 4 -> 8 = output stream 0).

Rack Solution
# PAIR SWAP: (a,b,c,d,...) -> (b,a,d,c,...); odd tail dropped.
# Core 0 reads a into ACC, then MOV DOWN,UP forwards b, then MOV DOWN,ACC
# forwards a; values run down column 0 (0 -> 4 -> 8 = output stream 0).
@1
L: MOV ACC, UP
MOV DOWN, UP
MOV DOWN, ACC
JMP L
@4
MOV DOWN, UP
@7
MOV DOWN, UP