-
Notifications
You must be signed in to change notification settings - Fork 0
/
year39.hrm
70 lines (55 loc) · 2.26 KB
/
year39.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
70
-- HUMAN RESOURCE MACHINE PROGRAM --
-- 39: Re-Coordinator
-- INSTRUCTIONS: "Each number in the INBOX is an address of a tile on
-- the floor. Send to the OUTBOX the coordinates of that tile, column
-- first, row second. For example, an address of 6 has coordinates 2, 1."
-- AVAILABLE COMMANDS: INBOX, OUTBOX, COPYFROM, COPYTO, ADD, SUB,
-- BUMPUP, BUMPDN, JUMP, JUMPZ, JUMPN, COMMENT
-- SIZE: 14 commands (challenge 14)
-- AVERAGE RUNTIME: 73 steps (challenge 76)
-- Tile 12: Row
-- Tile 13: Column
-- Tile 14: Permanent zero
-- Tile 15: Permanent four
-- Determine the column and row of each address by "dividing" the
-- address by four; the quotient is the row number and the remainder is
-- the column number. (Divide using repeated subtraction, as in earlier
-- levels.)
JUMP b
a:
ADD 15
OUTBOX
COPYFROM 12
OUTBOX
b:
COPYFROM 14
COPYTO 12
INBOX
c:
SUB 15
JUMPN a
COPYTO 13
BUMPUP 12
COPYFROM 13
JUMP c
DEFINE LABEL 12
eJxTYWBg0GvYYGJcp6Z7tDxCeUaBv2xj4nQl9/hbKhKRuUbzwr5bPgvucn8XoJe40X9F10d/6xmvAwVX
KIcmbpaIzNy5LXXLQcmCskPepUYH7KrW7H5fP3/Tnba2BcJdev393bLNZ3pYCr16V8Tw9bA432x/pPWw
5Zri+noe6eaKo6JAqxnsqt73G9b7LDnTw3DKtf/oWYZRMApGAV0BAC/+Pt8;
DEFINE LABEL 13
eJwTY2BgSMwVVVTJcS/+mspwCshluJ8rqdJRNln+TluEsljnPXWv3jo7354A7+kdjyLutGnFfal1LvAu
7a+4m9dfAVJ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