File:  [gforth] / gforth / Attic / dumpimage.fs
Revision 1.3: download - view: text, annotated - select for diffs
Tue Jul 25 15:28:06 1995 UTC (28 years, 9 months ago) by pazsan
Branches: MAIN
CVS tags: HEAD
Changed magic, endianess and word size is now encoded.
Make gforth before redoing kernals (old images still work).

    1: \ image dump                                           15nov94py
    2: 
    3: Create magic  s" gforth00" here over allot swap move
    4: 
    5: '1 1 cells + 0 pad ! -1 pad c! pad @ 0< +  magic 7 chars + c!
    6: 
    7: : dump-fi ( addr u -- )  w/o bin create-file throw >r
    8:   magic 8 r@ write-file throw
    9:   forthstart here over - dup forthstart cell+ !
   10:                          r@ write-file throw
   11: \  relinfo here forthstart - 1- 8 cells / 1+ r@ write-file throw
   12:   r> close-file throw ;
   13: 
   14: : savesystem ( "name" -- )  name dump-fi ;

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