diff --git a/6502/C64/Makefile b/6502/C64/Makefile index 565c1cf..2e06b5d 100644 --- a/6502/C64/Makefile +++ b/6502/C64/Makefile @@ -16,6 +16,9 @@ vf_blk_fth: $(vf_blk_fth_files) run-devenv: emulator/devenv.T64 emulator/run-in-vice.sh devenv +run-testbase: emulator/testbase.T64 + emulator/run-in-vice.sh testbase + # Rules for building Forth binaries on top of the plain vanilla # c64-volksforth83. @@ -24,6 +27,10 @@ cbmfiles/devenv: emulator/run-in-vice.sh emulator/build-devenv.sh \ emulator/c64-volksforth83.T64 emulator/build-devenv.sh +cbmfiles/testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \ + emulator/c64-volksforth83.T64 + emulator/build-testbase.sh + # Generic T64 tape image rule diff --git a/6502/C64/disks/file-words.d64 b/6502/C64/disks/file-words.d64 index 7fed02c..68e0f29 100644 Binary files a/6502/C64/disks/file-words.d64 and b/6502/C64/disks/file-words.d64 differ diff --git a/6502/C64/disks/file-words.fth b/6502/C64/disks/file-words.fth index c881483..2f85423 100644 --- a/6502/C64/disks/file-words.fth +++ b/6502/C64/disks/file-words.fth @@ -561,27 +561,27 @@ \ *** Block No. 20, Hexblock 14 +\ savesystem w/o editor 12jun20pz +| : (savsys ( adr len -- ) + [ Assembler ] Next [ Forth ] + ['] pause dup push ! \ singletask + i/o push i/o off bustype ; +: savesystem \ name must follow + \ prepare Forth Kernal + scr push 1 scr ! r# push r# off + \ now we save the system + save + 8 2 busopen 0 parse bustype + " ,p,w" count bustype busoff + 8 2 busout origin $17 - + dup $100 u/mod swap bus! bus! + here over - (savsys busoff + 8 2 busclose + 0 (drv ! derror? abort" save-error" ; - - - - - - - - - - - - - - - - - - +Onlyforth diff --git a/6502/C64/emulator/build-testbase.sh b/6502/C64/emulator/build-testbase.sh new file mode 100755 index 0000000..6f846e0 --- /dev/null +++ b/6502/C64/emulator/build-testbase.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +emulatordir="$(dirname "${BASH_SOURCE[0]}")" +basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")" + +rm -f "${basedir}/cbmfiles/testbase" + +# load savesystem w/o editor from file-words.d64 block 20 in drive 11. +# load include and dos from file-words.d64 block 10 in drive 11. +# savesystem and then scratch file notdone to exit emulator. +keybuf="3 drive 20 load\n3 drive 10 load\n\ +savesystem testbase\ndos s0:notdone\n" + +"${emulatordir}/run-in-vice.sh" "c64-volksforth83" "${keybuf}"