diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-25 10:09:33 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-02-25 10:09:33 -0500 |
commit | fc0d3ed9cfebd853db2a2ab26993a186a29180b1 (patch) | |
tree | 618730ac12c318950c24ef40fe21a839216a5c4a /core.fth | |
parent | 34e5d76f9851f13a2c6611de065c229bafb17378 (diff) |
implement leave
Diffstat (limited to 'core.fth')
-rw-r--r-- | core.fth | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -73,11 +73,14 @@ : until ['] _jmp0 , , drop ; imm : again postpone repeat ; imm -: do postpone 2>r here ; imm +: do ['] _lit , here 0 , ['] >r , postpone 2>r here ; imm : unloop postpone 2r> ['] 2drop , ; imm +: leave postpone unloop postpone 2r> + ['] drop , ['] >r , ['] exit , ; imm : +loop postpone 2r> ['] rot , ['] + , ['] 2dup , postpone 2>r ['] - , ['] 0= , ['] _jmp0 , , - postpone unloop ; imm + postpone unloop + here swap ! ['] r> , ['] drop , ; imm : loop 1 postpone literal postpone +loop ; imm : i postpone r@ ; imm : j postpone 2r> postpone r@ ['] -rot , postpone 2>r ; imm |