From 3411fec40d91f56007f7ff5dfce41c9453562162 Mon Sep 17 00:00:00 2001 From: Koichi Nakamura Date: Mon, 11 Jan 2021 10:14:33 +0900 Subject: [PATCH] Add >body --- bootstrap.fs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bootstrap.fs b/bootstrap.fs index e8c1de5..c111e1b 100644 --- a/bootstrap.fs +++ b/bootstrap.fs @@ -566,6 +566,7 @@ allot-cell : &find! [ ' L , , ] ; \ ( c-addr -- nt ) Throw exception at error : 2 [ key 2 key 0 - ] literal ; : 3 [ key 3 key 0 - ] literal ; : 4 [ key 4 key 0 - ] literal ; +: 5 [ key 5 key 0 - ] literal ; : 10 [ key : key 0 - ] literal ; : 16 [ key @ key 0 - ] literal ; : -1 [ key 0 key 1 - ] literal ; @@ -879,6 +880,10 @@ allot-cell : &find! [ ' L , , ] ; \ ( c-addr -- nt ) Throw exception at error ['] exit , \ compile exit ; +: >body ( xt -- a-addr ) + 5 cells + +; + : (does>) latest >cfa 3 cells + ! \ replace nop @@ -2488,7 +2493,7 @@ need-defined (read) .s . .r u. u.r dec. hex. type ." s" bl '\n' cr space base decimal hex catch throw success - : ; [ ] immediate create :noname does> variable constant + : ; [ ] immediate create >body :noname does> variable constant ' ['] compile [compile] literal state + - * /mod / mod negate not and or xor invert within max min abs < > <= >= = <> 0< 0> 0<= 0>= 0= 0<> 1+ 1-