Commit ca8ced94 authored by psf's avatar psf
Browse files

WORD no longer leaves delimiter on stack

parent cd1310e8
......@@ -310,12 +310,12 @@ fn build_dictionary(c: &mut Core) {
d.entry(); d.name(5, *b"get"); let getcs = d.here;
forth!(getcs_helper, RET);
// word ( -- c )
// word ( -- )
// Not quite standard.
d.entry(); d.name(4, *b"wor"); let word = d.here;
forth!(Literal(word_buf), DUP, Literal(2), ADD,
Literal(0x2020), SWP, ST, Literal(0x2000), SWP, ST,
skipws, getcs, RET);
skipws, getcs, DRP, RET);
// latest ( -- a )
// Address of "latest" variable. This variable stores the address of
......@@ -346,7 +346,7 @@ fn build_dictionary(c: &mut Core) {
// ' ( -- xt|0 )
d.entry(); d.name(1, *b"' ");
forth!(word, DRP, find, RET);
forth!(word, find, RET);
/* --- The outer interpreter ---
*/
......@@ -441,11 +441,11 @@ fn build_dictionary(c: &mut Core) {
// quit ( -- )
d.entry(); d.name(4, *b"qui"); let quit = d.here;
forth!(word, DRP, find, dispatch, quit);
forth!(word, find, dispatch, quit);
// create ( -- )
d.entry(); d.name(6, *b"cre"); let create = d.here;
forth!(word, DRP,
forth!(word,
here, LD, latest, LD, comma, latest, ST,
Literal(word_buf), DUP, LD, comma, Literal(2), ADD, LD, comma, RET);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment