mirror of
https://github.com/forth-ev/VolksForth.git
synced 2025-02-18 03:30:36 +00:00
Extract inc-readrec from inc-fgetc
This commit is contained in:
parent
3c288beac5
commit
b762d6ecb0
File diff suppressed because one or more lines are too long
@ -58,22 +58,22 @@
|
|||||||
|
|
||||||
\ *** Block No. 3, Hexblock 3
|
\ *** Block No. 3, Hexblock 3
|
||||||
|
|
||||||
\ incfile incpos inc-fgetc phz 07mai23
|
\ incfile incpos inc-fgetc phz 25aug23
|
||||||
|
|
||||||
variable incfile
|
variable incfile
|
||||||
variable incpos 2 allot
|
variable incpos 2 allot
|
||||||
create rec-offset 1 allot $80 constant dmabuf
|
create rec-offset 1 allot $80 constant dmabuf
|
||||||
|
|
||||||
|
: inc-readrec ( -- f )
|
||||||
|
0 rec-offset c! dmabuf dma!
|
||||||
|
incfile @ drive iread-seq ;
|
||||||
|
|
||||||
: inc-fgetc ( -- c )
|
: inc-fgetc ( -- c )
|
||||||
rec-offset c@ b/rec u< 0= IF dmabuf dma!
|
rec-offset c@ b/rec u< 0=
|
||||||
incfile @ drive iread-seq IF ctrl-z exit THEN
|
IF inc-readrec IF ctrl-z exit THEN THEN
|
||||||
0 rec-offset c! THEN
|
rec-offset c@ dup 1+ rec-offset c! dmabuf + c@ ;
|
||||||
rec-offset c@ dup 1+ rec-offset c! dmabuf + c@
|
|
||||||
; \\
|
|
||||||
incfile @ f.handle @ 0= IF
|
|
||||||
incpos 2@ incfile @ fseek THEN
|
|
||||||
incfile @ fgetc
|
|
||||||
incpos 2@ 1. d+ incpos 2! ;
|
|
||||||
|
|
||||||
\ *** Block No. 4, Hexblock 4
|
\ *** Block No. 4, Hexblock 4
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user