Compare commits
No commits in common. "a4a72f6d1627c37ea6e580ac1cb6ec2d11b52b61" and "3c901ecf62e352d2addbc6d7d597b44ca872db3f" have entirely different histories.
a4a72f6d16
...
3c901ecf62
|
@ -160,9 +160,10 @@ Arguments:
|
|||
Y: Address of buffer
|
||||
|
||||
Return Values:
|
||||
C: Status code
|
||||
None
|
||||
|
||||
Argument Structure:
|
||||
This call sets the system date from the data in the specified buffer,
|
||||
which must be in the following format:
|
||||
|
||||
struct {
|
||||
uint16_t year // Current year
|
||||
|
@ -171,8 +172,6 @@ Argument Structure:
|
|||
uint8_t weekday; // 0 = Sunday..6=Saturday
|
||||
};
|
||||
|
||||
This call sets the system date from the data in the argument structure.
|
||||
|
||||
## 0x0B: Get Time
|
||||
|
||||
Arguments:
|
||||
|
@ -181,9 +180,10 @@ Arguments:
|
|||
Y: Address of buffer
|
||||
|
||||
Return Values:
|
||||
C: Status code
|
||||
None
|
||||
|
||||
Argument Structure:
|
||||
This call fills in the specified buffer with the current time,
|
||||
in the following format:
|
||||
|
||||
struct {
|
||||
uint8_t hour; // 0..23
|
||||
|
@ -191,19 +191,18 @@ Argument Structure:
|
|||
uint8_t second; // 0..59
|
||||
};
|
||||
|
||||
This call fills in the specified argument structure with the current time.
|
||||
|
||||
## 0x0C: Set Time
|
||||
|
||||
Arguments:
|
||||
C: 0x0C
|
||||
X: Bank of argument structure
|
||||
X: Bank of buffer
|
||||
Y: Address of buffer
|
||||
|
||||
Return Values:
|
||||
C: Status code
|
||||
None
|
||||
|
||||
Argument Structure:
|
||||
This call sets the current time from the provided buffer, which must
|
||||
be in the following format:
|
||||
|
||||
struct {
|
||||
uint8_t hour; // 0..23
|
||||
|
@ -211,8 +210,6 @@ Argument Structure:
|
|||
uint8_t second; // 0..59
|
||||
};
|
||||
|
||||
This call sets the current time from the provided argument structure.
|
||||
|
||||
## 0x0D: Open File
|
||||
|
||||
Arguments:
|
||||
|
@ -221,16 +218,15 @@ Arguments:
|
|||
Y: Address of pathname string
|
||||
|
||||
Return Values:
|
||||
C: Status code
|
||||
X: File handle
|
||||
C: File handle or error code
|
||||
|
||||
This call attempts to open the file referred to by the provided NULL-terminated
|
||||
string, which must contain a fully-qualified pathname -- something of the form
|
||||
`[drive]:/[dir]/[dir2]/filename.ext`, such as `sd0:/games/kaboom/readme.ansi`.
|
||||
|
||||
If the file is successfully opened, the C accumulator will contain STATUS_OK, and
|
||||
the X register will contain the file handle. On error, the C accumulator will contain
|
||||
a negative value indicating which error has occured.
|
||||
If the file is successfully opened, the C accumulator will contain the file handle,
|
||||
a positive integer value. On error, the C accumulator will contain a negative value,
|
||||
indicating an error has occured.
|
||||
|
||||
## 0x0E: Close File
|
||||
|
||||
|
@ -259,56 +255,4 @@ This call attempts to duplicate the provided file handle. The new file handle
|
|||
will be exactly identical to the provided one, and either may be used at any time.
|
||||
On success, the C accumulator will contain a status code of STATUS_OK, and the X
|
||||
register will contain the duplicate file handle. On error, the C accumulator will
|
||||
contain a negative value, indicating an error has occured.
|
||||
|
||||
## 0x10: Read from File Handle
|
||||
|
||||
Arguments:
|
||||
C: 0x10
|
||||
X: Bank of argument block
|
||||
Y: Address of argument block
|
||||
|
||||
Return Values:
|
||||
C: Status code
|
||||
X: Number of bytes actually read
|
||||
|
||||
Argument block structure:
|
||||
|
||||
struct {
|
||||
void *dest; // Pointer to the buffer to use.
|
||||
uint16_t file; // File handle.
|
||||
size_t length; // Maximum number of bytes to read.
|
||||
};
|
||||
|
||||
|
||||
This call attempts to read up to `length` bytes from the file handle `file`, into
|
||||
the buffer pointed to by `dest`. On success, the C accumulator will contain STATUS_OK,
|
||||
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
|
||||
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.
|
||||
contain a negative value, indicating an error has occured.
|
Loading…
Reference in New Issue