From 01ace8c3551428d17ef4298d5c0f4b82df781b1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20J=C2=A0Cardoza?= Date: Tue, 9 Jul 2024 00:31:24 -0400 Subject: [PATCH] Documentation of kernel API --- doc/syscalls.md | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/doc/syscalls.md b/doc/syscalls.md index 6661dd3..cedb736 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -395,7 +395,7 @@ specific error. Arguments: - `C`: `0x16` - - `X`: File handle + - `X`: File handle - `Y`: File attribute bitmask Return Values: @@ -409,4 +409,29 @@ Return Values: - `FILE_SYSTEM` - `FILE_ARCHIVE` - Passing `0x0000` in the `Y` register will clear all attributes. \ No newline at end of file + Passing `0x0000` in the `Y` register will clear all attributes. + + ## `0x17`: Get Current Directory + + Arguments: + - `C`: `0x17` + - `X`: Bank of string + - `Y`: Address of string + +Return Values: + - `C`: Status code + +Argument Structure: + +``` + struct { + char *drive; // The volume name of the drive to check + char *dest; // Buffer for the returned directory path + }; +``` + +This call attempts to create a `NULL`-terminated string with the path of +the current directory in the drive with the volume name specified in the +`drive` argument, and puts that string into the buffer pointed to by +`dest`. On success, `C` will contain `STATUS_OK`. On failure, `C` will +containe a negative value indicating the error type. \ No newline at end of file