From 480aec696842341d42d17a9ce843c32b25c3ee2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20J=C2=A0Cardoza?= Date: Mon, 8 Jul 2024 23:55:35 -0400 Subject: [PATCH] Documentation of kernel API --- doc/syscalls.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/syscalls.md b/doc/syscalls.md index 70415de..087d700 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -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 `[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 +If the file is successfully opened, `C` will contain `STATUS_OK`, and +the `X` register will contain the file handle. On error, `C` will contain a negative value indicating which error has occured. ## `0x0E`: Close File Handle @@ -256,8 +256,8 @@ Return Values: - `C`: Status code 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, -the C accumulator will contain a negative value, indicating an error has occured. +On success, `C` will contain a status code of `STATUS_OK`. On error, +`C` will contain a negative value, indicating an error has occured. ## `0x0F`: Duplicate File Handle @@ -271,8 +271,8 @@ Return Values: 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 +On success, `C` will contain a status code of `STATUS_OK`, and the `X` +register will contain the duplicate file handle. On error, `C` will contain a negative value, indicating an error has occured. ## `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 -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 accumulator will contain a negative value indicating the specific error, and the `X` 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 -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 accumulator will contain a negative value indicating the specific error, and the `X` register will contain the number of bytes actually written.