diff --git a/8080/CPM/Makefile b/8080/CPM/Makefile index 984111c..cda56c5 100644 --- a/8080/CPM/Makefile +++ b/8080/CPM/Makefile @@ -211,17 +211,13 @@ test-blk.log: \ test3.log: \ $(patsubst %, $(cpmfilesdir)/%, v4th3.com sfileint.fth \ - include.fb log2file.fb core.fr) \ + log2file.fb core.fr) \ $(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth) \ tests/empty.fb) | emu ./emulator/run-in-runcpm.sh \ "v4th3 sfileint.fth" \ "include-inner" \ "onlyforth" \ - "use include.fb" \ - "onlyforth dos also forth definitions" \ - "\ ' read-seq alias iread-seq" \ - "7 8 thru" \ "include test-blk.fth" \ "bye" \ "exit" diff --git a/8080/CPM/src/sfileint.fth b/8080/CPM/src/sfileint.fth index 0f95e37..64d8075 100644 --- a/8080/CPM/src/sfileint.fth +++ b/8080/CPM/src/sfileint.fth @@ -370,7 +370,14 @@ Forth definitions : from isfile push use ; : loadfrom ( n -- ) isfile push fromfile push use load close ; -: include 1 loadfrom ; +: include ( -- ) + rec-offset push isfile push fromfile push + use cr file? + include-inner + incfile @ + IF increc @ incfile @ cr+ex! + incfile @ readrec Abort" error re-reading after include" + THEN ; : eof ( -- f ) isfile@ dup filesize @ swap record @ = ;