mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-01-25 10:30:20 +00:00
add file-words.fth to target-compiled c64/16-vf-latest
This commit is contained in:
parent
dc40a6e2f1
commit
6887241e40
@ -67,18 +67,18 @@ cbmfiles/c16-vf-32k: emulator/tcbase.T64 emulator/build-vf.sh \
|
|||||||
|
|
||||||
# Core test targets
|
# Core test targets
|
||||||
|
|
||||||
test-c64.result: emulator/c64-testbase.T64 $(test_files_petscii) \
|
test-c64.result: emulator/c64-vf-latest.T64 $(test_files_petscii) \
|
||||||
emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c64.golden
|
emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c64.golden
|
||||||
rm -f test-c64.log test-c64.result
|
rm -f test-c64.log test-c64.result
|
||||||
emulator/run-in-vice.sh c64-testbase \
|
emulator/run-in-vice.sh c64-vf-latest \
|
||||||
"include run-vf-tests.fth\n1234567890\ndos s0:notdone\n"
|
"include run-vf-tests.fth\n1234567890\ndos s0:notdone\n"
|
||||||
petscii2ascii cbmfiles/test.log test-c64.log
|
petscii2ascii cbmfiles/test.log test-c64.log
|
||||||
tests/evaluate-test.sh test-c64
|
tests/evaluate-test.sh test-c64
|
||||||
|
|
||||||
test-c16.result: emulator/c16-testbase.T64 $(test_files_petscii) \
|
test-c16.result: emulator/c16-vf-latest.T64 $(test_files_petscii) \
|
||||||
emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c16.golden
|
emulator/run-in-vice.sh tests/evaluate-test.sh tests/test-c16.golden
|
||||||
rm -f test-c16.log test-c16.result
|
rm -f test-c16.log test-c16.result
|
||||||
VICE=xplus4 emulator/run-in-vice.sh c16-testbase \
|
VICE=xplus4 emulator/run-in-vice.sh c16-vf-latest \
|
||||||
"include run-vf-tests.fth\n1234567890\ndos s0:notdone\n"
|
"include run-vf-tests.fth\n1234567890\ndos s0:notdone\n"
|
||||||
petscii2ascii cbmfiles/test.log test-c16.log
|
petscii2ascii cbmfiles/test.log test-c16.log
|
||||||
tests/evaluate-test.sh test-c16
|
tests/evaluate-test.sh test-c16
|
||||||
@ -92,13 +92,14 @@ cbmfiles/devenv: emulator/run-in-vice.sh emulator/build-devenv.sh \
|
|||||||
disks/vforth4_1.d64 disks/vforth4_3.d64 disks/file-words.d64
|
disks/vforth4_1.d64 disks/vforth4_3.d64 disks/file-words.d64
|
||||||
emulator/build-devenv.sh
|
emulator/build-devenv.sh
|
||||||
|
|
||||||
cbmfiles/c64-testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \
|
# Deprecated
|
||||||
emulator/c64-$(VERSION).T64 disks/file-words.d64
|
# cbmfiles/c64-testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \
|
||||||
emulator/build-testbase.sh c64 $(VERSION)
|
# emulator/c64-$(VERSION).T64 disks/file-words.d64
|
||||||
|
# emulator/build-testbase.sh c64 $(VERSION)
|
||||||
|
|
||||||
cbmfiles/c16-testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \
|
# cbmfiles/c16-testbase: emulator/run-in-vice.sh emulator/build-testbase.sh \
|
||||||
emulator/c16-$(VERSION).T64 disks/file-words.d64
|
# emulator/c16-$(VERSION).T64 disks/file-words.d64
|
||||||
VICE=xplus4 emulator/build-testbase.sh c16 $(VERSION)
|
# VICE=xplus4 emulator/build-testbase.sh c16 $(VERSION)
|
||||||
|
|
||||||
|
|
||||||
# Generic T64 tape image rule
|
# Generic T64 tape image rule
|
||||||
|
@ -29,6 +29,7 @@ include vf-pr-target.fth
|
|||||||
include vf-head-c16.fth
|
include vf-head-c16.fth
|
||||||
include vf-cbm-core.fth
|
include vf-cbm-core.fth
|
||||||
include vf-sys-c16.fth
|
include vf-sys-c16.fth
|
||||||
|
include vf-cbm-file.fth
|
||||||
include vf-finalize.fth
|
include vf-finalize.fth
|
||||||
|
|
||||||
include vf-pr-target.fth
|
include vf-pr-target.fth
|
||||||
|
@ -32,6 +32,7 @@ include vf-c16+jsr.fth
|
|||||||
include vf-head-c16.fth
|
include vf-head-c16.fth
|
||||||
include vf-cbm-core.fth
|
include vf-cbm-core.fth
|
||||||
include vf-sys-c16.fth
|
include vf-sys-c16.fth
|
||||||
|
include vf-cbm-file.fth
|
||||||
include vf-finalize.fth
|
include vf-finalize.fth
|
||||||
|
|
||||||
include vf-pr-target.fth
|
include vf-pr-target.fth
|
||||||
|
@ -29,6 +29,7 @@ include vf-pr-target.fth
|
|||||||
include vf-head-c64.fth
|
include vf-head-c64.fth
|
||||||
include vf-cbm-core.fth
|
include vf-cbm-core.fth
|
||||||
include vf-sys-c64.fth
|
include vf-sys-c64.fth
|
||||||
|
include vf-cbm-file.fth
|
||||||
include vf-finalize.fth
|
include vf-finalize.fth
|
||||||
|
|
||||||
include vf-pr-target.fth
|
include vf-pr-target.fth
|
||||||
|
@ -287,7 +287,7 @@ Defer r/w
|
|||||||
|
|
||||||
\ Allocating buffers clv12jul87
|
\ Allocating buffers clv12jul87
|
||||||
|
|
||||||
E400 Constant limit Variable first
|
\ E400 Constant limit Variable first
|
||||||
|
|
||||||
: allotbuffer ( -- )
|
: allotbuffer ( -- )
|
||||||
first @ r0 @ - b/buf 2+ u< ?exit
|
first @ r0 @ - b/buf 2+ u< ?exit
|
||||||
|
@ -2379,6 +2379,7 @@ end-code
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
E400 Constant limit Variable first
|
||||||
|
|
||||||
include vf-cbm-bufs.fth
|
include vf-cbm-bufs.fth
|
||||||
|
|
||||||
|
27
6502/C64/src/vf-cbm-dos.fth
Normal file
27
6502/C64/src/vf-cbm-dos.fth
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
\ dir dos cat 09jun20pz
|
||||||
|
| : dev fload-dev @ ;
|
||||||
|
|
||||||
|
: dir ( -- )
|
||||||
|
dev 0 busopen ascii $ bus! busoff
|
||||||
|
dev 0 busin bus@ bus@ 2drop
|
||||||
|
BEGIN cr bus@ bus@ 2drop
|
||||||
|
i/o-status? 0= WHILE
|
||||||
|
bus@ bus@ lo/hi> u.
|
||||||
|
BEGIN bus@ ?dup WHILE con! REPEAT
|
||||||
|
REPEAT busoff dev 0 busclose ;
|
||||||
|
|
||||||
|
: dos ( -- )
|
||||||
|
bl word count ?dup
|
||||||
|
IF dev 15 busout bustype
|
||||||
|
busoff cr ELSE drop THEN
|
||||||
|
dev dos-error ;
|
||||||
|
|
||||||
|
: cat ( -- ) cr
|
||||||
|
dev 2 busopen bl word count bustype
|
||||||
|
busoff
|
||||||
|
\ i/o-status?abort
|
||||||
|
i/o-status? IF cr
|
||||||
|
fload-dev @ dos-error abort THEN
|
||||||
|
dev 2 busin BEGIN bus@ con!
|
||||||
|
i/o-status? UNTIL busoff
|
||||||
|
dev 2 busclose ;
|
89
6502/C64/src/vf-cbm-file.fth
Normal file
89
6502/C64/src/vf-cbm-file.fth
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
|
||||||
|
|
||||||
|
: dos-error ( dev -- )
|
||||||
|
f busin
|
||||||
|
BEGIN bus@ con! i/o-status? UNTIL
|
||||||
|
busoff ;
|
||||||
|
|
||||||
|
: lo/hi> ( lo hi -- u )
|
||||||
|
ff and 100 * swap ff and + ;
|
||||||
|
|
||||||
|
|
||||||
|
\ fload-dev freadline 25apr20pz
|
||||||
|
|
||||||
|
create fload-dev 8 ,
|
||||||
|
create fload-2nd f ,
|
||||||
|
| 84 constant /fib
|
||||||
|
create fib /fib allot
|
||||||
|
variable #fib
|
||||||
|
|
||||||
|
| : eol? ( c -- f )
|
||||||
|
dup 0= swap #cr = or IF 0 exit THEN
|
||||||
|
i/o-status? IF 1 exit THEN -1 ;
|
||||||
|
|
||||||
|
| : freadline ( -- eof )
|
||||||
|
fload-dev @ fload-2nd @ busin
|
||||||
|
fib /fib bounds
|
||||||
|
DO bus@ dup eol? under
|
||||||
|
IF I c! ELSE drop THEN
|
||||||
|
dup 0<
|
||||||
|
IF drop ELSE I + fib - #fib ! UNLOOP
|
||||||
|
i/o-status? busoff exit THEN
|
||||||
|
LOOP /fib #fib !
|
||||||
|
." warning: line exceeds max " /fib .
|
||||||
|
cr ." extra chars ignored" cr
|
||||||
|
BEGIN bus@ eol? 1+ UNTIL
|
||||||
|
i/o-status? busoff ;
|
||||||
|
|
||||||
|
|
||||||
|
\ fload-open fload-close 30jun20pz
|
||||||
|
|
||||||
|
| : i/o-status?abort i/o-status? IF cr
|
||||||
|
fload-dev @ dos-error abort THEN ;
|
||||||
|
|
||||||
|
defer on-fload ' noop is on-fload
|
||||||
|
| : fload-open ( addr c -- )
|
||||||
|
on-fload fload-dev @
|
||||||
|
fload-2nd @ 1- dup fload-2nd !
|
||||||
|
busopen bustype
|
||||||
|
" ,s,r" count bustype busoff
|
||||||
|
i/o-status?abort ;
|
||||||
|
|
||||||
|
| : fload-close ( -- )
|
||||||
|
fload-dev @ fload-2nd @
|
||||||
|
dup 1+ fload-2nd !
|
||||||
|
busclose ;
|
||||||
|
|
||||||
|
: factive? ( -- flag )
|
||||||
|
fload-2nd @ f < ;
|
||||||
|
|
||||||
|
: fload-close-all ( -- )
|
||||||
|
factive? IF f fload-2nd @ DO
|
||||||
|
fload-dev @ I busclose -1 +LOOP
|
||||||
|
f fload-2nd ! THEN ;
|
||||||
|
|
||||||
|
|
||||||
|
\ include 09jun20pz
|
||||||
|
|
||||||
|
: \ ( -- )
|
||||||
|
blk @ IF [compile] \ exit THEN
|
||||||
|
#tib @ >in ! ; immediate
|
||||||
|
|
||||||
|
create >tib-orig >tib @ ,
|
||||||
|
fib >tib !
|
||||||
|
|
||||||
|
: interpret-via-fib
|
||||||
|
BEGIN freadline >r >in off
|
||||||
|
#fib @ #tib ! interpret r> UNTIL ;
|
||||||
|
|
||||||
|
: include ( -- )
|
||||||
|
blk @ Abort" no include from blk"
|
||||||
|
bl parse fload-open
|
||||||
|
interpret-via-fib
|
||||||
|
fload-close
|
||||||
|
#tib off >in off ;
|
||||||
|
|
||||||
|
|
||||||
|
: .filename 2dup cr type ;
|
||||||
|
|
||||||
|
' .filename IS on-fload
|
@ -1,4 +1,6 @@
|
|||||||
|
|
||||||
|
include vf-cbm-dos.fth
|
||||||
|
|
||||||
include logtofile.fth
|
include logtofile.fth
|
||||||
|
|
||||||
logopen" test.log"
|
logopen" test.log"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user