| |
|
| has? f83headerstring [IF] |
has? f83headerstring [IF] |
| \ to save space, Gforth EC limits words to 31 characters |
\ to save space, Gforth EC limits words to 31 characters |
| |
\ also, there's no predule concept in Gforth EC |
| $80 constant alias-mask |
$80 constant alias-mask |
| $40 constant immediate-mask |
$40 constant immediate-mask |
| $20 constant restrict-mask |
$20 constant restrict-mask |
| (name>x) tuck (x>int) ( w xt ) |
(name>x) tuck (x>int) ( w xt ) |
| swap immediate-mask and [ has? rom [IF] ] 0= [ [THEN] ] flag-sign ; |
swap immediate-mask and [ has? rom [IF] ] 0= [ [THEN] ] flag-sign ; |
| |
|
| |
[IFDEF] prelude-mask |
| : name>prelude ( nt -- xt ) |
: name>prelude ( nt -- xt ) |
| dup cell+ @ prelude-mask and if |
dup cell+ @ prelude-mask and if |
| [ -1 cells ] literal + @ |
[ -1 cells ] literal + @ |
| else |
else |
| drop ['] noop |
drop ['] noop |
| then ; |
then ; |
| |
[THEN] |
| |
|
| const Create ??? 0 , 3 , char ? c, char ? c, char ? c, |
const Create ??? 0 , 3 , char ? c, char ? c, char ? c, |
| \ ??? is used by dovar:, must be created/:dovar |
\ ??? is used by dovar:, must be created/:dovar |
| |
|
| \ interpreter 30apr92py |
\ interpreter 30apr92py |
| |
|
| |
[IFDEF] prelude-mask |
| : run-prelude ( nt|0 -- nt|0 ) |
: run-prelude ( nt|0 -- nt|0 ) |
| \ run the prelude of the name identified by nt (if present). This |
\ run the prelude of the name identified by nt (if present). This |
| \ is used in the text interpreter and similar stuff. |
\ is used in the text interpreter and similar stuff. |
| dup if |
dup if |
| dup name>prelude execute |
dup name>prelude execute |
| then ; |
then ; |
| |
[THEN] |
| |
|
| \ not the most efficient implementations of interpreter and compiler |
\ not the most efficient implementations of interpreter and compiler |
| : interpreter1 ( c-addr u -- ... xt ) |
: interpreter1 ( c-addr u -- ... xt ) |
| 2dup find-name run-prelude dup |
2dup find-name [ [IFDEF] prelude-mask ] run-prelude [ [THEN] ] dup |
| if |
if |
| nip nip name>int |
nip nip name>int |
| else |
else |