From 410e6f06a5deec8e85bf56c82dcc2e7a2563c07b Mon Sep 17 00:00:00 2001 From: Philip Zembrod Date: Fri, 12 Jun 2020 23:20:42 +0200 Subject: [PATCH] Add build script and make rules for testbase - a Forth core with include and dos file words. These are needed to run tests automatedly. --- 6502/C64/Makefile | 7 ++++++ 6502/C64/disks/file-words.d64 | Bin 174848 -> 174848 bytes 6502/C64/disks/file-words.fth | 36 ++++++++++++++-------------- 6502/C64/emulator/build-testbase.sh | 15 ++++++++++++ 4 files changed, 40 insertions(+), 18 deletions(-) create mode 100755 6502/C64/emulator/build-testbase.sh 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 7fed02cb70f2d6eae98a940fd303d714a2d060fc..68e0f29a019373e4aa304993c3758a4f46e043ec 100644 GIT binary patch delta 626 zcmY*XJ5Iwu6ckiIhXnn^fG{Wl8;P%w&;~yf3){Qw+A&d}q~i`m6kNa;fQFhQfRJdA zpi9q9c(@{sHv|N^g33(?XaFo8rDri^ z!kkz1hz*Q(Es|jfv~!d76qOen`*%mvW^H>a5<QxQ)y zEHDOUY`v?h!i*_aP`&-0LPCo7cxM~65e+2s+oFdlRH;xEmi7As%(oD~mlpu0S?fV7tS1ftDjcB&v+)sn*#+M54P a<6dZgfbwbc{r>p*cxLh8X6E^3Hv9!`KbGtO delta 43 ecmZp;#?^3*YeB$9fe-4~ae``FD&w+LCN}`D`4UC| 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}"