WORM Solution

DIVIDER

WORM row 5

In-game screenshot of DIVIDER
In-game view
FamilyWORM Graph0.741 Difficulty0.741 Ring05 IDw23

Prerequisites

WINDOW SCANKeystream

Unlocks

DUAL COUNTER

Reference rack program w23 solved
Active cores0, 1, 3, 4, 5 Program lines33 DetailWORM row 5

Walkthrough

DIVIDER: OUT X = IN / 7, OUT Y = IN mod 7.

Subtract 14 per chunk to halve the loop. Core 0 sends quotient ticks to core 3.

Core 1 handles the final residual, then sends the remainder through core 4 to Y.

Rack Solution
# DIVIDER: OUT X = IN / 7, OUT Y = IN mod 7.
# Subtract 14 per chunk to halve the loop. Core 0 sends quotient ticks to core 3.
# Core 1 handles the final residual, then sends the remainder through core 4 to Y.
@0
R: MOV ACC, RIGHT
A: SUB 14
JL B
MOV DOWN, 2
JMP A
B: ADD 14
MOV RIGHT, ACC
MOV DOWN, RIGHT
MOV DOWN, -999
JMP R
@1
R: MOV LEFT, UP
L: MOV ACC, LEFT
SUB 7
JL F
MOV LEFT, 1
MOV DOWN, ACC
JMP R
F: ADD 7
MOV LEFT, 0
MOV DOWN, ACC
@3
L: SUB ACC
M: ADD UP
JL E
JMP M
E: ADD 999
MOV DOWN, ACC
@4
MOV RIGHT, UP
@5
MOV DOWN, LEFT