Documentation of kernel API

This commit is contained in:
Kyle J Cardoza 2024-07-08 22:06:32 -04:00
parent fbc0a09d85
commit 3c901ecf62
2 changed files with 15 additions and 14 deletions

View File

@ -60,7 +60,7 @@ Arguments:
C: 0x03 C: 0x03
Return Values: Return Values:
C: Character value C: Character value or NULL
This call does direct (raw) console input; if there is a character ready, it This call does direct (raw) console input; if there is a character ready, it
will be read, and if not, NULL will be returned. will be read, and if not, NULL will be returned.
@ -72,7 +72,7 @@ Arguments:
X: Character value X: Character value
Return Values: Return Values:
C: Character value None
This call does direct (raw) console output; the value supplied will be treated This call does direct (raw) console output; the value supplied will be treated
as the value to write to screen memory, and will not be interpreted for terminal as the value to write to screen memory, and will not be interpreted for terminal
@ -99,7 +99,7 @@ Arguments:
Y: Address of buffer (23:16) Y: Address of buffer (23:16)
Return values: Return values:
C: Error code C: Status code
This call will read up to 255 characters from stdin, or up to the first newline, This call will read up to 255 characters from stdin, or up to the first newline,
whichever comes first. While taking input, a simple line editor is presented to whichever comes first. While taking input, a simple line editor is presented to
@ -118,7 +118,7 @@ Return Values:
C: Status Code C: Status Code
This call checks stdin for a character to read. If there is none, this call will return This call checks stdin for a character to read. If there is none, this call will return
zero in A; if there is a character ready, it will return nonzero in A. zero in C; if there is a character ready, it will return nonzero in C.
## 0x08: Return Version Number ## 0x08: Return Version Number
@ -224,8 +224,9 @@ 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 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 C accumulator will contain the file handle,
accumulator will contain the file handle. On error, the carry flag will be a positive integer value. On error, the C accumulator will contain a negative value,
indicating an error has occured.
## 0x0E: Close File ## 0x0E: Close File
@ -234,12 +235,11 @@ Arguments:
X: File handle X: File handle
Return Values: Return Values:
C: Error 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 carry flag will be cleared, and the C accumulator will contain On success, the C accumulator will contain a status code of STATUS_OK. On error,
a status code of 0x0000. On error, the carry flag will be set, and the C the C accumulator will contain a negative value, indicating an error has occured.
accumulator will contain an error code.
## 0x0F: Duplicate File Handle ## 0x0F: Duplicate File Handle
@ -248,10 +248,11 @@ Arguments:
X: File handle X: File handle
Return Values: Return Values:
C: File handle or error code C: Status code
X: Duplicate of file handle
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 carry flag will be cleared, and the C accumulator will contain On success, the C accumulator will contain a status code of STATUS_OK, and the X
the duplicate file handle. On error, the carry flag will be set, and the C register will contain the duplicate file handle. On error, the C accumulator will
accumulator will contain an error code. contain a negative value, indicating an error has occured.

BIN
src/kernel/vera_font_0.ase Normal file

Binary file not shown.