mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-23 12:29:21 +00:00
commit
bd944cdedc
@ -8,6 +8,8 @@ VERSION=vf-latest
|
|||||||
|
|
||||||
vf_blk_d64_files = $(wildcard disks/*.d64)
|
vf_blk_d64_files = $(wildcard disks/*.d64)
|
||||||
vf_blk_fth_files = $(patsubst %.d64, %.fth, $(vf_blk_d64_files))
|
vf_blk_fth_files = $(patsubst %.d64, %.fth, $(vf_blk_d64_files))
|
||||||
|
vf_fth_files = $(wildcard src/vf-*.fth)
|
||||||
|
vf_fth_files_petscii = $(patsubst src/%, cbmfiles/%, $(vf_fth_files))
|
||||||
|
|
||||||
test_files = $(wildcard tests/*.f*)
|
test_files = $(wildcard tests/*.f*)
|
||||||
test_files_petscii = $(patsubst tests/%, cbmfiles/%, $(test_files))
|
test_files_petscii = $(patsubst tests/%, cbmfiles/%, $(test_files))
|
||||||
@ -28,6 +30,12 @@ test: test-c64.result test-c16.result
|
|||||||
|
|
||||||
test64: test-c64.result
|
test64: test-c64.result
|
||||||
|
|
||||||
|
# Temporary bincmp target while the old and the new binaries are still
|
||||||
|
# expected to be binary identical.
|
||||||
|
bincmp: cbmfiles/c64-vf-latest cbmfiles/c16-vf-latest
|
||||||
|
cmp cbmfiles/c64-vf-latest cbmfiles/c64-volksforth83
|
||||||
|
cmp cbmfiles/c16-vf-latest cbmfiles/c16-volksforth83
|
||||||
|
|
||||||
run-devenv: emulator/devenv.T64
|
run-devenv: emulator/devenv.T64
|
||||||
emulator/run-in-vice.sh devenv
|
emulator/run-in-vice.sh devenv
|
||||||
|
|
||||||
@ -40,20 +48,24 @@ run-testbase16: emulator/testbase16.T64
|
|||||||
|
|
||||||
# Targetcompiler targets
|
# Targetcompiler targets
|
||||||
|
|
||||||
cbmfiles/tcbase: emulator/c64-testbase.T64 emulator/build-tcbase.sh \
|
cbmfiles/tcbase: emulator/c64-volksforth83.T64 emulator/build-tcbase.sh \
|
||||||
disks/vforth4_2.d64 disks/tc38q.d64 cbmfiles/mk-tcbase.fth
|
disks/tc38q.d64 disks/file-words.d64 cbmfiles/tc-base.fth
|
||||||
emulator/build-tcbase.sh
|
emulator/build-tcbase.sh
|
||||||
|
|
||||||
cbmfiles/c64-vf-latest: emulator/tcbase.T64 emulator/build-c64forth.sh \
|
cbmfiles/c64-vf-latest: emulator/tcbase.T64 emulator/build-vf.sh \
|
||||||
disks/vforth4_2.d64 disks/tc38q.d64 cbmfiles/mk-c64forth.fth
|
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
|
||||||
emulator/build-c64forth.sh
|
emulator/build-vf.sh vf-c64-main.fth c64-vf-latest
|
||||||
|
|
||||||
|
# C16 with 64 kB RAM or Plus4 - called (C16+ in the sources.
|
||||||
|
cbmfiles/c16-vf-latest: emulator/tcbase.T64 emulator/build-vf.sh \
|
||||||
|
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
|
||||||
|
emulator/build-vf.sh vf-c16-main.fth c16-vf-latest
|
||||||
|
|
||||||
|
# C16 with 32 kB RAM - called (C16- in the sources.
|
||||||
|
cbmfiles/c16-vf-32k: emulator/tcbase.T64 emulator/build-vf.sh \
|
||||||
|
disks/vforth4_2.d64 disks/tc38q.d64 $(vf_fth_files_petscii)
|
||||||
|
emulator/build-vf.sh vf-c16-32k.fth c16-vf-32k
|
||||||
|
|
||||||
# Temp stopgap to fit c16 into default use of VERSION=vf-latest
|
|
||||||
# until we have a proper c16 targetcompiler rule.
|
|
||||||
# Missing part: Moving the target machine definition from vforth4_2.d64
|
|
||||||
# screen 9 to somewhere more flexible. Likely two .fth files.
|
|
||||||
cbmfiles/c16-vf-latest: cbmfiles/c16-volksforth83
|
|
||||||
cp $< $@
|
|
||||||
|
|
||||||
# Core test targets
|
# Core test targets
|
||||||
|
|
||||||
|
2
6502/C64/cbmfiles/.gitignore
vendored
2
6502/C64/cbmfiles/.gitignore
vendored
@ -1,3 +1,5 @@
|
|||||||
*.fth
|
*.fth
|
||||||
core.fr
|
core.fr
|
||||||
notdone
|
notdone
|
||||||
|
c64-testbase
|
||||||
|
c16-testbase
|
||||||
|
BIN
6502/C64/cbmfiles/c16-vf-latest
Normal file
BIN
6502/C64/cbmfiles/c16-vf-latest
Normal file
Binary file not shown.
Binary file not shown.
@ -1,13 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
|
|
||||||
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
|
|
||||||
|
|
||||||
rm -f "${basedir}/cbmfiles/c64-vf-latest"
|
|
||||||
|
|
||||||
keybuf="include mk-c64forth.fth\n\
|
|
||||||
save-target c64-vf-latest\ndos s0:notdone\n"
|
|
||||||
|
|
||||||
DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \
|
|
||||||
"tcbase" "${keybuf}"
|
|
@ -1,4 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# build script for the resident part of the target compiler running
|
||||||
|
# on the C64.
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
|
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
@ -6,8 +9,9 @@ basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
|
|||||||
|
|
||||||
rm -f "${basedir}/cbmfiles/tcbase"
|
rm -f "${basedir}/cbmfiles/tcbase"
|
||||||
|
|
||||||
keybuf="2 drive 4 load\ninclude mk-tcbase.fth\n\
|
keybuf="3 drive 20 load\n3 drive 10 load\nsave\n\
|
||||||
|
2 drive 4 load\ninclude tc-base.fth\n\
|
||||||
savesystem tcbase\ndos s0:notdone\n"
|
savesystem tcbase\ndos s0:notdone\n"
|
||||||
|
|
||||||
DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \
|
DISK10=tc38q DISK11=file-words "${emulatordir}/run-in-vice.sh" \
|
||||||
"c64-testbase" "${keybuf}"
|
"c64-volksforth83" "${keybuf}"
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#!/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.
|
|
||||||
# load include and dos from file-words.d64 block 10.
|
|
||||||
# savesystem and then scratch file notdone to exit emulator.
|
|
||||||
keybuf="3 drive 20 load\n3 drive 10 load\n\
|
|
||||||
savesystem testbase16\ndos s0:notdone\n"
|
|
||||||
|
|
||||||
VICE=xplus4 DISK11=file-words "${emulatordir}/run-in-vice.sh" \
|
|
||||||
"c16-volksforth83" "${keybuf}"
|
|
21
6502/C64/emulator/build-vf.sh
Executable file
21
6502/C64/emulator/build-vf.sh
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Script for target-compiling the CBM versions of VolksForth.
|
||||||
|
# It uses the tcbase binary, i.e. the resident part of the target
|
||||||
|
# compiler, adds the transient part of the target compiler, then
|
||||||
|
# loads the VolksForth sources, and saves the target.
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
emulatordir="$(dirname "${BASH_SOURCE[0]}")"
|
||||||
|
basedir="$(realpath --relative-to="$PWD" "${emulatordir}/..")"
|
||||||
|
|
||||||
|
source="$1"
|
||||||
|
target="$2"
|
||||||
|
|
||||||
|
rm -f "${basedir}/cbmfiles/${target}"
|
||||||
|
|
||||||
|
keybuf="include ${source}\nsave-target ${target}\ndos s0:notdone\n"
|
||||||
|
|
||||||
|
DISK9=vforth4_2 DISK10=tc38q "${emulatordir}/run-in-vice.sh" \
|
||||||
|
"tcbase" "${keybuf}"
|
@ -1,6 +0,0 @@
|
|||||||
|
|
||||||
hex
|
|
||||||
|
|
||||||
2 drive 27 30 thru
|
|
||||||
|
|
||||||
1 drive f load
|
|
@ -1,5 +1,7 @@
|
|||||||
|
|
||||||
: edit list ;
|
\ loadfile for the resident part of the target compiler.
|
||||||
|
|
||||||
|
' list alias edit
|
||||||
|
|
||||||
: .blk ( -)
|
: .blk ( -)
|
||||||
blk @ ?dup IF ." Blk " u. ?cr THEN ;
|
blk @ ?dup IF ." Blk " u. ?cr THEN ;
|
34
6502/C64/src/vf-c16-32k.fth
Normal file
34
6502/C64/src/vf-c16-32k.fth
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
hex
|
||||||
|
|
||||||
|
2 drive 27 30 thru
|
||||||
|
|
||||||
|
1 drive
|
||||||
|
|
||||||
|
Onlyforth hex
|
||||||
|
c load \ clear memory and
|
||||||
|
d e thru \ clr labels .status
|
||||||
|
|
||||||
|
\ *** Block No. 9, Hexblock 9
|
||||||
|
|
||||||
|
\ Target-Machine clv06dec88
|
||||||
|
|
||||||
|
cr .( Host is: )
|
||||||
|
(64 .( C64) C)
|
||||||
|
(16 .( C16) C)
|
||||||
|
|
||||||
|
: ) ; immediate
|
||||||
|
: (C ; immediate
|
||||||
|
|
||||||
|
\ : (C64 ; immediate
|
||||||
|
: (C16 ; immediate
|
||||||
|
\ : (C16+ ; immediate
|
||||||
|
: (C16- ; immediate
|
||||||
|
|
||||||
|
: (C64 [compile] ( ; immediate
|
||||||
|
\ : (C16 [compile] ( ; immediate
|
||||||
|
: (C16+ [compile] ( ; immediate
|
||||||
|
\ : (C16- [compile] ( ; immediate
|
||||||
|
|
||||||
|
|
||||||
|
include vf-main.fth
|
43
6502/C64/src/vf-c16-main.fth
Normal file
43
6502/C64/src/vf-c16-main.fth
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
|
||||||
|
hex
|
||||||
|
|
||||||
|
2 drive 27 30 thru
|
||||||
|
|
||||||
|
1 drive
|
||||||
|
|
||||||
|
Onlyforth hex
|
||||||
|
c load \ clear memory and
|
||||||
|
d e thru \ clr labels .status
|
||||||
|
|
||||||
|
\ *** Block No. 9, Hexblock 9
|
||||||
|
|
||||||
|
\ Target-Machine clv06dec88
|
||||||
|
|
||||||
|
cr .( Host is: )
|
||||||
|
(64 .( C64) C)
|
||||||
|
(16 .( C16) C)
|
||||||
|
|
||||||
|
: ) ; immediate
|
||||||
|
: (C ; immediate
|
||||||
|
|
||||||
|
\ : (C64 ; immediate
|
||||||
|
: (C16 ; immediate
|
||||||
|
: (C16+ ; immediate
|
||||||
|
\ : (C16- ; immediate
|
||||||
|
|
||||||
|
: (C64 [compile] ( ; immediate
|
||||||
|
\ : (C16 [compile] ( ; immediate
|
||||||
|
\ : (C16+ [compile] ( ; immediate
|
||||||
|
: (C16- [compile] ( ; immediate
|
||||||
|
|
||||||
|
\ *** Block No. 10, Hexblock a
|
||||||
|
|
||||||
|
\ load/remove JSR-Macros clv14.4.87)
|
||||||
|
|
||||||
|
Assembler also definitions
|
||||||
|
|
||||||
|
\needs C16+Jsr 8 load
|
||||||
|
' C16+Jsr Is Jsr .( JSR Is:C16+ )
|
||||||
|
|
||||||
|
|
||||||
|
include vf-main.fth
|
34
6502/C64/src/vf-c64-main.fth
Normal file
34
6502/C64/src/vf-c64-main.fth
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
|
||||||
|
hex
|
||||||
|
|
||||||
|
2 drive 27 30 thru
|
||||||
|
|
||||||
|
1 drive
|
||||||
|
|
||||||
|
Onlyforth hex
|
||||||
|
c load \ clear memory and
|
||||||
|
d e thru \ clr labels .status
|
||||||
|
|
||||||
|
\ *** Block No. 9, Hexblock 9
|
||||||
|
|
||||||
|
\ Target-Machine clv06dec88
|
||||||
|
|
||||||
|
cr .( Host is: )
|
||||||
|
(64 .( C64) C)
|
||||||
|
(16 .( C16) C)
|
||||||
|
|
||||||
|
: ) ; immediate
|
||||||
|
: (C ; immediate
|
||||||
|
|
||||||
|
: (C64 ; immediate
|
||||||
|
\ : (C16 ; immediate
|
||||||
|
\ : (C16+ ; immediate
|
||||||
|
\ : (C16- ; immediate
|
||||||
|
|
||||||
|
\ : (C64 [compile] ( ; immediate
|
||||||
|
: (C16 [compile] ( ; immediate
|
||||||
|
: (C16+ [compile] ( ; immediate
|
||||||
|
: (C16- [compile] ( ; immediate
|
||||||
|
|
||||||
|
|
||||||
|
include vf-main.fth
|
24
6502/C64/src/vf-main.fth
Normal file
24
6502/C64/src/vf-main.fth
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
|
||||||
|
include vf-pr-target.fth
|
||||||
|
|
||||||
|
Onlyforth
|
||||||
|
|
||||||
|
(C64 $801 ) (C16 $1001 ) dup displace !
|
||||||
|
|
||||||
|
Target definitions here!
|
||||||
|
|
||||||
|
$10 $7D thru
|
||||||
|
|
||||||
|
Assembler nonrelocate
|
||||||
|
|
||||||
|
.unresolved
|
||||||
|
|
||||||
|
' .blk is .status
|
||||||
|
|
||||||
|
include vf-pr-target.fth
|
||||||
|
|
||||||
|
cr .( for manual saving:)
|
||||||
|
cr .( save-target volksforth83)
|
||||||
|
cr
|
||||||
|
quit
|
18
6502/C64/src/vf-pr-target.fth
Normal file
18
6502/C64/src/vf-pr-target.fth
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
\ *** Block No. 11, Hexblock b
|
||||||
|
|
||||||
|
cr .( Target is: ) \ clv14.4.87)
|
||||||
|
|
||||||
|
|
||||||
|
(C .( CBM )
|
||||||
|
(C64 .( C64 )
|
||||||
|
(C16 .( C16 with )
|
||||||
|
(C16+ .( 64kb )
|
||||||
|
(C16- .( 32kb )
|
||||||
|
|
||||||
|
cr .( Target is not: )
|
||||||
|
|
||||||
|
(C \ ) .( CBM, )
|
||||||
|
(C64 \ ) .( C64, )
|
||||||
|
(C16 \ ) .( C16, )
|
||||||
|
(C16+ \ ) .( C16+64kb, )
|
||||||
|
(C16- \ ) .( C16-32kb, )
|
Loading…
Reference in New Issue
Block a user