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