|
|
@ -138,10 +138,12 @@
|
|
|
|
begin dup c@ 0 = while _in repeat
|
|
|
|
begin dup c@ 0 = while _in repeat
|
|
|
|
c@ 1 >in +! ;
|
|
|
|
c@ 1 >in +! ;
|
|
|
|
: key? _source @ >in @ + c@ 0 <> ;
|
|
|
|
: key? _source @ >in @ + c@ 0 <> ;
|
|
|
|
: word here dup >r char+ >r
|
|
|
|
: word begin key? if key else -1 then 2dup <> until
|
|
|
|
begin key? if key 2dup <> else 0 0 then while
|
|
|
|
key? 0= if 2drop 0 here c! here exit then
|
|
|
|
r> swap over c! char+ >r repeat
|
|
|
|
here begin char+ swap over c! swap
|
|
|
|
2drop r> r> swap over - 1- over c! ;
|
|
|
|
key? if key else dup then
|
|
|
|
|
|
|
|
2dup <> while rot repeat
|
|
|
|
|
|
|
|
2drop here - here c! here ;
|
|
|
|
: count dup char+ swap c@ ;
|
|
|
|
: count dup char+ swap c@ ;
|
|
|
|
: char bl word char+ c@ ;
|
|
|
|
: char bl word char+ c@ ;
|
|
|
|
: [char] char postpone literal ; imm
|
|
|
|
: [char] char postpone literal ; imm
|
|
|
@ -166,7 +168,7 @@
|
|
|
|
['] _jmp over ! cell+ r> cell+ swap ! ;
|
|
|
|
['] _jmp over ! cell+ r> cell+ swap ! ;
|
|
|
|
|
|
|
|
|
|
|
|
: does> state @ if
|
|
|
|
: does> state @ if
|
|
|
|
here 3 cells + postpone literal ['] _does> , ['] exit , else
|
|
|
|
['] _lit , here 2 cells + , ['] _does> , ['] exit , else
|
|
|
|
here dup _does> dup _compxt ! 0 , ] then ; imm
|
|
|
|
here dup _does> dup _compxt ! 0 , ] then ; imm
|
|
|
|
|
|
|
|
|
|
|
|
: variable create 1 cells allot ;
|
|
|
|
: variable create 1 cells allot ;
|
|
|
|