Specifications

Saturn Debug Stub Functions 10-13
Psy-Q Development System
Read bytes from file to memory:
Passed: r0.l 4
r4.l File handle
r5.l Address of memory buffer
r6.l N
o
of bytes to be read from file
Returns: r0.l N
o
of bytes actually read (-1=failure, 0=end of file)
Write bytes from memory to file:
Passed: r0.l 5
r4.l File handle
r5.l Address of memory buffer
r6.l N
o
of bytes to written from buffer
Returns: r0.l N
o
of bytes actually written (-1 if failure)
Move File Pointer (seek):
Passed: r0.l 6
r4.l File Handle
r5.l Offset
r6.l Seek Mode
Returns: r0.l New Absolute File Position (-1 if failure)
If r6.l =0 then seek is relative to start of file;
If r6.l =1 then seek is relative to current file pointer;
If r6.l =2 then seek is backwards from the end of the file.
Get File Error Code:
Passed: r0.l -1
Returns: r0.l File Error Code
The file error codes returned match the C standard error codes defined in the
<errno.h> header.