When LOAD'ing a file on HostFS using secondary address 2 (header-less load), the kernal never returns control to the user (unless they Ctrl-C) if the file loaded doesn't exist on disk.
From debugging the hypercall for
MACPTR(),
when MACPTR successfully loads a file from HostFS (on any SA), MACPTR() is only called the appropriate number of times.
But when you attempt to LOAD a file that doesn't exist using SA 2, the hypercall is called repeatedly with the same arguments, while always returning -3.
MACPTR($0801, $00, 0)
returning: -3
(note: it takes several seconds for the kernal to print the 'SEARCHING FOR ... LOADING FROM $0801' part)
some debugging
Looking at the function in ieee.cpp,
if (channels[channel].f) {
//... code here ...
} else {
ret = -3; // unsupported
}
Means that this check is failing (I added a print statement to double check that it is)
In hypercalls.cpp, we can take a look at how MACPTR() is called:
When LOAD'ing a file on HostFS using secondary address 2 (header-less load), the kernal never returns control to the user (unless they Ctrl-C) if the file loaded doesn't exist on disk.
From debugging the hypercall for MACPTR(), when
MACPTR
successfully loads a file from HostFS (on any SA),MACPTR()
is only called the appropriate number of times.But when you attempt to LOAD a file that doesn't exist using SA 2, the hypercall is called repeatedly with the same arguments, while always returning -3.
some debugging
Looking at the function in
ieee.cpp
,Means that this check is failing (I added a print statement to double check that it is)
In
hypercalls.cpp
, we can take a look at howMACPTR()
is called:the return value of
MACPTR()
is totally ignored, which is problematic ifMACPTR()
returns -3.Changing the last line to:
actually solves the issue. (a PR is coming asap)