Documentation of kernel API

This commit is contained in:
Kyle J Cardoza 2024-07-08 23:55:35 -04:00
parent 499a1e4e3e
commit 480aec6968
1 changed files with 8 additions and 8 deletions

View File

@ -242,8 +242,8 @@ This call attempts to open the file referred to by the provided `NULL`-terminat
string, which must contain a fully-qualified pathname -- something of the form string, which must contain a fully-qualified pathname -- something of the form
`[drive]:/[dir]/[dir2]/filename.ext`, such as `sd0:/games/kaboom/readme.ansi`. `[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 If the file is successfully opened, `C` will contain `STATUS_OK`, and
the `X` register will contain the file handle. On error, the C accumulator will contain the `X` register will contain the file handle. On error, `C` will contain
a negative value indicating which error has occured. a negative value indicating which error has occured.
## `0x0E`: Close File Handle ## `0x0E`: Close File Handle
@ -256,8 +256,8 @@ Return Values:
- `C`: Status code - `C`: Status code
This call attempts to close the file referred to by the provided file handle. This call attempts to close the file referred to by the provided file handle.
On success, the C accumulator will contain a status code of `STATUS_OK`. On error, On success, `C` will contain a status code of `STATUS_OK`. On error,
the C accumulator will contain a negative value, indicating an error has occured. `C` will contain a negative value, indicating an error has occured.
## `0x0F`: Duplicate File Handle ## `0x0F`: Duplicate File Handle
@ -271,8 +271,8 @@ Return Values:
This call attempts to duplicate the provided file handle. The new file handle 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. 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` On success, `C` will contain a status code of `STATUS_OK`, and the `X`
register will contain the duplicate file handle. On error, the C accumulator will register will contain the duplicate file handle. On error, `C` will
contain a negative value, indicating an error has occured. contain a negative value, indicating an error has occured.
## `0x10`: Read from File ## `0x10`: Read from File
@ -297,7 +297,7 @@ Argument Structure:
``` ```
This call attempts to read up to `length` bytes from the file handle `file`, into 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`, the buffer pointed to by `dest`. On success, `C` will contain `STATUS_OK`,
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.
@ -324,7 +324,7 @@ Argument Structure:
``` ```
This call attempts to write up to `length` bytes to the file handle `file`, from 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`, the buffer pointed to by `src`. On success, `C` will contain `STATUS_OK`,
and the `X` register will contain the number of bytes actually written. On error, the C 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` accumulator will contain a negative value indicating the specific error, and the `X`
register will contain the number of bytes actually written. register will contain the number of bytes actually written.