This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
intro.html
418 lines (418 loc) · 12.5 KB
/
intro.html
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
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
Whitespace Assembler<br>
<br>
Syntax<br>
<br>
<table cellpadding="2" cellspacing="2" border="1"
style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top; font-weight: bold;">Command<br>
</td>
<td style="vertical-align: top; font-weight: bold;">Explanation<br>
</td>
<td style="vertical-align: top; font-weight: bold;">Sample<br>
</td>
<td style="vertical-align: top; font-weight: bold;">Standard
Whitespace<br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">push integer<br>
</td>
<td style="vertical-align: top;">push number on the stack<br>
</td>
<td style="vertical-align: top;">push 5<br>
</td>
<td style="vertical-align: top;">Yes<br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">pushs string<br>
</td>
<td style="vertical-align: top;">push string on the stack with a
termination NULL (can be used with the prints,printsln function from io
library). String can be in "" to allow spaces<br>
</td>
<td style="vertical-align: top;">pushs "Hallo world"<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">pop<br>
</td>
<td style="vertical-align: top;">pop number from stack<br>
</td>
<td style="vertical-align: top;">pop<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">label name<br>
</td>
<td style="vertical-align: top;">label with name. name can be any
string<br>
</td>
<td style="vertical-align: top;">label hi<br>
label asdsad<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">doub<br>
</td>
<td style="vertical-align: top;">dublicate item on stack<br>
</td>
<td style="vertical-align: top;">doub<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">swap<br>
</td>
<td style="vertical-align: top;">swap top of stack<br>
</td>
<td style="vertical-align: top;">swap<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">add [integer]<br>
</td>
<td style="vertical-align: top;">add top of stack or add integer
to top of stack<br>
</td>
<td style="vertical-align: top;">add<br>
add 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">sub [integer]<br>
</td>
<td style="vertical-align: top;">" top of stack or " integer to
top of stack </td>
<td style="vertical-align: top;">sub<br>
sub 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">mul [integer]<br>
</td>
<td style="vertical-align: top;">" top of stack or " integer to
top of stack </td>
<td style="vertical-align: top;">mul <br>
mul 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">div [integer]<br>
</td>
<td style="vertical-align: top;">" top of stack or " integer to
top of stack </td>
<td style="vertical-align: top;">div<br>
div 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">mod [integer]<br>
</td>
<td style="vertical-align: top;">" top of stack or " integer to
top of stack </td>
<td style="vertical-align: top;">mod<br>
mod 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">store [integer]<br>
</td>
<td style="vertical-align: top;">store or store in space integer<br>
</td>
<td style="vertical-align: top;">store<br>
store 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">retrive [integer]<br>
</td>
<td style="vertical-align: top;">retrive or retrive from integer<br>
</td>
<td style="vertical-align: top;">retrive<br>
retrive 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">call name<br>
</td>
<td style="vertical-align: top;">call label<br>
</td>
<td style="vertical-align: top;">call asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jump name<br>
</td>
<td style="vertical-align: top;">jump<br>
</td>
<td style="vertical-align: top;">jump asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jumpz name<br>
</td>
<td style="vertical-align: top;">jump if zero<br>
</td>
<td style="vertical-align: top;">jumpz asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jumpn name<br>
</td>
<td style="vertical-align: top;">jump if negative<br>
</td>
<td style="vertical-align: top;">jumpn asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jumpp name<br>
</td>
<td style="vertical-align: top;">jump if positive<br>
</td>
<td style="vertical-align: top;">jumpp asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jumpnz name<br>
</td>
<td style="vertical-align: top;">jump negative or zero<br>
</td>
<td style="vertical-align: top;">jumpnz asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jumppz name<br>
</td>
<td style="vertical-align: top;">jump positive or zero<br>
</td>
<td style="vertical-align: top;">jumppz asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">jumppn,jumpnp name<br>
</td>
<td style="vertical-align: top;">jump positive or negative, jump
not null<br>
</td>
<td style="vertical-align: top;">jumppn asd<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">include name<br>
</td>
<td style="vertical-align: top;">include file (without wsa)<br>
</td>
<td style="vertical-align: top;">include io<br>
include memory<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">ret<br>
</td>
<td style="vertical-align: top;">return from function<br>
</td>
<td style="vertical-align: top;">ret<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">exit<br>
</td>
<td style="vertical-align: top;">exit from program<br>
</td>
<td style="vertical-align: top;">exit<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">outn<br>
</td>
<td style="vertical-align: top;">out number<br>
</td>
<td style="vertical-align: top;">outn<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">outc<br>
</td>
<td style="vertical-align: top;">out char<br>
</td>
<td style="vertical-align: top;">outc<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">inn<br>
</td>
<td style="vertical-align: top;">in number to heap address from
stack<br>
</td>
<td style="vertical-align: top;">inn<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">inc<br>
</td>
<td style="vertical-align: top;">in char to heap address from
stack </td>
<td style="vertical-align: top;">inc<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">test integer<br>
</td>
<td style="vertical-align: top;">test the top of stack with
number. It dublicates the value before comparing, so it is NOT poped
automaticaly<br>
</td>
<td style="vertical-align: top;">test 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">valuestring _name value<br>
</td>
<td style="vertical-align: top;">define _name as value. so _name
can be used everywhere a string is needed. name must start with _<br>
</td>
<td style="vertical-align: top;">valuestring _hello "hi user"<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">valueinteger _name value<br>
</td>
<td style="vertical-align: top;">define _name as value. so _name
can be used everywhere a integer is needed. name must start with _ </td>
<td style="vertical-align: top;">valueinteger _count 5<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">ifoption name<br>
</td>
<td style="vertical-align: top;">include next only if option name
is defined<br>
</td>
<td style="vertical-align: top;">ifoption debug<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">elseoption<br>
</td>
<td style="vertical-align: top;">include next only if last
ifoption name was not defined </td>
<td style="vertical-align: top;">elseoption<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">endoption<br>
</td>
<td style="vertical-align: top;">end ifinclude block </td>
<td style="vertical-align: top;">endoption<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">elseifoption name<br>
</td>
<td style="vertical-align: top;">combination of else and if<br>
</td>
<td style="vertical-align: top;">elseifoption debug2<br>
</td>
<td style="vertical-align: top;">Yes </td>
</tr>
<tr>
<td style="vertical-align: top;">debug_printstack</td>
<td style="vertical-align: top;">print the stack of the
interpreter. New Syntax, not compatible with other interpreters ! To
enable it the option "extendedsyntax" must be enabled !</td>
<td style="vertical-align: top;">debug_printstack<br>
</td>
<td style="vertical-align: top;"><span style="font-weight: bold;">No</span><br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">debug_printheap</td>
<td style="vertical-align: top;">print the heap of the
interpreter. New Syntax, not compatible with other interpreters ! To
enable it the option "extendedsyntax" must be enabled !</td>
<td style="vertical-align: top;">debug_printheap</td>
<td style="vertical-align: top;"><span style="font-weight: bold;">No</span><br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
functions:<br>
<table cellpadding="2" cellspacing="2" border="1"
style="text-align: left; width: 100%;">
<tbody>
<tr>
<td style="vertical-align: top;">translateWSA filename
extendedSyntax</td>
<td style="vertical-align: top;">translate WSA file to ws and pws
files<br>
</td>
<td style="vertical-align: top;">translateWSA "test" True<br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">translateWSAOptions filename
options extendedSyntax</td>
<td style="vertical-align: top;">translate WSA file to ws and pws
files with options enabled<br>
</td>
<td style="vertical-align: top;">translateWSAoptions "test"
["debug"] True<br>
</td>
</tr>
<tr>
<td style="vertical-align: top;">getWSAOptions filename </td>
<td style="vertical-align: top;">get the options that can be used
in the wsa file<br>
</td>
<td style="vertical-align: top;">getWSAOptions "test"<br>
</td>
</tr>
</tbody>
</table>
<br>
<br>
<br>
</body>
</html>