Use the real interpret in include, and overwrite the original include

This commit is contained in:
Philip Zembrod 2023-05-07 12:54:14 +02:00
parent 5e6c400124
commit 164f12be49
4 changed files with 9 additions and 13 deletions

View File

@ -27,7 +27,7 @@ inctest.log: $(patsubst %, $(cpmfilesdir)/%, \
| emu
echo "volks4th" > $(runcpmdir)/input.script
echo "include include.fb" >> $(runcpmdir)/input.script
echo "xinclude inctest.fth" >> $(runcpmdir)/input.script
echo "include inctest.fth" >> $(runcpmdir)/input.script
echo "bye" >> $(runcpmdir)/input.script
echo "exit" >> $(runcpmdir)/input.script
./emulator/run-in-runcpm.sh volks4th

File diff suppressed because one or more lines are too long

View File

@ -69,7 +69,7 @@
incfile @ drive iread-seq IF ctrl-z exit THEN
0 rec-offset c! THEN
rec-offset c@ dup 1+ rec-offset c! dmabuf + c@
; \\
; \\
incfile @ f.handle @ 0= IF
incpos 2@ incfile @ fseek THEN
incfile @ fgetc
@ -116,13 +116,13 @@
\ *** Block No. 6, Hexblock 6
\ interpret-via-tib include phz 07mai23
: xinterpret tib #tib @ type cr ;
: interpret-via-tib
BEGIN freadline >r .status >in off xinterpret
r> UNTIL ;
BEGIN freadline >r .status >in off interpret r> UNTIL ;
: pushfile r> isfile push fromfile push >r ; restrict
: xinclude ( -- )
pushfile use cr file? cr
: include ( -- )
pushfile use cr file?
probe-for-fb IF 1 load exit THEN
incfile push isfile@ incfile ! b/rec rec-offset c!
incpos push incpos off incpos 2+ dup push off

View File

@ -1,5 +1 @@
0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
@123456789ABCDEF0123456789abcdef0123456789abcdef0123456789abcde
A123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde
B123456789ABCDEF0123456789abcdef0123456789abcdef0123456789abcde
abc
.( included from stream file: "1 2 + 4 * .": ) 1 2 + 4 * . cr