From a582a0daa9e4060aacac1bd082c123bfc23b652d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kyle=20J=C2=A0Cardoza?= Date: Mon, 8 Jul 2024 23:24:40 -0400 Subject: [PATCH] Documentation of kernel API --- doc/syscalls.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/doc/syscalls.md b/doc/syscalls.md index 57636fe..aaf092c 100644 --- a/doc/syscalls.md +++ b/doc/syscalls.md @@ -331,4 +331,44 @@ Return value: This call moves the internal file pointer, the position in the specified file from which data can be read or to which data can be written. On success, this call returns STATUS_OK in C, and the new file position in X and Y. On error, C will contain a negative -value indicating the specific error, and the new file position in X and Y. \ No newline at end of file +value indicating the specific error, and the new file position in X and Y. + +## 0x13: Device I/O Control + +This call performs driver-specific functions. + +## 0x14: Delete File + +Arguments: + C: 0x14 + X: Bank of pathname + Y: Address of pathname + +Return Values: + C: Status code + +This call attempts to delete the file indicated by the given NULL-terminated string, +which must contain a fully-qualified pathname. On success, this C will contain +STATUS_OK. On failure, C will contain a negative number indicating the specific +error. + +## 0x15: Move File + +Arguments: + C: 0x15 + X: Bank of argument structure + Y: Address of argument structure + +Return Values: + C: Status code + +Argument Structure: + + struct { + char *src; // Fully-qualified source pathname. + char *dest; // Fully-qualified destination pathname. + }; + +This call attempts to move or rename the specified `source` file to `dest`. On success, +C will contain STATUS_OK. On error, C will contain a negative value indicating the +specific error.