mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-22 21:29:32 +00:00
Switch test-blk, test-min, test-std and test3 to use logfile.fth
This commit is contained in:
parent
d0b5356988
commit
213ea3bb1e
@ -170,7 +170,7 @@ test-kernel.log: \
|
||||
|
||||
test-min.log: \
|
||||
$(patsubst %, $(cpmfilesdir)/%, v4th.com sfileint.fth \
|
||||
log2file.fb \
|
||||
logfile.fth \
|
||||
ans-shim.fth prelim.fth tester.fth core.fr test-min.fth) \
|
||||
| emu
|
||||
./emulator/run-in-runcpm.sh \
|
||||
@ -184,7 +184,7 @@ test-min.log: \
|
||||
|
||||
test-std.log: \
|
||||
$(patsubst %, $(cpmfilesdir)/%, v4th.com sfileint.fth \
|
||||
log2file.fb core.fr) \
|
||||
logfile.fth core.fr) \
|
||||
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth)) \
|
||||
| emu
|
||||
./emulator/run-in-runcpm.sh \
|
||||
@ -198,7 +198,7 @@ test-std.log: \
|
||||
|
||||
test-blk.log: \
|
||||
$(patsubst %, $(cpmfilesdir)/%, v4thblk.com sfileint.fth \
|
||||
sblkint.fth log2file.fb core.fr) \
|
||||
sblkint.fth logfile.fth core.fr) \
|
||||
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth) \
|
||||
tests/empty.fb) | emu
|
||||
./emulator/run-in-runcpm.sh \
|
||||
@ -213,7 +213,7 @@ test-blk.log: \
|
||||
|
||||
test3.log: \
|
||||
$(patsubst %, $(cpmfilesdir)/%, v4th3.com sfileint.fth \
|
||||
log2file.fb core.fr) \
|
||||
logfile.fth core.fr) \
|
||||
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth) \
|
||||
tests/empty.fb) | emu
|
||||
./emulator/run-in-runcpm.sh \
|
||||
|
50
8080/CPM/tests/logfile.fth
Normal file
50
8080/CPM/tests/logfile.fth
Normal file
@ -0,0 +1,50 @@
|
||||
|
||||
\ *** Block No. 2, Hexblock 2
|
||||
|
||||
\ logfile phz 20aug23
|
||||
|
||||
Dos also Forth definitions
|
||||
|
||||
$18 constant fcb\nam
|
||||
create logfile ," LOGFILE TXT" fcb\nam allot 1 logfile c!
|
||||
create logdma b/rec allot
|
||||
variable logoffset 0 logoffset !
|
||||
|
||||
: logflush logdma dma! logfile $15 bdos $80 dma! ;
|
||||
|
||||
: logc! ( c -- )
|
||||
logoffset @ dup >r logdma + c! r> 1+
|
||||
dup logoffset ! b/rec =
|
||||
IF logflush 0 logoffset ! THEN ;
|
||||
|
||||
|
||||
\ *** Block No. 3, Hexblock 3
|
||||
|
||||
\ log-emit log-type log-cr alsologtofile pphz 03sep23
|
||||
|
||||
: log-emit ( char -- )
|
||||
dup (emit logc! ;
|
||||
|
||||
: log-type ( addr count -- )
|
||||
0 ?DO count log-emit LOOP drop ;
|
||||
|
||||
: log-cr ( -- )
|
||||
(cr #cr logc! #lf logc! ;
|
||||
|
||||
Output: alsologtofile
|
||||
log-emit log-cr log-type (del noop 2drop (at? ;
|
||||
|
||||
|
||||
\ *** Block No. 4, Hexblock 4
|
||||
|
||||
\ logopen phz 20aug23
|
||||
|
||||
: logopen ( -- )
|
||||
logfile filenamelen + 1+ fcb\nam erase
|
||||
0 logoffset !
|
||||
logfile killfile
|
||||
logfile createfile
|
||||
alsologtofile ;
|
||||
|
||||
: logclose ( -- )
|
||||
cr display &26 logc! logflush logfile closefile ;
|
@ -1,5 +1,5 @@
|
||||
|
||||
include log2file.fb
|
||||
include logfile.fth
|
||||
' noop Is .status
|
||||
logopen
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
include log2file.fb
|
||||
include logfile.fth
|
||||
logopen
|
||||
|
||||
include ans-shim.fth
|
||||
|
@ -3,7 +3,7 @@
|
||||
\ blk @ ?dup IF ." Blk " u. ?cr exit THEN
|
||||
\ incfile @ IF tib #tib @ cr type THEN ;
|
||||
|
||||
include log2file.fb
|
||||
include logfile.fth
|
||||
logopen
|
||||
|
||||
include ans-shim.fth
|
||||
|
Loading…
Reference in New Issue
Block a user