BASICTrans_Error.
Ralph Corderoy
ralph at inputplus.co.uk
Mon Nov 4 22:17:18 GMT 2002
Hi,
> I might be way off here, as I've currently no documentation to work
> from, just experimentation, but it seems that OSLib's definition of
> BASICTrans_Error thinks R1 is a reference to an OS_Error.
>
> SWI BASICTrans_Error = (NUMBER 0x42C81 "Copy translated error string to
> buffer",
> ENTRY (R0 = .Int: error_no,
> R1 = .Ref OS_Error: error_buffer),
> EXIT (R0?, R1?, R2?, R3?));
>
> BASICTrans seems to actually place a \0-terminated string at R1. Can
> someone confirm OSLib's definition seems wrong?
I've now read page 4-339 and it says the SWI puts a \0-terminated string
at R1 so OSLib's definition is wrong. My defmod's poor. Is this the
right definition?
SWI BASICTrans_Error = (NUMBER 0x42C81 "Copy translated error string to
buffer",
ENTRY (R0 = .Int: error_no,
R1 = .Ref .String: error_buffer),
EXIT (R0?, R1?, R2?, R3?));
> As an aside, is it documented what BASICTrans does if R0 < 0 or R0 >
> largest valid error number (112 for RO 3.11)?
It doesn't seem to be, and trying it doesn't result in the V-flag being
set, just junk at R1?
Cheers,
Ralph.
More information about the oslib-user
mailing list