-
Notifications
You must be signed in to change notification settings - Fork 0
/
year11-fast.hrm
59 lines (47 loc) · 986 Bytes
/
year11-fast.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
-- HUMAN RESOURCE MACHINE PROGRAM --
-- 11: Sub Hallway
-- INSTRUCTIONS: "For each two things in the INBOX, first subtract the
-- 1st from the 2nd and put the result in the OUTBOX. AND THEN, subtract
-- the 2nd from the 1st and put the result in the OUTBOX. Repeat."
-- AVAILABLE COMMANDS: INBOX, OUTBOX, COPYFROM, COPYTO, ADD, SUB, JUMP,
-- JUMPZ
-- SIZE: 36 commands (challenge 10)
-- AVERAGE RUNTIME: 36 steps (challenge 40)
-- There are always exactly eight items in the inbox.
INBOX
COPYTO 0
INBOX
COPYTO 1
SUB 0
OUTBOX
COPYFROM 0
SUB 1
OUTBOX
INBOX
COPYTO 0
INBOX
COPYTO 1
SUB 0
OUTBOX
COPYFROM 0
SUB 1
OUTBOX
INBOX
COPYTO 0
INBOX
COPYTO 1
SUB 0
OUTBOX
COPYFROM 0
SUB 1
OUTBOX
INBOX
COPYTO 0
INBOX
COPYTO 1
SUB 0
OUTBOX
COPYFROM 0
SUB 1
OUTBOX
-- vim: set autoindent: