WORM Solution
ROTARY DECODE
WORM row 3

Prerequisites
Unlocks
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