WORM Solution
TONE GENERATOR
WORM row 10

Prerequisites
Unlocks
w49 solved
Active cores1, 4, 7
Program lines19
DetailWORM row 10
Walkthrough
TONE GENERATOR: for each IN = period P, emit triangle 0,1,..,P,P-1,..,1,0.
(P is always >=1 for this ticket, so no single-0 special case is needed.)
No forwarding: the output core generates BOTH ramps itself, so every output value is a tight
3-instruction step rather than a 5-instruction relay through the column.
core0: reads P from the input tap and relays it DOWN to core4.
core4 (climb oracle): reads P, then feeds core8 the climb schedule as JRX ticks: -2 (keep) sent
P times, then +1 (break).
core8 (generator + output): increments then emits, so it climbs 0,1,..,P gated by JRX UP (ACC is
never disturbed by a compare) and lands holding exactly P at the break, so the descent
loop walks P-1..0 with no extra priming.
Rack Solution
# TONE GENERATOR: for each IN = period P, emit triangle 0,1,..,P,P-1,..,1,0.
# (P is always >=1 for this ticket, so no single-0 special case is needed.)
#
# No forwarding: the output core generates BOTH ramps itself, so every output value is a tight
# 3-instruction step rather than a 5-instruction relay through the column.
# core0: reads P from the input tap and relays it DOWN to core4.
# core4 (climb oracle): reads P, then feeds core8 the climb schedule as JRX ticks: -2 (keep) sent
# P times, then +1 (break).
# core8 (generator + output): increments then emits, so it climbs 0,1,..,P gated by JRX UP (ACC is
# never disturbed by a compare) and lands holding exactly P at the break, so the descent
# loop walks P-1..0 with no extra priming.
@1
N: MOV DOWN, UP
JMP N
@4
F: MOV ACC, UP
K: MOV DOWN, -2
SUB 1
JG K
MOV DOWN, 1
JMP F
@7
N: MOV ACC, -1
L: ADD 1
MOV DOWN, ACC
JRX UP
X: SUB 1
MOV DOWN, ACC
JNZ X
JMP N