--- gforth/cross.fs 1994/10/24 19:15:53 1.14 +++ gforth/cross.fs 1994/12/15 12:35:12 1.18 @@ -1,7 +1,7 @@ \ CROSS.FS The Cross-Compiler 06oct92py -\ $Id: cross.fs,v 1.14 1994/10/24 19:15:53 anton Exp $ +\ $Id: cross.fs,v 1.18 1994/12/15 12:35:12 pazsan Exp $ \ Idea and implementation: Bernd Paysan (py) -\ Copyright 1992 by the ANSI figForth Development Group +\ Copyright 1992-94 by the GNU Forth Development Group \ Log: \ changed in ; [ to state off 12may93jaw @@ -256,7 +256,7 @@ VARIABLE Already BEGIN @ dup WHILE 2dup cell+ @ = UNTIL - nip 2 cells + count cr ." CROSS: Exists: " type 4 spaces + 2 cells + count cr ." CROSS: Exists: " type 4 spaces drop swap cell+ ! ELSE true ABORT" CROSS: Ghostnames inconsistent" THEN ; @@ -312,7 +312,7 @@ VARIABLE ^imm >TARGET : immediate 20 flag! - ^imm @ @ dup = ?EXIT + ^imm @ @ dup = IF drop EXIT THEN <> ABORT" CROSS: Cannot immediate a unresolved word" ^imm @ ! ; : restrict 40 flag! ; @@ -322,7 +322,7 @@ VARIABLE ^imm : ALIAS2 create here 0 , DOES> @ execute ; \ usage: -\ ' alias2 bla ! +\ ' alias2 bla ! \ Target Header Creation 01nov92py @@ -337,10 +337,10 @@ VARIABLE CreateFlag CreateFlag off tlast @ dup 0> IF T 1 cells - THEN A, H there tlast ! >in @ name, >in ! T here H tlastcfa ! CreateFlag @ IF - >in @ alias2 swap >in ! \ create alias in target - >in @ ghost swap >in ! - swap also ghosts ' previous swap ! \ tick ghost and store in alias - CreateFlag off + >in @ alias2 swap >in ! \ create alias in target + >in @ ghost swap >in ! + swap also ghosts ' previous swap ! \ tick ghost and store in alias + CreateFlag off ELSE ghost THEN dup >magic ^imm ! \ a pointer for immediate Already @ IF dup >end tdoes ! @@ -738,8 +738,10 @@ bigendian Constant bigendian : save-cross ( "name" -- ) bl parse ." Saving to " 2dup type w/o bin create-file throw >r - image @ there r@ write-file throw - bit$ @ there 1- cell>bit rshift 1+ r@ write-file throw + s" gforth00" r@ write-file throw \ write magic + image @ there r@ write-file throw \ write image + bit$ @ there 1- cell>bit rshift 1+ + r@ write-file throw \ write tags r> close-file throw ; \ words that should be in minimal