Detect and message file-not-found condition in INCLUDE

This commit is contained in:
Philip Zembrod 2022-07-06 01:36:15 +02:00
parent d704e50d71
commit 6812352db3
1 changed files with 5 additions and 4 deletions

View File

@ -18,10 +18,14 @@
dup 0= swap #cr = or IF 0 exit THEN
i/o-status? IF 1 exit THEN -1 ;
| : i/o-status?abort i/o-status? 3 and IF c64cr
fload-dev @ dos-error abort THEN ;
| : freadline ( -- eof )
fload-dev @ fload-2nd @ busin
i/o-status?abort
tib /tib bounds
DO bus@ dup eol? under
DO bus@ i/o-status?abort dup eol? under
IF I c! ELSE drop THEN
dup 0<
IF drop ELSE I + tib - #tib ! UNLOOP
@ -35,9 +39,6 @@
\ fload-open fload-close 30jun20pz
| : i/o-status?abort i/o-status? IF cr
fload-dev @ dos-error abort THEN ;
defer on-fload ' noop is on-fload
| : fload-open ( addr c -- )
on-fload fload-dev @