The Lambda Lab
/
projects
/
forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Broken draft of vocab implementation.
[forth.jl.git]
/
src
/
lib_1_basic.4th
diff --git
a/src/lib_1_basic.4th
b/src/lib_1_basic.4th
index
40851f3
..
dc8c584
100644
(file)
--- a/
src/lib_1_basic.4th
+++ b/
src/lib_1_basic.4th
@@
-44,10
+44,13
@@
: SPACE BL emit ;
: ' BL WORD FIND DROP ;
: SPACE BL emit ;
: ' BL WORD FIND DROP ;
-: [COMPILE] IMMEDIATE ' , ;
: ['] IMMEDIATE
LIT LIT , ' , ;
: ['] IMMEDIATE
LIT LIT , ' , ;
+: [COMPILE] IMMEDIATE ' , ;
+: COMPILE IMMEDIATE
+ LIT LIT , ' , LIT , , ;
+
: LITERAL IMMEDIATE ['] LIT , , ;
: CHAR BL WORD 1+ @ ;
: LITERAL IMMEDIATE ['] LIT , , ;
: CHAR BL WORD 1+ @ ;
@@
-56,9
+59,12
@@
['] LIT , ,
;
['] LIT , ,
;
+: LATEST
+ CURRENT @ ;
+
: RECURSE IMMEDIATE
LATEST @ \ LATEST points to the word being compiled at the moment
: RECURSE IMMEDIATE
LATEST @ \ LATEST points to the word being compiled at the moment
-
>CFA
\ get the codeword
+
LFA>CFA
\ get the codeword
, \ compile it
;
, \ compile it
;