From 3c901ecf62e352d2addbc6d7d597b44ca872db3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20J=C2=A0Cardoza?= Date: Mon, 8 Jul 2024 22:06:32 -0400 Subject: [PATCH] Documentation of kernel API --- doc/syscalls.md | 29 +++++++++++++++-------------- src/kernel/vera_font_0.ase | Bin 0 -> 4086 bytes 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 src/kernel/vera_font_0.ase diff --git a/doc/syscalls.md b/doc/syscalls.md index f3b7200..f063734 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -60,7 +60,7 @@ Arguments: C: 0x03 Return Values: - C: Character value + C: Character value or NULL This call does direct (raw) console input; if there is a character ready, it will be read, and if not, NULL will be returned. @@ -72,7 +72,7 @@ Arguments: X: Character value Return Values: - C: Character value + None 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 @@ -99,7 +99,7 @@ Arguments: Y: Address of buffer (23:16) Return values: - C: Error code + C: Status code 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 @@ -118,7 +118,7 @@ Return Values: C: Status Code 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 @@ -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 `[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 -accumulator will contain the file handle. On error, the carry flag will be +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 @@ -234,12 +235,11 @@ Arguments: X: File handle Return Values: - C: Error code + C: Status 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. +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. ## 0x0F: Duplicate File Handle @@ -248,10 +248,11 @@ Arguments: X: File handle 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 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. \ No newline at end of file +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. \ No newline at end of file diff --git a/src/kernel/vera_font_0.ase b/src/kernel/vera_font_0.ase new file mode 100644 index 0000000000000000000000000000000000000000..00e6fb7f28b43926ffdf35bcd557f22c1334c835 GIT binary patch literal 4086 zcmb`J`8(A6`^W91!=UWT=-8r$O18oj*;2F#g|Qt=Vh##1yzM?BLL#Xt-v5^f57K?UH5f8U-y08_v3!OetPY|xVR|A++49-T--uj z++18--uv+%@o;hfo#YbY68lf`f9S&Y`3ySWKUBW`xl;QfsQeG|zbJpR`TpLHXWu{& z^!wju<^9(G7qst$xy(Gg0(?Wz_k+BZ_KW<=|5t|o?)pcu`?riJq`DkJdZYJS@Vi|MEpYzMu4 zLqjXkC-Cv5B8Lxr-79X|%(HCAa5*x)u{tkh!~f_A3s6FCP48}7(c0Ha7Q*kDszMW? zP#Tm5Q{6Q@`>kw$Fad=4Sqkbg5?J?)h$Sc{AJS3(BJ_ds2S-dG$*CMMC!SqQ=x|=) zZm__cjUf9r$VTxcK^}6iCUr?KK^*hZ6YusV3xH>tWx%p%nOy4pGz^bKZ&&`Lbrq_=N&4^fruK+_nZxAK=RB(mUo?!c4Ocfo-a45Rk9r@xN=-Nx(H<#>L%ObL53_Jqi_RmV zjE9nt{n73X*dssya0AWFXCEVc>v4s(*1|<#m zbh|!q_wimZ!&TZB5k?|kK;y!cFplfWI2QK+j z_uB;XvsseZ`?`N3kMCr;V1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