Log test output to file

This commit is contained in:
Philip Zembrod 2020-06-30 23:35:57 +02:00
parent 6dbe30064d
commit 83c1238840
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,27 @@
create log-dev 8 ,
create log-2nd 2 ,
: log-dev-2nd@ log-dev @ log-2nd @ ;
: log-emit
dup c64emit log-dev-2nd@ busout bus! busoff ;
: log-cr
c64cr log-dev-2nd@ busout #cr bus! busoff ;
: log-type
2dup c64type log-dev-2nd@ busout bustype busoff ;
Output: alsologtofile
log-emit log-cr log-type c64del c64page
c64at c64at? ;
: logopen"
ascii " parse log-dev-2nd@ busopen
2dup type
bustype " ,s,w" count bustype busoff
i/o-status? IF c64cr log-dev @ dos-error abort THEN
alsologtofile ;
: logclose
log-dev-2nd@ busclose display ;

View File

@ -1,4 +1,8 @@
include logtofile.fth
logopen" test.log"
: \vf [compile] \ ; immediate : \vf [compile] \ ; immediate
include ans-shim.fth include ans-shim.fth
@ -21,3 +25,5 @@ include coreexttest.fth
include doubletest.fth include doubletest.fth
REPORT-ERRORS REPORT-ERRORS
logclose