WORM Solution
UNPACKER
WORM row 9

Prerequisites
Unlocks
w42 solved
Active cores1, 4, 7
Program lines14
DetailWORM row 9
Walkthrough
UNPACKER: (value, count) pairs; emit value count times.
core 0 unpacks (value in BAK, count counted down in ACC), sends each
emitted value DOWN; cores 4 + 8 relay it to output stream 0.
program wraps last line -> line 0, so no trailing JMP needed.
Rack Solution
# UNPACKER: (value, count) pairs; emit value count times.
# core 0 unpacks (value in BAK, count counted down in ACC), sends each
# emitted value DOWN; cores 4 + 8 relay it to output stream 0.
# program wraps last line -> line 0, so no trailing JMP needed.
@1
S: MOV ACC, UP
SAV
MOV ACC, UP
JZ S
E: XCH
MOV DOWN, ACC
XCH
SUB 1
JNZ E
@4
MOV DOWN, UP
@7
MOV DOWN, UP