From 4a865170411e49924c6bc95fe871d32d4a40ddbb Mon Sep 17 00:00:00 2001 From: kitty Date: Sun, 12 Apr 2026 22:54:35 +1000 Subject: evaluate, welcome no docs yet still --- sanctuary.fs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sanctuary.fs b/sanctuary.fs index 6342227..0922cbc 100644 --- a/sanctuary.fs +++ b/sanctuary.fs @@ -313,8 +313,17 @@ privatise dup #tib ! 0<> if true else false then ; +\ todo reset RSP : quit 0 to source-id postpone [ begin refill while interpret ." ok" cr repeat ; + +: (evaluate) ( a u -- ) 0 >in ! ( u ) #tib ! ( a ) tib ! + source-id >r string-source to source-id + interpret + r> to source-id ; +: evaluate ( a u -- ) tib @ >r #tib @ >r >in @ >r + (evaluate) + r> >in ! r> #tib ! r> tib ! ; \ }}} \ \ VOCABULARY {{{ @@ -330,4 +339,9 @@ privatise \ gonna need to be rewritten when/if i add vocabulary/wordlist support \ : words ; \ }}} -quit bye + +\ todo doc +0 constant version +: welcome ." sanctuary: a 64 bit forth for linux, version " version u. cr ; + +welcome quit bye -- cgit v1.2.3