1 |
/* |
2 |
* PearPC |
3 |
* fcode.cc |
4 |
* |
5 |
* Copyright (C) 2003 Sebastian Biallas (sb@biallas.net) |
6 |
* |
7 |
* This program is free software; you can redistribute it and/or modify |
8 |
* it under the terms of the GNU General Public License version 2 as |
9 |
* published by the Free Software Foundation. |
10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 |
* GNU General Public License for more details. |
15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
17 |
* along with this program; if not, write to the Free Software |
18 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 |
*/ |
20 |
|
21 |
#ifndef __FCODE_H__ |
22 |
#define __FCODE_H__ |
23 |
|
24 |
#include "system/types.h" |
25 |
#include "forth.h" |
26 |
|
27 |
#define FCODEHEADER_FORMAT 8 |
28 |
|
29 |
// .49 |
30 |
struct FCodeHeader { |
31 |
uint8 start; |
32 |
uint8 format; |
33 |
uint8 chksum_high; |
34 |
uint8 chksum_low; |
35 |
uint8 len[4]; |
36 |
}; |
37 |
|
38 |
class ForthWordTick: public ForthWord { |
39 |
public: |
40 |
ForthWordTick(const char *name); |
41 |
virtual void compile(ForthVM &vm); |
42 |
virtual void interprete(ForthVM &vm); |
43 |
}; |
44 |
|
45 |
class ForthWordIF: public ForthWord { |
46 |
public: |
47 |
ForthWordIF(); |
48 |
virtual void compile(ForthVM &vm); |
49 |
virtual void interprete(ForthVM &vm); |
50 |
}; |
51 |
|
52 |
class ForthWordELSE: public ForthWord { |
53 |
public: |
54 |
ForthWordELSE(); |
55 |
virtual void compile(ForthVM &vm); |
56 |
virtual void interprete(ForthVM &vm); |
57 |
}; |
58 |
|
59 |
class ForthWordTHEN: public ForthWord { |
60 |
public: |
61 |
ForthWordTHEN(); |
62 |
virtual void compile(ForthVM &vm); |
63 |
virtual void interprete(ForthVM &vm); |
64 |
}; |
65 |
|
66 |
|
67 |
|
68 |
// .104 |
69 |
void fcode_opc_ex(ForthVM &vm); |
70 |
void fcode_opc_sharp(ForthVM &vm); |
71 |
// .105 |
72 |
void fcode_opc_sharpgt(ForthVM &vm); |
73 |
void fcode_opc_mul(ForthVM &vm); |
74 |
void fcode_opc_plus(ForthVM &vm); |
75 |
void fcode_opc_plusex(ForthVM &vm); |
76 |
void fcode_opc_comma(ForthVM &vm); |
77 |
void fcode_opc_minus(ForthVM &vm); |
78 |
void fcode_opc_dot(ForthVM &vm); |
79 |
// .106 |
80 |
void fcode_opc_div(ForthVM &vm); |
81 |
void fcode_opc_lt(ForthVM &vm); |
82 |
void fcode_opc_ltsharp(ForthVM &vm); |
83 |
void fcode_opc_ltequal(ForthVM &vm); |
84 |
void fcode_opc_ltgt(ForthVM &vm); |
85 |
void fcode_opc_equal(ForthVM &vm); |
86 |
void fcode_opc_gt(ForthVM &vm); |
87 |
void fcode_opc_gtequal(ForthVM &vm); |
88 |
// .107 |
89 |
void fcode_opc_at(ForthVM &vm); |
90 |
void fcode_opc_0(ForthVM &vm); |
91 |
void fcode_opc_0lt(ForthVM &vm); |
92 |
void fcode_opc_0ltequal(ForthVM &vm); |
93 |
void fcode_opc_0ltgt(ForthVM &vm); |
94 |
void fcode_opc_0equal(ForthVM &vm); |
95 |
void fcode_opc_0gt(ForthVM &vm); |
96 |
// .108 |
97 |
void fcode_opc_0gtequal(ForthVM &vm); |
98 |
void fcode_opc_1(ForthVM &vm); |
99 |
void fcode_opc_minus1(ForthVM &vm); |
100 |
void fcode_opc_2(ForthVM &vm); |
101 |
void fcode_opc_2ex(ForthVM &vm); |
102 |
void fcode_opc_2mul(ForthVM &vm); |
103 |
void fcode_opc_2div(ForthVM &vm); |
104 |
void fcode_opc_2at(ForthVM &vm); |
105 |
void fcode_opc_3(ForthVM &vm); |
106 |
// .109 |
107 |
void fcode_opc_gtgtA(ForthVM &vm); |
108 |
void fcode_opc_ABORT(ForthVM &vm); |
109 |
void fcode_opc_ABS(ForthVM &vm); |
110 |
// .111 |
111 |
void fcode_opc_ALARM(ForthVM &vm); |
112 |
void fcode_opc_ALIGNED(ForthVM &vm); |
113 |
void fcode_opc_ALLOC_MEM(ForthVM &vm); |
114 |
// .112 |
115 |
void fcode_opc_AND(ForthVM &vm); |
116 |
// .113 |
117 |
void fcode_opc_Bstring(ForthVM &vm); |
118 |
void fcode_opc_Btick(ForthVM &vm); |
119 |
void fcode_opc_Bcolon(ForthVM &vm); |
120 |
void fcode_opc_Bsemincolon(ForthVM &vm); |
121 |
// .114 |
122 |
void fcode_opc_BASE(ForthVM &vm); |
123 |
void fcode_opc_BBRANCH(ForthVM &vm); |
124 |
// .115 |
125 |
void fcode_opc_BqBRANCH(ForthVM &vm); |
126 |
void fcode_opc_BBUFFERcol(ForthVM &vm); |
127 |
void fcode_opc_BCASE(ForthVM &vm); |
128 |
// .116 |
129 |
void fcode_opc_BCONSTANT(ForthVM &vm); |
130 |
void fcode_opc_BCREATE(ForthVM &vm); |
131 |
void fcode_opc_BDEFER(ForthVM &vm); |
132 |
void fcode_opc_BDO(ForthVM &vm); |
133 |
void fcode_opc_BqDO(ForthVM &vm); |
134 |
// .117 |
135 |
void fcode_opc_BEHAVIOR(ForthVM &vm); |
136 |
void fcode_opc_BELL(ForthVM &vm); |
137 |
void fcode_opc_BENDCASE(ForthVM &vm); |
138 |
// .118 |
139 |
void fcode_opc_BENDOF(ForthVM &vm); |
140 |
void fcode_opc_BETWEEN(ForthVM &vm); |
141 |
void fcode_opc_BFIELD(ForthVM &vm); |
142 |
void fcode_opc_BL(ForthVM &vm); |
143 |
void fcode_opc_BLEAVE(ForthVM &vm); |
144 |
void fcode_opc_BLINK_SCREEN(ForthVM &vm); |
145 |
// .119 |
146 |
void fcode_opc_BLIT(ForthVM &vm); |
147 |
void fcode_opc_BLJOIN(ForthVM &vm); |
148 |
void fcode_opc_BLOOP(ForthVM &vm); |
149 |
void fcode_opc_BplusLOOP(ForthVM &vm); |
150 |
// .120 |
151 |
void fcode_opc_BltMARK(ForthVM &vm); |
152 |
void fcode_opc_BODYgt(ForthVM &vm); |
153 |
void fcode_opc_gtBODY(ForthVM &vm); |
154 |
void fcode_opc_BOF(ForthVM &vm); |
155 |
// .121 |
156 |
void fcode_opc_BOUNDS(ForthVM &vm); |
157 |
void fcode_opc_BgtRESOLVE(ForthVM &vm); |
158 |
void fcode_opc_BS(ForthVM &vm); |
159 |
// .122 |
160 |
void fcode_opc_BTO(ForthVM &vm); |
161 |
void fcode_opc_BVALUE(ForthVM &vm); |
162 |
void fcode_opc_BVARIABLE(ForthVM &vm); |
163 |
void fcode_opc_BWJOIN(ForthVM &vm); |
164 |
// .123 |
165 |
void fcode_opc_BYTE_LOAD(ForthVM &vm); |
166 |
void fcode_opc_Cex(ForthVM &vm); |
167 |
void fcode_opc_Ccomma(ForthVM &vm); |
168 |
// .124 |
169 |
void fcode_opc_slashC(ForthVM &vm); |
170 |
void fcode_opc_Cat(ForthVM &vm); |
171 |
void fcode_opc_CAplus(ForthVM &vm); |
172 |
// .125 |
173 |
void fcode_opc_dCALL_METHOD(ForthVM &vm); |
174 |
void fcode_opc_CALL_PACKAGE(ForthVM &vm); |
175 |
void fcode_opc_dCALL_PARENT(ForthVM &vm); |
176 |
// .126 |
177 |
void fcode_opc_CATCH(ForthVM &vm); |
178 |
void fcode_opc_CELLplus(ForthVM &vm); |
179 |
void fcode_opc_CELLS(ForthVM &vm); |
180 |
void fcode_opc_CHARplus(ForthVM &vm); |
181 |
// .127 |
182 |
void fcode_opc_CHAR_HEIGHT(ForthVM &vm); |
183 |
void fcode_opc_CHARS(ForthVM &vm); |
184 |
void fcode_opc_CHAR_WIDTH(ForthVM &vm); |
185 |
void fcode_opc_CHILD(ForthVM &vm); |
186 |
// .128 |
187 |
void fcode_opc_CLOSE_PACKAGE(ForthVM &vm); |
188 |
void fcode_opc_sharpCOLUMN(ForthVM &vm); |
189 |
void fcode_opc_sharpCOLUMNS(ForthVM &vm); |
190 |
void fcode_opc_COMP(ForthVM &vm); |
191 |
// .129 |
192 |
void fcode_opc_COMPILEcomma(ForthVM &vm); |
193 |
// .130 |
194 |
void fcode_opc_COUNT(ForthVM &vm); |
195 |
void fcode_opc_CPEEK(ForthVM &vm); |
196 |
void fcode_opc_CPOKE(ForthVM &vm); |
197 |
void fcode_opc_CR(ForthVM &vm); |
198 |
void fcode_opc_bracketCR(ForthVM &vm); |
199 |
// .131 |
200 |
void fcode_opc_Dplus(ForthVM &vm); |
201 |
void fcode_opc_Dminus(ForthVM &vm); |
202 |
// .132 |
203 |
void fcode_opc_DECODE_INT(ForthVM &vm); |
204 |
void fcode_opc_DECODE_PHYS(ForthVM &vm); |
205 |
void fcode_opc_DECODE_STRING(ForthVM &vm); |
206 |
void fcode_opc_DEFAULT_FONT(ForthVM &vm); |
207 |
// .133 |
208 |
void fcode_opc_DELETE_CHARS(ForthVM &vm); |
209 |
void fcode_opc_DELETE_LINES(ForthVM &vm); |
210 |
void fcode_opc_DELETE_PROPERTY(ForthVM &vm); |
211 |
void fcode_opc_DEPTH(ForthVM &vm); |
212 |
// .134 |
213 |
void fcode_opc_DEVICE_NAME(ForthVM &vm); |
214 |
void fcode_opc_DEVICE_TYPE(ForthVM &vm); |
215 |
// .135 |
216 |
void fcode_opc_DIAGNOSTIC_MODEq(ForthVM &vm); |
217 |
void fcode_opc_DIGIT(ForthVM &vm); |
218 |
// .138 |
219 |
void fcode_opc_DRAW_CHARACTER(ForthVM &vm); |
220 |
void fcode_opc_DRAW_LOGO(ForthVM &vm); |
221 |
void fcode_opc_DROP(ForthVM &vm); |
222 |
void fcode_opc_2DROP(ForthVM &vm); |
223 |
// .139 |
224 |
void fcode_opc_DUP(ForthVM &vm); |
225 |
void fcode_opc_2DUP(ForthVM &vm); |
226 |
void fcode_opc_qDUP(ForthVM &vm); |
227 |
void fcode_opc_EMIT(ForthVM &vm); |
228 |
void fcode_opc_ENCODEplus(ForthVM &vm); |
229 |
void fcode_opc_ENCODE_BYTES(ForthVM &vm); |
230 |
// .140 |
231 |
void fcode_opc_ENCODE_INT(ForthVM &vm); |
232 |
void fcode_opc_ENCODE_PHYS(ForthVM &vm); |
233 |
void fcode_opc_ENCODE_STRING(ForthVM &vm); |
234 |
// .141 |
235 |
void fcode_opc_END0(ForthVM &vm); |
236 |
void fcode_opc_END1(ForthVM &vm); |
237 |
// .142 |
238 |
void fcode_opc_ERASE_SCREEN(ForthVM &vm); |
239 |
void fcode_opc_EVALUATE(ForthVM &vm); |
240 |
void fcode_opc_EXECUTE(ForthVM &vm); |
241 |
void fcode_opc_EXIT(ForthVM &vm); |
242 |
// .143 |
243 |
void fcode_opc_EXPECT(ForthVM &vm); |
244 |
void fcode_opc_EXTERNAL_TOKEN(ForthVM &vm); |
245 |
// .144 |
246 |
void fcode_opc_FB8_BLINK_SCREEN(ForthVM &vm); |
247 |
void fcode_opc_FB8_DELETE_CHARS(ForthVM &vm); |
248 |
void fcode_opc_FB8_DELETE_LINES(ForthVM &vm); |
249 |
void fcode_opc_FB8_DRAW_CHARACTER(ForthVM &vm); |
250 |
void fcode_opc_FB8_DRAW_LOGO(ForthVM &vm); |
251 |
void fcode_opc_FB8_ERASE_SCREEN(ForthVM &vm); |
252 |
void fcode_opc_FB8_INSERT_CHARACTERS(ForthVM &vm); |
253 |
void fcode_opc_FB8_INSERT_LINES(ForthVM &vm); |
254 |
void fcode_opc_FB8_INSTALL(ForthVM &vm); |
255 |
void fcode_opc_FB8_INVERT_SCREEN(ForthVM &vm); |
256 |
// .145 |
257 |
void fcode_opc_FB8_RESET_SCREEN(ForthVM &vm); |
258 |
void fcode_opc_FB8_TOGGLE_CURSOR(ForthVM &vm); |
259 |
void fcode_opc_FCODE_REVISION(ForthVM &vm); |
260 |
void fcode_opc_FERROR(ForthVM &vm); |
261 |
// .146 |
262 |
void fcode_opc_FILL(ForthVM &vm); |
263 |
void fcode_opc_dFIND(ForthVM &vm); |
264 |
void fcode_opc_FIND_METHOD(ForthVM &vm); |
265 |
void fcode_opc_FIND_PACKAGE(ForthVM &vm); |
266 |
// .147 |
267 |
void fcode_opc_FINISH_DEVICE(ForthVM &vm); |
268 |
void fcode_opc_gtFONT(ForthVM &vm); |
269 |
void fcode_opc_FONTBYTES(ForthVM &vm); |
270 |
void fcode_opc_FRAME_BUFFER_ADR(ForthVM &vm); |
271 |
void fcode_opc_FREE_MEM(ForthVM &vm); |
272 |
void fcode_opc_FREE_VIRTUAL(ForthVM &vm); |
273 |
// .148 |
274 |
void fcode_opc_GET_INHERITED_PROPERTIY(ForthVM &vm); |
275 |
void fcode_opc_GET_MSECS(ForthVM &vm); |
276 |
void fcode_opc_GET_MY_PROPERTY(ForthVM &vm); |
277 |
void fcode_opc_GET_PACKAGE_PROPERTY(ForthVM &vm); |
278 |
void fcode_opc_GET_TOKEN(ForthVM &vm); |
279 |
// .151 |
280 |
void fcode_opc_HERE(ForthVM &vm); |
281 |
// .150 |
282 |
void fcode_opc_HOLD(ForthVM &vm); |
283 |
void fcode_opc_I(ForthVM &vm); |
284 |
void fcode_opc_IHANDLEgtPHANDLE(ForthVM &vm); |
285 |
// .151 |
286 |
void fcode_opc_INSERT_CHARACTERS(ForthVM &vm); |
287 |
void fcode_opc_INSERT_LINES(ForthVM &vm); |
288 |
// .152 |
289 |
void fcode_opc_INSTANCE(ForthVM &vm); |
290 |
// .153 |
291 |
void fcode_opc_INVERSEq(ForthVM &vm); |
292 |
void fcode_opc_INVERSE_SCREENq(ForthVM &vm); |
293 |
void fcode_opc_INVERT(ForthVM &vm); |
294 |
// .154 |
295 |
void fcode_opc_INVERT_SCREEN(ForthVM &vm); |
296 |
void fcode_opc_IS_INSTALL(ForthVM &vm); |
297 |
void fcode_opc_IS_REMOVE(ForthVM &vm); |
298 |
void fcode_opc_IS_SELFTEST(ForthVM &vm); |
299 |
void fcode_opc_bIS_USER_WORDd(ForthVM &vm); |
300 |
// .155 |
301 |
void fcode_opc_J(ForthVM &vm); |
302 |
void fcode_opc_KEY(ForthVM &vm); |
303 |
void fcode_opc_KEYq(ForthVM &vm); |
304 |
void fcode_opc_Lex(ForthVM &vm); |
305 |
void fcode_opc_Lcomma(ForthVM &vm); |
306 |
void fcode_opc_Lat(ForthVM &vm); |
307 |
void fcode_opc_divL(ForthVM &vm); |
308 |
void fcode_opc_divLmul(ForthVM &vm); |
309 |
void fcode_opc_LAplus(ForthVM &vm); |
310 |
void fcode_opc_LA1plus(ForthVM &vm); |
311 |
// .156 |
312 |
void fcode_opc_LBFLIP(ForthVM &vm); |
313 |
void fcode_opc_LBFLIPS(ForthVM &vm); |
314 |
void fcode_opc_LBSPLIT(ForthVM &vm); |
315 |
void fcode_opc_LCC(ForthVM &vm); |
316 |
void fcode_opc_LEFT_PARSE_STRING(ForthVM &vm); |
317 |
// .157 |
318 |
void fcode_opc_LINEsharp(ForthVM &vm); |
319 |
void fcode_opc_sharpLINE(ForthVM &vm); |
320 |
void fcode_opc_sharpLINES(ForthVM &vm); |
321 |
// .159 |
322 |
void fcode_opc_LPEEK(ForthVM &vm); |
323 |
void fcode_opc_LPOKE(ForthVM &vm); |
324 |
void fcode_opc_LSHIFT(ForthVM &vm); |
325 |
void fcode_opc_LWFLIP(ForthVM &vm); |
326 |
void fcode_opc_LWFLIPS(ForthVM &vm); |
327 |
void fcode_opc_LWSPLIT(ForthVM &vm); |
328 |
void fcode_opc_MAC_ADDRESS(ForthVM &vm); |
329 |
// .160 |
330 |
void fcode_opc_MAP_LOW(ForthVM &vm); |
331 |
void fcode_opc_MASK(ForthVM &vm); |
332 |
// .161 |
333 |
void fcode_opc_MAX(ForthVM &vm); |
334 |
void fcode_opc_MEMORY_TEST_SUITE(ForthVM &vm); |
335 |
void fcode_opc_MIN(ForthVM &vm); |
336 |
// .162 |
337 |
void fcode_opc_MOD(ForthVM &vm); |
338 |
void fcode_opc_divMOD(ForthVM &vm); |
339 |
void fcode_opc_MODEL(ForthVM &vm); |
340 |
void fcode_opc_MOVE(ForthVM &vm); |
341 |
void fcode_opc_MS(ForthVM &vm); |
342 |
// .163 |
343 |
void fcode_opc_MY_ADDRESS(ForthVM &vm); |
344 |
void fcode_opc_MY_ARGS(ForthVM &vm); |
345 |
void fcode_opc_MY_PARENT(ForthVM &vm); |
346 |
void fcode_opc_MY_SELF(ForthVM &vm); |
347 |
void fcode_opc_MY_SPACE(ForthVM &vm); |
348 |
void fcode_opc_MY_UNIT(ForthVM &vm); |
349 |
void fcode_opc_slashN(ForthVM &vm); |
350 |
// .164 |
351 |
void fcode_opc_NAplus(ForthVM &vm); |
352 |
// .165 |
353 |
void fcode_opc_NAMED_TOKEN(ForthVM &vm); |
354 |
void fcode_opc_NEGATE(ForthVM &vm); |
355 |
void fcode_opc_NEW_DEVICE(ForthVM &vm); |
356 |
// .166 |
357 |
void fcode_opc_NEW_TOKEN(ForthVM &vm); |
358 |
void fcode_opc_NEXT_PROPERTY(ForthVM &vm); |
359 |
void fcode_opc_NIP(ForthVM &vm); |
360 |
void fcode_opc_NOOP(ForthVM &vm); |
361 |
// .167 |
362 |
void fcode_opc_dNUMBER(ForthVM &vm); |
363 |
// .169 |
364 |
void fcode_opc_OFF(ForthVM &vm); |
365 |
// .170 |
366 |
void fcode_opc_OFFSET16(ForthVM &vm); |
367 |
void fcode_opc_ON(ForthVM &vm); |
368 |
void fcode_opc_OPEN_PACKAGE(ForthVM &vm); |
369 |
// .171 |
370 |
void fcode_opc_dOPEN_PACKAGE(ForthVM &vm); |
371 |
void fcode_opc_OR(ForthVM &vm); |
372 |
void fcode_opc_sharpOUT(ForthVM &vm); |
373 |
void fcode_opc_OVER(ForthVM &vm); |
374 |
void fcode_opc_2OVER(ForthVM &vm); |
375 |
void fcode_opc_PACK(ForthVM &vm); |
376 |
// .172 |
377 |
void fcode_opc_PARSE_2INT(ForthVM &vm); |
378 |
// .173 |
379 |
void fcode_opc_PEER(ForthVM &vm); |
380 |
void fcode_opc_PICK(ForthVM &vm); |
381 |
// .174 |
382 |
void fcode_opc_PROPERTY(ForthVM &vm); |
383 |
void fcode_opc_Rgt(ForthVM &vm); |
384 |
void fcode_opc_Rat(ForthVM &vm); |
385 |
void fcode_opc_dotR(ForthVM &vm); |
386 |
void fcode_opc_gtR(ForthVM &vm); |
387 |
// .175 |
388 |
void fcode_opc_RBex(ForthVM &vm); |
389 |
void fcode_opc_RBat(ForthVM &vm); |
390 |
// .177 |
391 |
void fcode_opc_REG(ForthVM &vm); |
392 |
// .179 |
393 |
void fcode_opc_RESET_SCREEN(ForthVM &vm); |
394 |
void fcode_opc_RLex(ForthVM &vm); |
395 |
// .180 |
396 |
void fcode_opc_RLat(ForthVM &vm); |
397 |
void fcode_opc_ROLL(ForthVM &vm); |
398 |
void fcode_opc_ROT(ForthVM &vm); |
399 |
void fcode_opc_mROT(ForthVM &vm); |
400 |
void fcode_opc_2ROT(ForthVM &vm); |
401 |
void fcode_opc_RSHIFT(ForthVM &vm); |
402 |
void fcode_opc_RWex(ForthVM &vm); |
403 |
// .181 |
404 |
void fcode_opc_RWat(ForthVM &vm); |
405 |
void fcode_opc_sharpS(ForthVM &vm); |
406 |
void fcode_opc_dotS(ForthVM &vm); |
407 |
// .182 |
408 |
void fcode_opc_SBUS_INTRgtCPU(ForthVM &vm); |
409 |
void fcode_opc_SCREEN_HEIGHT(ForthVM &vm); |
410 |
void fcode_opc_SCREEN_WIDTH(ForthVM &vm); |
411 |
// .184 |
412 |
void fcode_opc_SET_ARGS(ForthVM &vm); |
413 |
// .185 |
414 |
void fcode_opc_SET_FONT(ForthVM &vm); |
415 |
void fcode_opc_SET_TOKEN(ForthVM &vm); |
416 |
// .186 |
417 |
void fcode_opc_SIGN(ForthVM &vm); |
418 |
void fcode_opc_SPAN(ForthVM &vm); |
419 |
// .187 |
420 |
void fcode_opc_START0(ForthVM &vm); |
421 |
void fcode_opc_START1(ForthVM &vm); |
422 |
void fcode_opc_START2(ForthVM &vm); |
423 |
void fcode_opc_START4(ForthVM &vm); |
424 |
void fcode_opc_STATE(ForthVM &vm); |
425 |
// .189 |
426 |
void fcode_opc_SUSPEND_FCODE(ForthVM &vm); |
427 |
void fcode_opc_SWAP(ForthVM &vm); |
428 |
void fcode_opc_2SWAP(ForthVM &vm); |
429 |
// .190 |
430 |
void fcode_opc_THROW(ForthVM &vm); |
431 |
// .191 |
432 |
void fcode_opc_TOGGLE_CURSOR(ForthVM &vm); |
433 |
void fcode_opc_TUCK(ForthVM &vm); |
434 |
void fcode_opc_TYPE(ForthVM &vm); |
435 |
// .192 |
436 |
void fcode_opc_Usharp(ForthVM &vm); |
437 |
void fcode_opc_Usharpgt(ForthVM &vm); |
438 |
void fcode_opc_UsharpS(ForthVM &vm); |
439 |
void fcode_opc_Udot(ForthVM &vm); |
440 |
void fcode_opc_Ult(ForthVM &vm); |
441 |
void fcode_opc_Ultequal(ForthVM &vm); |
442 |
void fcode_opc_Ugt(ForthVM &vm); |
443 |
void fcode_opc_Ugtequal(ForthVM &vm); |
444 |
void fcode_opc_U2div(ForthVM &vm); |
445 |
void fcode_opc_UMmul(ForthVM &vm); |
446 |
void fcode_opc_UMdivMOD(ForthVM &vm); |
447 |
// .193 |
448 |
void fcode_opc_UdivMOD(ForthVM &vm); |
449 |
void fcode_opc_UNLOOP(ForthVM &vm); |
450 |
void fcode_opc_UPC(ForthVM &vm); |
451 |
void fcode_opc_UdotR(ForthVM &vm); |
452 |
// .194 |
453 |
void fcode_opc_USER_ABORT(ForthVM &vm); |
454 |
void fcode_opc_VERSION1(ForthVM &vm); |
455 |
void fcode_opc_Wex(ForthVM &vm); |
456 |
void fcode_opc_Wcomma(ForthVM &vm); |
457 |
void fcode_opc_Wat(ForthVM &vm); |
458 |
void fcode_opc_slashW(ForthVM &vm); |
459 |
// .195 |
460 |
void fcode_opc_slashWmul(ForthVM &vm); |
461 |
void fcode_opc_ltWat(ForthVM &vm); |
462 |
void fcode_opc_WAplus(ForthVM &vm); |
463 |
void fcode_opc_WA1plus(ForthVM &vm); |
464 |
void fcode_opc_WBFLIP(ForthVM &vm); |
465 |
void fcode_opc_WBFLIPS(ForthVM &vm); |
466 |
void fcode_opc_WBSPLIT(ForthVM &vm); |
467 |
void fcode_opc_WINDOW_LEFT(ForthVM &vm); |
468 |
void fcode_opc_WINDOW_TOP(ForthVM &vm); |
469 |
void fcode_opc_WITHIN(ForthVM &vm); |
470 |
// .196 |
471 |
void fcode_opc_WLJOIN(ForthVM &vm); |
472 |
void fcode_opc_WPEEK(ForthVM &vm); |
473 |
void fcode_opc_WPOKE(ForthVM &vm); |
474 |
void fcode_opc_XOR(ForthVM &vm); |
475 |
|
476 |
// .104 |
477 |
#define FCODE_ex 0x72 |
478 |
#define FCODE_sharp 0xc7 |
479 |
// .105 |
480 |
#define FCODE_sharpgt 0xc9 |
481 |
#define FCODE_mul 0x20 |
482 |
#define FCODE_plus 0x1e |
483 |
#define FCODE_plusex 0x6c |
484 |
#define FCODE_comma 0xd3 |
485 |
#define FCODE_minus 0x1f |
486 |
#define FCODE_dot 0x9d |
487 |
// .106 |
488 |
#define FCODE_div 0x21 |
489 |
#define FCODE_lt 0x3a |
490 |
#define FCODE_ltsharp 0x96 |
491 |
#define FCODE_ltequal 0x43 |
492 |
#define FCODE_ltgt 0x3d |
493 |
#define FCODE_equal 0x3c |
494 |
#define FCODE_gt 0x3b |
495 |
#define FCODE_gtequal 0x42 |
496 |
// .107 |
497 |
#define FCODE_at 0x6d |
498 |
#define FCODE_0 0xa5 |
499 |
#define FCODE_0lt 0x36 |
500 |
#define FCODE_0ltequal 0x37 |
501 |
#define FCODE_0ltgt 0x35 |
502 |
#define FCODE_0equal 0x34 |
503 |
#define FCODE_0gt 0x38 |
504 |
// .108 |
505 |
#define FCODE_0gtequal 0x39 |
506 |
#define FCODE_1 0xa6 |
507 |
#define FCODE_minus1 0xa4 |
508 |
#define FCODE_2 0xa7 |
509 |
#define FCODE_2ex 0x77 |
510 |
#define FCODE_2mul 0x59 |
511 |
#define FCODE_2div 0x57 |
512 |
#define FCODE_2at 0x76 |
513 |
#define FCODE_3 0xa8 |
514 |
// .109 |
515 |
#define FCODE_gtgtA 0x29 |
516 |
#define FCODE_ABORT 0x216 |
517 |
#define FCODE_ABS 0x2d |
518 |
// .111 |
519 |
#define FCODE_ALARM 0x213 |
520 |
#define FCODE_ALIGNED 0xae |
521 |
#define FCODE_ALLOC_MEM 0x8b |
522 |
// .112 |
523 |
#define FCODE_AND 0x23 |
524 |
// .113 |
525 |
#define FCODE_Bstring 0x12 |
526 |
#define FCODE_Btick 0x11 |
527 |
#define FCODE_Bcolon 0xb7 |
528 |
#define FCODE_Bsemincolon 0xc2 |
529 |
// .114 |
530 |
#define FCODE_BASE 0xa0 |
531 |
#define FCODE_BBRANCH 0x13 |
532 |
// .115 |
533 |
#define FCODE_BqBRANCH 0x14 |
534 |
#define FCODE_BBUFFERcol 0xbd |
535 |
#define FCODE_BCASE 0xc4 |
536 |
// .116 |
537 |
#define FCODE_BCONSTANT 0xba |
538 |
#define FCODE_BCREATE 0xbb |
539 |
#define FCODE_BDEFER 0xbc |
540 |
#define FCODE_BDO 0x17 |
541 |
#define FCODE_BqDO 0x18 |
542 |
// .117 |
543 |
#define FCODE_BEHAVIOR 0xde |
544 |
#define FCODE_BELL 0xab |
545 |
#define FCODE_BENDCASE 0xc5 |
546 |
// .118 |
547 |
#define FCODE_BENDOF 0xc6 |
548 |
#define FCODE_BETWEEN 0x44 |
549 |
#define FCODE_BFIELD 0xbe |
550 |
#define FCODE_BL 0xa9 |
551 |
#define FCODE_BLEAVE 0x1b |
552 |
#define FCODE_BLINK_SCREEN 0x15b |
553 |
// .119 |
554 |
#define FCODE_BLIT 0x10 |
555 |
#define FCODE_BLJOIN 0x7f |
556 |
#define FCODE_BLOOP 0x15 |
557 |
#define FCODE_BplusLOOP 0x16 |
558 |
// .120 |
559 |
#define FCODE_BltMARK 0xb1 |
560 |
#define FCODE_BODYgt 0x85 |
561 |
#define FCODE_gtBODY 0x86 |
562 |
#define FCODE_BOF 0x1c |
563 |
// .121 |
564 |
#define FCODE_BOUNDS 0xac |
565 |
#define FCODE_BgtRESOLVE 0xb2 |
566 |
#define FCODE_BS 0xaa |
567 |
// .122 |
568 |
#define FCODE_BTO 0xc3 |
569 |
#define FCODE_BVALUE 0xb8 |
570 |
#define FCODE_BVARIABLE 0xb9 |
571 |
#define FCODE_BWJOIN 0xb0 |
572 |
// .123 |
573 |
#define FCODE_BYTE_LOAD 0x23e |
574 |
#define FCODE_Cex 0x75 |
575 |
#define FCODE_Ccomma 0xd0 |
576 |
// .124 |
577 |
#define FCODE_slashC 0x5a |
578 |
#define FCODE_Cat 0x71 |
579 |
#define FCODE_CAplus 0x5e |
580 |
// .125 |
581 |
#define FCODE_dCALL_METHOD 0x20e |
582 |
#define FCODE_CALL_PACKAGE 0x208 |
583 |
#define FCODE_dCALL_PARENT 0x209 |
584 |
// .126 |
585 |
#define FCODE_CATCH 0x217 |
586 |
#define FCODE_CELLplus 0x65 |
587 |
#define FCODE_CELLS 0x69 |
588 |
#define FCODE_CHARplus 0x62 |
589 |
// .127 |
590 |
#define FCODE_CHAR_HEIGHT 0x16c |
591 |
#define FCODE_CHARS 0x66 |
592 |
#define FCODE_CHAR_WIDTH 0x16d |
593 |
#define FCODE_CHILD 0x23b |
594 |
// .128 |
595 |
#define FCODE_CLOSE_PACKAGE 0x206 |
596 |
#define FCODE_sharpCOLUMN 0x153 |
597 |
#define FCODE_sharpCOLUMNS 0x151 |
598 |
#define FCODE_COMP 0x7a |
599 |
// .129 |
600 |
#define FCODE_COMPILEcomma 0xdd |
601 |
// .130 |
602 |
#define FCODE_COUNT 0x84 |
603 |
#define FCODE_CPEEK 0x220 |
604 |
#define FCODE_CPOKE 0x223 |
605 |
#define FCODE_CR 0x92 |
606 |
#define FCODE_bracketCR 0x91 |
607 |
// .131 |
608 |
#define FCODE_Dplus 0xd8 |
609 |
#define FCODE_Dminus 0xd9 |
610 |
// .132 |
611 |
#define FCODE_DECODE_INT 0x21b |
612 |
#define FCODE_DECODE_PHYS 0x128 |
613 |
#define FCODE_DECODE_STRING 0x21c |
614 |
#define FCODE_DEFAULT_FONT 0x16a |
615 |
// .133 |
616 |
#define FCODE_DELETE_CHARS 0x15e |
617 |
#define FCODE_DELETE_LINES 0x160 |
618 |
#define FCODE_DELETE_PROPERTY 0x21e |
619 |
#define FCODE_DEPTH 0x51 |
620 |
// .134 |
621 |
#define FCODE_DEVICE_NAME 0x201 |
622 |
#define FCODE_DEVICE_TYPE 0x11a |
623 |
// .135 |
624 |
#define FCODE_DIAGNOSTIC_MODEq 0x120 |
625 |
#define FCODE_DIGIT 0xa3 |
626 |
// .138 |
627 |
#define FCODE_DRAW_CHARACTER 0x157 |
628 |
#define FCODE_DRAW_LOGO 0x161 |
629 |
#define FCODE_DROP 0x46 |
630 |
#define FCODE_2DROP 0x52 |
631 |
// .139 |
632 |
#define FCODE_DUP 0x47 |
633 |
#define FCODE_2DUP 0x53 |
634 |
#define FCODE_qDUP 0x50 |
635 |
#define FCODE_EMIT 0x8f |
636 |
#define FCODE_ENCODEplus 0x112 |
637 |
#define FCODE_ENCODE_BYTES 0x115 |
638 |
// .140 |
639 |
#define FCODE_ENCODE_INT 0x111 |
640 |
#define FCODE_ENCODE_PHYS 0x113 |
641 |
#define FCODE_ENCODE_STRING 0x114 |
642 |
// .141 |
643 |
#define FCODE_END0 0x00 |
644 |
#define FCODE_END1 0xff |
645 |
// .142 |
646 |
#define FCODE_ERASE_SCREEN 0x15a |
647 |
#define FCODE_EVALUATE 0xcd |
648 |
#define FCODE_EXECUTE 0x1d |
649 |
#define FCODE_EXIT 0x33 |
650 |
// .143 |
651 |
#define FCODE_EXPECT 0x8a |
652 |
#define FCODE_EXTERNAL_TOKEN 0xca |
653 |
// .144 |
654 |
#define FCODE_FB8_BLINK_SCREEN 0x184 |
655 |
#define FCODE_FB8_DELETE_CHARS 0x187 |
656 |
#define FCODE_FB8_DELETE_LINES 0x189 |
657 |
#define FCODE_FB8_DRAW_CHARACTER 0x180 |
658 |
#define FCODE_FB8_DRAW_LOGO 0x18a |
659 |
#define FCODE_FB8_ERASE_SCREEN 0x183 |
660 |
#define FCODE_FB8_INSERT_CHARACTERS 0x186 |
661 |
#define FCODE_FB8_INSERT_LINES 0x188 |
662 |
#define FCODE_FB8_INSTALL 0x18b |
663 |
#define FCODE_FB8_INVERT_SCREEN 0x185 |
664 |
// .145 |
665 |
#define FCODE_FB8_RESET_SCREEN 0x181 |
666 |
#define FCODE_FB8_TOGGLE_CURSOR 0x182 |
667 |
#define FCODE_FCODE_REVISION 0x87 |
668 |
#define FCODE_FERROR 0xfc |
669 |
// .146 |
670 |
#define FCODE_FILL 0x79 |
671 |
#define FCODE_dFIND 0xcb |
672 |
#define FCODE_FIND_METHOD 0x207 |
673 |
#define FCODE_FIND_PACKAGE 0x204 |
674 |
// .147 |
675 |
#define FCODE_FINISH_DEVICE 0x127 |
676 |
#define FCODE_gtFONT 0x16e |
677 |
#define FCODE_FONTBYTES 0x16f |
678 |
#define FCODE_FRAME_BUFFER_ADR 0x162 |
679 |
#define FCODE_FREE_MEM 0x8c |
680 |
#define FCODE_FREE_VIRTUAL 0x105 |
681 |
// .148 |
682 |
#define FCODE_GET_INHERITED_PROPERTIY 0x21d |
683 |
#define FCODE_GET_MSECS 0x125 |
684 |
#define FCODE_GET_MY_PROPERTY 0x21a |
685 |
#define FCODE_GET_PACKAGE_PROPERTY 0x21f |
686 |
#define FCODE_GET_TOKEN 0xda |
687 |
// .151 |
688 |
#define FCODE_HERE 0xad |
689 |
// .150 |
690 |
#define FCODE_HOLD 0x95 |
691 |
#define FCODE_I 0x19 |
692 |
#define FCODE_IHANDLEgtPHANDLE 0x20b |
693 |
// .151 |
694 |
#define FCODE_INSERT_CHARACTERS 0x15d |
695 |
#define FCODE_INSERT_LINES 0x15f |
696 |
// .152 |
697 |
#define FCODE_INSTANCE 0xc0 |
698 |
// .153 |
699 |
#define FCODE_INVERSEq 0x154 |
700 |
#define FCODE_INVERSE_SCREENq 0x155 |
701 |
#define FCODE_INVERT 0x26 |
702 |
// .154 |
703 |
#define FCODE_INVERT_SCREEN 0x15c |
704 |
#define FCODE_IS_INSTALL 0x11c |
705 |
#define FCODE_IS_REMOVE 0x11d |
706 |
#define FCODE_IS_SELFTEST 0x11e |
707 |
#define FCODE_bIS_USER_WORDd 0x214 |
708 |
// .155 |
709 |
#define FCODE_J 0x1a |
710 |
#define FCODE_KEY 0x8e |
711 |
#define FCODE_KEYq 0x8d |
712 |
#define FCODE_Lex 0x73 |
713 |
#define FCODE_Lcomma 0xd2 |
714 |
#define FCODE_Lat 0x6e |
715 |
#define FCODE_divL 0x5c |
716 |
#define FCODE_divLmul 0x68 |
717 |
#define FCODE_LAplus 0x60 |
718 |
#define FCODE_LA1plus 0x64 |
719 |
// .156 |
720 |
#define FCODE_LBFLIP 0x227 |
721 |
#define FCODE_LBFLIPS 0x228 |
722 |
#define FCODE_LBSPLIT 0x7e |
723 |
#define FCODE_LCC 0x82 |
724 |
#define FCODE_LEFT_PARSE_STRING 0x240 |
725 |
// .157 |
726 |
#define FCODE_LINEsharp 0x152 |
727 |
#define FCODE_sharpLINE 0x94 //var |
728 |
#define FCODE_sharpLINES 0x150 |
729 |
// .159 |
730 |
#define FCODE_LPEEK 0x222 |
731 |
#define FCODE_LPOKE 0x225 |
732 |
#define FCODE_LSHIFT 0x27 |
733 |
#define FCODE_LWFLIP 0x226 |
734 |
#define FCODE_LWFLIPS 0x237 |
735 |
#define FCODE_LWSPLIT 0x7c |
736 |
#define FCODE_MAC_ADDRESS 0x1a4 |
737 |
// .160 |
738 |
#define FCODE_MAP_LOW 0x130 |
739 |
#define FCODE_MASK 0x124 |
740 |
// .161 |
741 |
#define FCODE_MAX 0x2f |
742 |
#define FCODE_MEMORY_TEST_SUITE 0x122 |
743 |
#define FCODE_MIN 0x2e |
744 |
// .162 |
745 |
#define FCODE_MOD 0x22 |
746 |
#define FCODE_divMOD 0x2a |
747 |
#define FCODE_MODEL 0x119 |
748 |
#define FCODE_MOVE 0x78 |
749 |
#define FCODE_MS 0x126 |
750 |
// .163 |
751 |
#define FCODE_MY_ADDRESS 0x102 |
752 |
#define FCODE_MY_ARGS 0x202 |
753 |
#define FCODE_MY_PARENT 0x20a |
754 |
#define FCODE_MY_SELF 0x203 |
755 |
#define FCODE_MY_SPACE 0x103 |
756 |
#define FCODE_MY_UNIT 0x20d |
757 |
#define FCODE_slashN 0x5d |
758 |
// .164 |
759 |
#define FCODE_NAplus 0x61 |
760 |
// .165 |
761 |
#define FCODE_NAMED_TOKEN 0xb6 |
762 |
#define FCODE_NEGATE 0x2c |
763 |
#define FCODE_NEW_DEVICE 0x11f |
764 |
// .166 |
765 |
#define FCODE_NEW_TOKEN 0xb5 |
766 |
#define FCODE_NEXT_PROPERTY 0x23d |
767 |
#define FCODE_NIP 0x4d |
768 |
#define FCODE_NOOP 0x7b |
769 |
// .167 |
770 |
#define FCODE_dNUMBER 0xa2 |
771 |
// .169 |
772 |
#define FCODE_OFF 0x6b |
773 |
// .170 |
774 |
#define FCODE_OFFSET16 0xcc |
775 |
#define FCODE_ON 0x6a |
776 |
#define FCODE_OPEN_PACKAGE 0x205 |
777 |
// .171 |
778 |
#define FCODE_dOPEN_PACKAGE 0x20f |
779 |
#define FCODE_OR 0x24 |
780 |
#define FCODE_sharpOUT 0x93 // var |
781 |
#define FCODE_OVER 0x48 |
782 |
#define FCODE_2OVER 0x54 |
783 |
#define FCODE_PACK 0x83 |
784 |
// .172 |
785 |
#define FCODE_PARSE_2INT 0x11b |
786 |
// .173 |
787 |
#define FCODE_PEER 0x23c |
788 |
#define FCODE_PICK 0x4e |
789 |
// .174 |
790 |
#define FCODE_PROPERTY 0x110 |
791 |
#define FCODE_Rgt 0x31 |
792 |
#define FCODE_Rat 0x32 |
793 |
#define FCODE_dotR 0x9e |
794 |
#define FCODE_gtR 0x30 |
795 |
// .175 |
796 |
#define FCODE_RBex 0x231 |
797 |
#define FCODE_RBat 0x230 |
798 |
// .177 |
799 |
#define FCODE_REG 0x116 |
800 |
// .179 |
801 |
#define FCODE_RESET_SCREEN 0x158 |
802 |
#define FCODE_RLex 0x235 |
803 |
// .180 |
804 |
#define FCODE_RLat 0x234 |
805 |
#define FCODE_ROLL 0x4f |
806 |
#define FCODE_ROT 0x4a |
807 |
#define FCODE_mROT 0x4b |
808 |
#define FCODE_2ROT 0x56 |
809 |
#define FCODE_RSHIFT 0x28 |
810 |
#define FCODE_RWex 0x233 |
811 |
// .181 |
812 |
#define FCODE_RWat 0x232 |
813 |
#define FCODE_sharpS 0xc8 |
814 |
#define FCODE_dotS 0x9f |
815 |
// .182 |
816 |
#define FCODE_SBUS_INTRgtCPU 0x131 |
817 |
#define FCODE_SCREEN_HEIGHT 0x163 |
818 |
#define FCODE_SCREEN_WIDTH 0x164 |
819 |
// .184 |
820 |
#define FCODE_SET_ARGS 0x23f |
821 |
// .185 |
822 |
#define FCODE_SET_FONT 0x16b |
823 |
#define FCODE_SET_TOKEN 0xdb |
824 |
// .186 |
825 |
#define FCODE_SIGN 0x98 |
826 |
#define FCODE_SPAN 0x88 // var |
827 |
// .187 |
828 |
#define FCODE_START0 0xf0 |
829 |
#define FCODE_START1 0xf1 |
830 |
#define FCODE_START2 0xf2 |
831 |
#define FCODE_START4 0xf3 |
832 |
#define FCODE_STATE 0xdc // var |
833 |
// .189 |
834 |
#define FCODE_SUSPEND_FCODE 0x215 |
835 |
#define FCODE_SWAP 0x49 |
836 |
#define FCODE_2SWAP 0x55 |
837 |
// .190 |
838 |
#define FCODE_THROW 0x218 |
839 |
// .191 |
840 |
#define FCODE_TOGGLE_CURSOR 0x159 |
841 |
#define FCODE_TUCK 0x4c |
842 |
#define FCODE_TYPE 0x90 |
843 |
// .192 |
844 |
#define FCODE_Usharp 0x99 |
845 |
#define FCODE_Usharpgt 0x97 |
846 |
#define FCODE_UsharpS 0x9a |
847 |
#define FCODE_Udot 0x9b |
848 |
#define FCODE_Ult 0x40 |
849 |
#define FCODE_Ultequal 0x3f |
850 |
#define FCODE_Ugt 0x3e |
851 |
#define FCODE_Ugtequal 0x41 |
852 |
#define FCODE_U2div 0x58 |
853 |
#define FCODE_UMmul 0xd4 |
854 |
#define FCODE_UMdivMOD 0xd5 |
855 |
// .193 |
856 |
#define FCODE_UdivMOD 0x2b |
857 |
#define FCODE_UNLOOP 0x89 |
858 |
#define FCODE_UPC 0x81 |
859 |
#define FCODE_UdotR 0x9c |
860 |
// .194 |
861 |
#define FCODE_USER_ABORT 0x219 |
862 |
#define FCODE_VERSION1 0xfd |
863 |
#define FCODE_Wex 0x74 |
864 |
#define FCODE_Wcomma 0xd1 |
865 |
#define FCODE_Wat 0x6f |
866 |
#define FCODE_slashW 0x5b |
867 |
// .195 |
868 |
#define FCODE_slashWmul 0x67 |
869 |
#define FCODE_ltWat 0x70 |
870 |
#define FCODE_WAplus 0x5f |
871 |
#define FCODE_WA1plus 0x63 |
872 |
#define FCODE_WBFLIP 0x80 |
873 |
#define FCODE_WBFLIPS 0x236 |
874 |
#define FCODE_WBSPLIT 0xaf |
875 |
#define FCODE_WINDOW_LEFT 0x166 |
876 |
#define FCODE_WINDOW_TOP 0x165 |
877 |
#define FCODE_WITHIN 0x45 |
878 |
// .196 |
879 |
#define FCODE_WLJOIN 0x7d |
880 |
#define FCODE_WPEEK 0x221 |
881 |
#define FCODE_WPOKE 0x224 |
882 |
#define FCODE_XOR 0x25 |
883 |
#endif |
884 |
|