/
h0.hence
265 lines (198 loc) · 2.86 KB
/
h0.hence
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
[Standard Hence Runtime Library]
[Copyright 2010-2014 Andrew J. Baker]
and
call-native 'and'
beep
call-native 'beep'
bitwise-and
call-native 'bitwise-and'
bitwise-not
call-native 'bitwise-not'
bitwise-or
call-native 'bitwise-or'
bitwise-shift-left
call-native 'bitwise-shift-left'
bitwise-shift-right
call-native 'bitwise-shift-right'
bitwise-xor
call-native 'bitwise-xor'
concatenate
call-native 'concatenate'
debug
call-native 'debug'
depth
call-native 'depth'
divide
call-native 'divide'
drop
call-native 'drop'
equal
call-native 'equal'
exit
call-native 'exit'
hexadecimal
call-native 'hexadecimal'
if
call-native 'if'
json-rpc
call-native 'json-rpc'
length
call-native 'length'
less-than
call-native 'less-than'
modulo
call-native 'modulo'
not
call-native 'not'
or
call-native 'or'
pick
call-native 'pick'
read-line
call-native 'read-line'
roll
call-native 'roll'
substring
call-native 'substring'
subtract
call-native 'subtract'
target
call-native 'target'
while
call-native 'while'
write
call-native 'write'
[Synthesised functions]
abort
write-line 'Abnormal program termination'
exit '1'
_ss
subtract swap '0'
_dsl
less-than swap '0' duplicate
absolute
if '_dsl' '_ss' 'do-nothing'
add
subtract subtract swap '0' swap
append
concatenate swap
assign
set swap
call
if 'false' 'do-nothing' [else call TOS]
decrement
subtract '1'
decrement-variable
set swap decrement get duplicate
divide-by
divide swap
do-nothing
[no operation]
drop-all
while 'depth' 'drop'
dump
while 'depth' 'write-line'
duplicate
pick '0'
false
'0'
get
pick call
greater-than
and not-equal rotate rotate greater-than-or-equal over over
greater-than-or-equal
not less-than
increment
add '1'
increment-variable
set swap increment get duplicate
less-than-or-equal
not greater-than
_e
equal '1'
_rdrarsrparrr
rotate
duplicate
rotate
add
rotate
swap
roll '3'
pick '2'
add
roll '3'
roll '3'
roll '3'
_pn
pick '3'
not-equal '0'
_mo
'-1'
_o
'1'
_sl
less-than swap '0'
_oaoal
over
absolute
over
absolute
less-than
multiply
if '_oaoal' 'swap' 'do-nothing'
over
if '_sl' '_o' '_mo'
'0'
while '_pn' '_rdrarsrparrr'
roll '3'
drop
roll '2'
drop
swap
if '_e' '_ss' 'do-nothing'
negate
multiply '-1'
not-equal
not equal
over
pick '1'
write-line
write append '\n'
_sd
decrement swap [push] ''
_dsg
greater-than swap '0' duplicate
reserve
drop while '_dsg' '_sd'
rotate
roll '2'
_rrdirsri
rotate
rotate
duplicate
increment
roll
swap
roll '3'
increment
_rrdiirdri
rotate
rotate
duplicate
increment
increment
roll
drop
rotate
increment
_ool
less-than over over
set
'0' call
if '_ool' '_rrdiirdri' 'do-nothing'
while '_ool' '_rrdirsri'
drop drop
swap
roll '1'
true
'1'