VolksForth

save-system-apple1
Login

Save a changed VolksForth image

"save-system" dumps a hex-dump of the whole VolksForth System on the screen (and the terminal-io). This hex dump can be used to save a changed Forth image back to the terminal-host, it can later be loaded back into the Apple 1.

The hex-dump can be paused with any key and aborted with the ENTER key.

Before using "save-system", make sure to "freeze" the current state of the Forth-Image using the word "save".

| : dump-line ( addr len -- )
  over + swap ?do I c@ 3 .r loop ;

| : dump-hex ( end begin -- )
  cr hex dup .  ASCII : emit
  ?do 
    I &10 dump-line cr 
    ASCII : emit stop? if abort" aborted" then 
  &10 +loop ;

: save-system ( -- )
  page here origin 8 - dump-hex ;