WORM Solution

COMPARATOR

WORM row 2

In-game screenshot of COMPARATOR
In-game view
FamilyWORM Graph0.163 Difficulty0.163 Ring01 IDw09

Prerequisites

SHORT PULSE

Unlocks

Two Compares

Reference rack program w09 solved
Active cores1, 4, 7 Program lines14 DetailWORM row 2

Walkthrough

COMPARATOR: OUT = sign(IN) through the center column.

Rack Solution
# COMPARATOR: OUT = sign(IN) through the center column.
@1
L: MOV ACC, UP
JG P
JL N
MOV DOWN, 0
JMP L
P: MOV DOWN, 1
JMP L
N: MOV DOWN, -1
JMP L
@4
MOV DOWN, UP
@7
MOV DOWN, UP