mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-23 12:29:21 +00:00
Log test output to file
This commit is contained in:
parent
6dbe30064d
commit
83c1238840
27
6502/C64/tests/logtofile.fth
Normal file
27
6502/C64/tests/logtofile.fth
Normal 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 ;
|
@ -1,4 +1,8 @@
|
||||
|
||||
include logtofile.fth
|
||||
|
||||
logopen" test.log"
|
||||
|
||||
: \vf [compile] \ ; immediate
|
||||
|
||||
include ans-shim.fth
|
||||
@ -21,3 +25,5 @@ include coreexttest.fth
|
||||
include doubletest.fth
|
||||
|
||||
REPORT-ERRORS
|
||||
|
||||
logclose
|
||||
|
Loading…
Reference in New Issue
Block a user