Enlarge tib and use in include instead of fib

This commit is contained in:
Philip Zembrod 2020-07-26 01:05:53 +02:00
parent 8803bbc448
commit e853730042
2 changed files with 9 additions and 14 deletions

View File

@ -1176,8 +1176,9 @@ Code fill ( addr quan 8b -- )
( input strings 24dec83ks)
| $84 Constant /tib
Variable #tib 0 #tib !
Variable >tib here >tib ! $50 allot
Variable >tib here >tib ! /tib allot
Variable >in 0 >in !
Variable blk 0 blk !
Variable span 0 span !

View File

@ -13,9 +13,6 @@
create fload-dev 8 ,
create fload-2nd f ,
| 84 constant /fib
create fib /fib allot
variable #fib
| : eol? ( c -- f )
dup 0= swap #cr = or IF 0 exit THEN
@ -23,14 +20,14 @@
| : freadline ( -- eof )
fload-dev @ fload-2nd @ busin
fib /fib bounds
tib /tib bounds
DO bus@ dup eol? under
IF I c! ELSE drop THEN
dup 0<
IF drop ELSE I + fib - #fib ! UNLOOP
IF drop ELSE I + tib - #tib ! UNLOOP
i/o-status? busoff exit THEN
LOOP /fib #fib !
." warning: line exceeds max " /fib .
LOOP /tib #tib !
." warning: line exceeds max " /tib .
cr ." extra chars ignored" cr
BEGIN bus@ eol? 1+ UNTIL
i/o-status? busoff ;
@ -65,17 +62,14 @@
\ include 09jun20pz
create >tib-orig >tib @ ,
fib >tib !
: interpret-via-fib
: interpret-via-tib
BEGIN freadline >r >in off
#fib @ #tib ! interpret r> UNTIL ;
interpret r> UNTIL ;
: include ( -- )
blk @ Abort" no include from blk"
bl parse fload-open
interpret-via-fib
interpret-via-tib
fload-close
#tib off >in off ;