Diff for /gforth/Attic/dumpimage.fs between versions 1.5 and 1.8

version 1.5, 1995/11/07 18:06:37 version 1.8, 1996/12/23 15:07:44
Line 18 Line 18
 \ along with this program; if not, write to the Free Software  \ along with this program; if not, write to the Free Software
 \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   
 Create magic  s" gforth00" here over allot swap move  
   
 '1 1 cells + 0 pad ! -1 pad c! pad @ 0< +  magic 7 chars + c!  
   
 : save-string-dict { addr1 u -- addr2 u }  : save-string-dict { addr1 u -- addr2 u }
     here { addr2 }      here { addr2 }
     u allot      u allot
Line 39  Create magic  s" gforth00" here over all Line 35  Create magic  s" gforth00" here over all
     U+DO      U+DO
         addr i 2* cells + 2@ save-string-dict          addr i 2* cells + 2@ save-string-dict
         new-addr i 2* cells + 2!          new-addr i 2* cells + 2!
     LOOP ;      LOOP
       maxalign ;
   
 : dump-fi ( addr u -- )  : dump-fi ( addr u -- )
     w/o bin create-file throw >r      w/o bin create-file throw >r
     magic 8 r@ write-file throw  
     update-image-included-files      update-image-included-files
     forthstart here over - dup forthstart cell+ !      here forthstart - forthstart 2 cells + !
                          r@ write-file throw      forthstart
 \  relinfo here forthstart - 1- 8 cells / 1+ r@ write-file throw      begin \ search for start of file ("#! " at a multiple of 8)
   r> close-file throw ;          8 -
           dup 3 s" #! " compare 0=
       until ( imagestart )
       here over - r@ write-file throw
       r> close-file throw ;
   
 : savesystem ( "name" -- ) \ gforth  : savesystem ( "name" -- ) \ gforth
     name dump-fi ;      name dump-fi ;

Removed from v.1.5  
changed lines
  Added in v.1.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>