version 1.33, 1995/12/23 16:21:56
|
version 1.38, 1996/08/21 14:58:38
|
Line 278 Variable last-ghost
|
Line 278 Variable last-ghost
|
|
|
: gfind ( string -- ghost true/1 / string false ) |
: gfind ( string -- ghost true/1 / string false ) |
\ searches for string in word-list ghosts |
\ searches for string in word-list ghosts |
\ !! wouldn't it be simpler to just use search-wordlist ? ae |
|
dup count [ ' ghosts >body ] ALiteral search-wordlist |
dup count [ ' ghosts >body ] ALiteral search-wordlist |
dup IF >r >body nip r> THEN ; |
dup IF >r >body nip r> THEN ; |
|
|
VARIABLE Already |
VARIABLE Already |
|
|
Line 357 variable ResolveFlag
|
Line 356 variable ResolveFlag
|
VARIABLE ^imm |
VARIABLE ^imm |
|
|
>TARGET |
>TARGET |
: immediate 20 flag! |
: immediate 40 flag! |
^imm @ @ dup <imm> = IF drop EXIT THEN |
^imm @ @ dup <imm> = IF drop EXIT THEN |
<res> <> ABORT" CROSS: Cannot immediate a unresolved word" |
<res> <> ABORT" CROSS: Cannot immediate a unresolved word" |
<imm> ^imm @ ! ; |
<imm> ^imm @ ! ; |
: restrict 40 flag! ; |
: restrict 20 flag! ; |
>CROSS |
>CROSS |
|
|
\ ALIAS2 ansforth conform alias 9may93jaw |
\ ALIAS2 ansforth conform alias 9may93jaw |
Line 569 Cond: [Char] ( "<char>" -- ) restrict
|
Line 568 Cond: [Char] ( "<char>" -- ) restrict
|
(THeader ;Resolve ! there ;Resolve cell+ ! |
(THeader ;Resolve ! there ;Resolve cell+ ! |
docol, depth T ] H ; |
docol, depth T ] H ; |
|
|
|
: :noname ( -- colon-sys ) |
|
T align H there docol, depth T ] H ; |
|
|
Cond: EXIT ( -- ) restrict? compile ;S ;Cond |
Cond: EXIT ( -- ) restrict? compile ;S ;Cond |
|
|
Cond: ?EXIT ( -- ) 1 abort" CROSS: using ?exit" ;Cond |
Cond: ?EXIT ( -- ) 1 abort" CROSS: using ?exit" ;Cond |
Line 703 DO: ( ghost -- ) ABORT" CROSS: Don't exe
|
Line 705 DO: ( ghost -- ) ABORT" CROSS: Don't exe
|
Builder Defer |
Builder Defer |
by Defer :dodefer resolve |
by Defer :dodefer resolve |
|
|
|
Build: ( inter comp -- ) swap T immediate A, A, H ; |
|
DO: ( ghost -- ) ABORT" CROSS: Don't execute" ;DO |
|
Builder interpret/compile: |
|
|
\ Sturctures 23feb95py |
\ Sturctures 23feb95py |
|
|
>CROSS |
>CROSS |
Line 877 Cond: [ELSE] [ELSE] ;Cond
|
Line 883 Cond: [ELSE] [ELSE] ;Cond
|
|
|
bigendian Constant bigendian |
bigendian Constant bigendian |
|
|
Create magic s" gforth00" here over allot swap move |
Create magic s" Gforth10" here over allot swap move |
|
|
[char] 1 bigendian + cell + magic 7 + c! |
char 1 bigendian + cell + magic 7 + c! |
|
|
: save-cross ( "name" -- ) |
: save-cross ( "image-name" "binary-name" -- ) |
bl parse ." Saving to " 2dup type |
bl parse ." Saving to " 2dup type cr |
w/o bin create-file throw >r |
w/o bin create-file throw >r |
|
s" #! " r@ write-file throw |
|
bl parse r@ write-file throw |
|
s" -i" r@ write-file throw |
|
#lf r@ emit-file throw |
|
r@ dup file-position throw drop 8 mod 8 swap ( file-id limit index ) |
|
?do |
|
bl over emit-file throw |
|
loop |
|
drop |
magic 8 r@ write-file throw \ write magic |
magic 8 r@ write-file throw \ write magic |
image @ there r@ write-file throw \ write image |
image @ there r@ write-file throw \ write image |
bit$ @ there 1- cell>bit rshift 1+ |
bit$ @ there 1- cell>bit rshift 1+ |