mirror of
https://gitlab.cs.washington.edu/fidelp/frustration.git
synced 2024-12-25 21:58:11 +01:00
WORD no longer leaves delimiter on stack
This commit is contained in:
parent
cd1310e803
commit
ca8ced9494
1 changed files with 5 additions and 5 deletions
|
@ -310,12 +310,12 @@ fn build_dictionary(c: &mut Core) {
|
||||||
d.entry(); d.name(5, *b"get"); let getcs = d.here;
|
d.entry(); d.name(5, *b"get"); let getcs = d.here;
|
||||||
forth!(getcs_helper, RET);
|
forth!(getcs_helper, RET);
|
||||||
|
|
||||||
// word ( -- c )
|
// word ( -- )
|
||||||
// Not quite standard.
|
// Not quite standard.
|
||||||
d.entry(); d.name(4, *b"wor"); let word = d.here;
|
d.entry(); d.name(4, *b"wor"); let word = d.here;
|
||||||
forth!(Literal(word_buf), DUP, Literal(2), ADD,
|
forth!(Literal(word_buf), DUP, Literal(2), ADD,
|
||||||
Literal(0x2020), SWP, ST, Literal(0x2000), SWP, ST,
|
Literal(0x2020), SWP, ST, Literal(0x2000), SWP, ST,
|
||||||
skipws, getcs, RET);
|
skipws, getcs, DRP, RET);
|
||||||
|
|
||||||
// latest ( -- a )
|
// latest ( -- a )
|
||||||
// Address of "latest" variable. This variable stores the address of
|
// Address of "latest" variable. This variable stores the address of
|
||||||
|
@ -346,7 +346,7 @@ fn build_dictionary(c: &mut Core) {
|
||||||
|
|
||||||
// ' ( -- xt|0 )
|
// ' ( -- xt|0 )
|
||||||
d.entry(); d.name(1, *b"' ");
|
d.entry(); d.name(1, *b"' ");
|
||||||
forth!(word, DRP, find, RET);
|
forth!(word, find, RET);
|
||||||
|
|
||||||
/* --- The outer interpreter ---
|
/* --- The outer interpreter ---
|
||||||
*/
|
*/
|
||||||
|
@ -441,11 +441,11 @@ fn build_dictionary(c: &mut Core) {
|
||||||
|
|
||||||
// quit ( -- )
|
// quit ( -- )
|
||||||
d.entry(); d.name(4, *b"qui"); let quit = d.here;
|
d.entry(); d.name(4, *b"qui"); let quit = d.here;
|
||||||
forth!(word, DRP, find, dispatch, quit);
|
forth!(word, find, dispatch, quit);
|
||||||
|
|
||||||
// create ( -- )
|
// create ( -- )
|
||||||
d.entry(); d.name(6, *b"cre"); let create = d.here;
|
d.entry(); d.name(6, *b"cre"); let create = d.here;
|
||||||
forth!(word, DRP,
|
forth!(word,
|
||||||
here, LD, latest, LD, comma, latest, ST,
|
here, LD, latest, LD, comma, latest, ST,
|
||||||
Literal(word_buf), DUP, LD, comma, Literal(2), ADD, LD, comma, RET);
|
Literal(word_buf), DUP, LD, comma, Literal(2), ADD, LD, comma, RET);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue