diff options
author | Clyne Sullivan <clyne@bitgloo.com> | 2023-03-11 10:26:02 -0500 |
---|---|---|
committer | Clyne Sullivan <clyne@bitgloo.com> | 2023-03-11 10:26:02 -0500 |
commit | 400e277b0c111739ea4ed426328cbcc4472744df (patch) | |
tree | 5b32bd7d5820d6cdc16838dac14ca616bd44dc5a /core-ext.fth | |
parent | e41b124320011cb1451f9869710a110058ee95aa (diff) |
make forth and msp430 folders
Diffstat (limited to 'core-ext.fth')
-rw-r--r-- | core-ext.fth | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/core-ext.fth b/core-ext.fth deleted file mode 100644 index e1f7eac..0000000 --- a/core-ext.fth +++ /dev/null @@ -1,49 +0,0 @@ --1 constant true -0 constant false - -: hex 16 base ! ; - -: nip swap drop ; -: tuck swap over ; - -: 0> 0 > ; -: 0<> 0= 0= ; - -: 2r@ ['] r> , ['] r> , ['] 2dup , ['] >r , ['] >r , ['] swap , ; imm - -: compile, postpone literal postpone execute ; -: \ _source @ >in @ + - begin dup c@ while 0 over c! char+ repeat drop ; imm -: again postpone repeat ; imm -: ?do ['] 2dup , ['] _lit , here 0 , ['] >r , ['] = , postpone if - ['] 2drop , postpone 2r> ['] drop , ['] >r , ['] exit , - postpone then postpone 2>r here ; imm - -: .( [char] ) word count type ; imm -: c" state @ if ['] _jmp , here 0 , then - [char] " word - state @ 0= if exit then - dup count nip allot - here rot ! - postpone literal ; imm - -: buffer: create allot ; -: value constant ; -: to ' 4 cells + state @ if postpone literal ['] ! , else ! then ; imm -: defer create does> @ execute ; -: defer@ >body @ ; -: defer! >body ! ; -: is state @ if postpone ['] postpone defer! else ' defer! then ; imm -: action-of state @ if postpone ['] postpone defer@ else ' defer@ then ; imm - -: erase begin dup 0 > while swap 0 over ! 1+ swap 1- repeat ; -: roll dup if swap >r 1- recurse r> swap exit then drop ; - -: marker create _latest @ , here , does> - dup @ _latest ! cell+ @ here swap - allot ; - -: case ['] _lit , 1 here 0 , ['] drop , ; imm -: of ['] over , ['] = , postpone if ; imm -: endof ['] _jmp , here >r 0 , postpone then - swap 1+ swap r> tuck ! ; imm -: endcase swap 0 do dup @ swap here swap ! loop drop ['] drop , ; imm |