diff options
| author | kitty <nepeta@canaglie.net> | 2026-04-16 23:19:10 +1000 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-04-16 23:19:10 +1000 |
| commit | adfb477ea53d3e6ca7b07a77d514f56dc6a2e996 (patch) | |
| tree | d8d9c5f82b3f2c3c69c1afa1867be5581b289d72 /sanctuary.fs | |
| parent | 6ff9e379accc25d7c9fda0d51cf83b48139620a5 (diff) | |
do of loop
Diffstat (limited to 'sanctuary.fs')
| -rw-r--r-- | sanctuary.fs | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/sanctuary.fs b/sanctuary.fs index de37b52..8880ccb 100644 --- a/sanctuary.fs +++ b/sanctuary.fs @@ -339,22 +339,41 @@ privatise begin refill while interpret repeat 1 -to include-depth r> to source-id ; : included ( a u -- ) s>z r/o open-file 0= if - dup >r - include-file - r> - close-file + dup >r include-file + r> close-file else drop abort" file open for include failed" then ; : include ( "path" -- ) parse-name included ; \ }}} -\ \ VOCABULARY {{{ +\ DO LOOP {{{ +\ todo doc +: do postpone swap postpone >r postpone >r <mark ; immediate compile-only +\ : ?do postpone <> ?branch >mark +\ postpone swap postpone >r postpone >r <mark ; immediate compile-only +: +loop postpone r> postpone + postpone r@ + postpone over postpone >r ( n+i lim , R: lim n+i ) + postpone >= + ?branch <resolve + postpone rdrop postpone rdrop ; immediate compile-only +\ todo -loop +: loop postpone r> postpone 1+ postpone r@ + postpone over postpone >r ( n+i lim , R: lim n+i ) + postpone >= + ?branch <resolve + postpone rdrop postpone rdrop ; immediate compile-only +: i r@ ; +\ }}} + +\ VOCABULARY {{{ \ do this after user input and stuff is Working -\ 32 constant #vocs -\ variable #order -\ create context #vocs cells allot -\ \ }}} +\ words in asm that use latest directly: +\ find (header) : ; smudge immediate compile-only +32 constant #vocs \ #context better name ? +variable #order +create context #vocs cells allot +\ }}} \ PROGRAMMING TOOLS {{{ \ should write top of stack on right |
