Documentation of kernel API
This commit is contained in:
parent
82ae21f95c
commit
a4a72f6d16
|
@ -286,3 +286,29 @@ the buffer pointed to by `dest`. On success, the C accumulator will contain STAT
|
||||||
and the X register will contain the number of bytes actually read. On error, the C
|
and the X register will contain the number of bytes actually read. On error, the C
|
||||||
accumulator will contain a negative value indicating the specific error, and the X
|
accumulator will contain a negative value indicating the specific error, and the X
|
||||||
register will contain the number of bytes actually read.
|
register will contain the number of bytes actually read.
|
||||||
|
|
||||||
|
## 0x11: Write to File Handle
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
C: 0x11
|
||||||
|
X: Bank of argument block
|
||||||
|
Y: Address of argument block
|
||||||
|
|
||||||
|
Return Values:
|
||||||
|
C: Status code
|
||||||
|
X: Number of bytes actually written
|
||||||
|
|
||||||
|
Argument block structure:
|
||||||
|
|
||||||
|
struct {
|
||||||
|
void *src; // Pointer to the buffer to use.
|
||||||
|
uint16_t file; // File handle.
|
||||||
|
size_t length; // Maximum number of bytes to write.
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
This call attempts to write up to `length` bytes to the file handle `file`, from
|
||||||
|
the buffer pointed to by `src`. On success, the C accumulator will contain STATUS_OK,
|
||||||
|
and the X register will contain the number of bytes actually written. On error, the C
|
||||||
|
accumulator will contain a negative value indicating the specific error, and the X
|
||||||
|
register will contain the number of bytes actually written.
|
Loading…
Reference in New Issue