add create, does>, etc

main
Clyne 3 weeks ago
parent bf8436019d
commit 08e9b769f4
Signed by: clyne
GPG Key ID: 3267C8EBF3F9AFC7

@ -106,3 +106,13 @@
: j postpone 2r> ['] r> , postpone r@ ['] swap , : j postpone 2r> ['] r> , postpone r@ ['] swap ,
['] >r , ['] -rot , postpone 2>r ; immediate ['] >r , ['] -rot , postpone 2>r ; immediate
: create : here [ 4 cells ] literal + postpone literal postpone ; 0 , ;
: >body [ 2 cells ] literal + @ ;
: _does> latest dup cell+ @ [ 5 cells ] literal + +
['] _jmp over ! cell+ ! ;
: does> here 4 cells + postpone literal ['] _does> , 0 , ; immediate
: variable create cell allot ;
: constant create , does> @ ;

Loading…
Cancel
Save