mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-01-08 22:29:53 +00:00
Add a tweak to log2file.fb such that it can also be included as log2file.fth
This commit is contained in:
parent
48f488e584
commit
fe2d6e25d1
@ -1 +1 @@
|
||||
\ logging to a text file phz 03jan22 \ load screen phz 04jan22 1 2 +thru \ log-type log-emit log-cr alsologtofile phz 04jan22 context @ dos also context ! \ vocabulary log dos also log definitions file logfile variable logfcb : log-type 2dup (type ds@ -rot logfcb @ lfputs ; : log-emit dup (emit logfcb @ fputc ; : log-cr (cr #cr logfcb @ fputc #lf logfcb @ fputc ; Output: alsologtofile log-emit log-cr log-type (del (page (at (at? ; \ logopen logclose phz 11jan22 : logopen ( -- ) isfile push logfile make isfile@ dup freset logfcb ! alsologtofile ; : logclose ( -- ) display logfcb @ fclose ;
|
||||
\ logging to a text file phz 03jan22 \ load screen phz 16jan22 : (blk blk @ 0= IF ascii ) parse 2drop THEN ; (blk 1 2 +thru ( ) \ log-type log-emit log-cr alsologtofile phz 04jan22 context @ dos also context ! \ vocabulary log dos also log definitions file logfile variable logfcb : log-type 2dup (type ds@ -rot logfcb @ lfputs ; : log-emit dup (emit logfcb @ fputc ; : log-cr (cr #cr logfcb @ fputc #lf logfcb @ fputc ; Output: alsologtofile log-emit log-cr log-type (del (page (at (at? ; \ logopen logclose phz 11jan22 : logopen ( -- ) isfile push logfile make isfile@ dup freset logfcb ! alsologtofile ; : logclose ( -- ) display logfcb @ fclose ;
|
@ -20,11 +20,11 @@
|
||||
|
||||
\ *** Block No. 1, Hexblock 1
|
||||
|
||||
\ load screen phz 04jan22
|
||||
|
||||
1 2 +thru
|
||||
\ load screen phz 16jan22
|
||||
|
||||
: (blk blk @ 0= IF ascii ) parse 2drop THEN ;
|
||||
|
||||
(blk 1 2 +thru ( )
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user