WORM Solution

ROTARY DECODE

WORM row 3

In-game screenshot of ROTARY DECODE
In-game view
FamilyWORM Graph0.257 Difficulty0.257 Ring02 IDw11

Prerequisites

DownhillTwo Compares

Unlocks

AA Scramble

Reference rack program w11 solved
Active cores1, 4, 7 Program lines14 DetailWORM row 3

Walkthrough

ROTARY DECODE: emit length of each run of consecutive 1s.

Counter held in BAK; 0 closes a run and emits the count (if >0).

Rack Solution
# ROTARY DECODE: emit length of each run of consecutive 1s.
# Counter held in BAK; 0 closes a run and emits the count (if >0).
@1
L: MOV ACC, UP
JZ Z
XCH
ADD 1
XCH
JMP L
Z: XCH
JZ L
MOV DOWN, ACC
@4
MOV DOWN, UP
@7
MOV DOWN, UP