Documentation of kernel API

This commit is contained in:
Kyle J Cardoza 2024-07-08 17:24:17 -04:00
parent 69cda888f5
commit fbc0a09d85
1 changed files with 30 additions and 1 deletions

View File

@ -225,4 +225,33 @@ 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 carry flag will be cleared and the C If the file is successfully opened, the carry flag will be cleared and the C
accumulator will contain the file handle. On error, the carry flag will be accumulator will contain the file handle. On error, the carry flag will be
## 0x0E: Close File
Arguments:
C: 0x0E
X: File handle
Return Values:
C: Error code
This call attempts to close the file referred to by the provided file handle.
On success, the carry flag will be cleared, and the C accumulator will contain
a status code of 0x0000. On error, the carry flag will be set, and the C
accumulator will contain an error code.
## 0x0F: Duplicate File Handle
Arguments:
C: 0x0F
X: File handle
Return Values:
C: File handle or error code
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 carry flag will be cleared, and the C accumulator will contain
the duplicate file handle. On error, the carry flag will be set, and the C
accumulator will contain an error code.