version 1.5, 1995/11/07 18:06:37
|
version 1.6, 1996/04/17 16:39:40
|
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 43 Create magic s" gforth00" here over all
|
Line 39 Create magic s" gforth00" here over all
|
|
|
: 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 ; |