|
|
@ -90,7 +90,7 @@
|
|
|
|
: 2* 2 * ;
|
|
|
|
: 2* 2 * ;
|
|
|
|
: 2/ 2 / ;
|
|
|
|
: 2/ 2 / ;
|
|
|
|
|
|
|
|
|
|
|
|
: cr 9 emit ;
|
|
|
|
: cr 10 emit ;
|
|
|
|
: bl 32 ;
|
|
|
|
: bl 32 ;
|
|
|
|
: space bl emit ;
|
|
|
|
: space bl emit ;
|
|
|
|
: spaces begin dup 0 > while space 1- repeat drop ;
|
|
|
|
: spaces begin dup 0 > while space 1- repeat drop ;
|
|
|
@ -119,7 +119,14 @@
|
|
|
|
dup cell+ allot
|
|
|
|
dup cell+ allot
|
|
|
|
rot here swap !
|
|
|
|
rot here swap !
|
|
|
|
swap postpone literal postpone literal ; imm
|
|
|
|
swap postpone literal postpone literal ; imm
|
|
|
|
|
|
|
|
: c" state @ if ['] _jmp , here 0 , then
|
|
|
|
|
|
|
|
[char] " word
|
|
|
|
|
|
|
|
state @ 0= if exit then
|
|
|
|
|
|
|
|
dup count nip allot
|
|
|
|
|
|
|
|
here rot !
|
|
|
|
|
|
|
|
postpone literal ; imm
|
|
|
|
: ." postpone s" state @ if ['] type , else type then ; imm
|
|
|
|
: ." postpone s" state @ if ['] type , else type then ; imm
|
|
|
|
|
|
|
|
: .( [char] ) word count type ; imm
|
|
|
|
|
|
|
|
|
|
|
|
: create align here bl word count nip cell+ allot align
|
|
|
|
: create align here bl word count nip cell+ allot align
|
|
|
|
['] _lit , here 3 cells + , ['] exit dup , ,
|
|
|
|
['] _lit , here 3 cells + , ['] exit dup , ,
|
|
|
@ -134,6 +141,7 @@
|
|
|
|
: >body cell+ @ ;
|
|
|
|
: >body cell+ @ ;
|
|
|
|
: compile, postpone literal postpone execute ;
|
|
|
|
: compile, postpone literal postpone execute ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
: buffer: create allot ;
|
|
|
|
: variable create 1 cells allot ;
|
|
|
|
: variable create 1 cells allot ;
|
|
|
|
: constant create , does> @ ;
|
|
|
|
: constant create , does> @ ;
|
|
|
|
: value constant ;
|
|
|
|
: value constant ;
|
|
|
@ -156,12 +164,13 @@
|
|
|
|
: recurse _latword , ; imm
|
|
|
|
: recurse _latword , ; imm
|
|
|
|
|
|
|
|
|
|
|
|
: move begin dup 0 > while
|
|
|
|
: move begin dup 0 > while
|
|
|
|
rot dup @ >r cell+
|
|
|
|
rot dup @ >r 1+
|
|
|
|
rot r> over ! cell+
|
|
|
|
rot r> over ! 1+
|
|
|
|
rot 1- repeat drop 2drop ;
|
|
|
|
rot 1- repeat drop 2drop ;
|
|
|
|
: fill -rot begin dup 0 > while
|
|
|
|
: fill -rot begin dup 0 > while
|
|
|
|
>r 2dup c! char+ r> 1- repeat
|
|
|
|
>r 2dup c! char+ r> 1- repeat
|
|
|
|
2drop drop ;
|
|
|
|
2drop drop ;
|
|
|
|
|
|
|
|
: erase begin dup 0 > while swap 0 over ! 1+ swap 1- repeat ;
|
|
|
|
: roll dup if swap >r 1- recurse r> swap exit then drop ;
|
|
|
|
: roll dup if swap >r 1- recurse r> swap exit then drop ;
|
|
|
|
|
|
|
|
|
|
|
|
: environment? 2drop false ;
|
|
|
|
: environment? 2drop false ;
|
|
|
|