-
Notifications
You must be signed in to change notification settings - Fork 0
/
year37.hrm
38 lines (27 loc) · 963 Bytes
/
year37.hrm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- HUMAN RESOURCE MACHINE PROGRAM --
-- 37: Scavenger Chain
-- INSTRUCTIONS: "Each pair on the floor contains: 1) data 2) the
-- address of another one of the pairs. A scrambled chain! Each thing in
-- the INBOX is an address of one of the pairs. OUTBOX the data for that
-- pair, and also the data in all following pairs in the chain. The
-- chain ends when you reach a negative address. Repeat until the INBOX
-- is empty."
-- AVAILABLE COMMANDS: INBOX, OUTBOX, COPYFROM, COPYTO, ADD, SUB,
-- BUMPUP, BUMPDN, JUMP, JUMPZ, JUMPN, COMMENT
-- SIZE: 8 commands (challenge 8)
-- AVERAGE RUNTIME: 63 steps (challenge 63)
-- Tile 12: Pointer
a:
INBOX
b:
COPYTO 12
COPYFROM [12]
OUTBOX
BUMPUP 12
COPYFROM [12]
JUMPN a
JUMP b
DEFINE LABEL 12
eJwTZ2BgkM+bH5aWLbsxLyPkBpDLMDv/UcTVwtnBbuWCPj+rvT00mzjc7rV2uYt1Bnif654d7NpvlMI8
4WBee9/k6v7ux21XOrV6FFrNpprVHp3fXNG1WCY/YPmjnHNLGUbBKBgFgx4AAEYZJ1k;
-- vim: set autoindent: