-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyear32.hrm
69 lines (55 loc) · 2.01 KB
/
year32.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
-- HUMAN RESOURCE MACHINE PROGRAM --
-- 32: Inventory Report
-- INSTRUCTIONS: "For each thing in the INBOX, send to the OUTBOX the
total number of matching items on the FLOOR."
-- AVAILABLE COMMANDS: INBOX, OUTBOX, COPYFROM, COPYTO, ADD, SUB,
-- BUMPUP, BUMPDN, JUMP, JUMPZ, JUMPN, COMMENT
-- SIZE: 16 commands (challenge 16)
-- AVERAGE RUNTIME: 377 steps (challenge 393)
-- Tile 14: Permanent zero
-- Tile 15: Pointer
-- Tile 16: Current value to search for
-- Tile 17: Running count
JUMP b
a:
COPYFROM 17
OUTBOX
b:
INBOX
COPYTO 16
COPYFROM 14
COPYTO 15
COPYTO 17
JUMP e
c:
BUMPUP 17
d:
BUMPUP 15
e:
COPYFROM [15]
JUMPZ a
SUB 16
JUMPZ c
JUMP d
DEFINE LABEL 14
eJxzYWBgmKx9KyjYWTGi13VJ5BnXFTHSDu7Fe40PzrmhWXW03d3+JFAJA5f+805JR71+EPtGhFZPX8ya
3lv5uX0gfljhmt6phfeaJQuOFsrnWWdtSNeKa0lYEikU/SgiJlwvcWHonyzl0LYi5dCj8xXCJNfNCU/c
PCXq9S7WhLJDbzP2Hl+Q++cYyJyttdMDqqud5/2sfrzFrHbnEZBYbsPOjNDO13EcfStiPk/VSwSJHV22
Ial7SWHyhUVm6eILDubdndtfkTJ75zTV2f3LFs+WXBc5//l2+5VVR3+t+nNMZ4P1MbmtRgdEdq7Y0bUn
ZFXrvg0T3PbNb+na41xwfbteYt56xYi9Kx9FHF2mFj1xkVEKwygYBSMMAADTL3tc;
DEFINE LABEL 15
eJ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