From a76303dd10b9bc771eeb1c173d816d010a42e987 Mon Sep 17 00:00:00 2001 From: antifallobst Date: Tue, 2 May 2023 18:07:10 +0200 Subject: [PATCH] noxos (docs): updated sysabi --- content/projects/noxos/docs/sysabi.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/content/projects/noxos/docs/sysabi.md b/content/projects/noxos/docs/sysabi.md index f8f24c1..21d8efc 100644 --- a/content/projects/noxos/docs/sysabi.md +++ b/content/projects/noxos/docs/sysabi.md @@ -22,15 +22,15 @@ The following calls should be implemented to some degree in noxos 1.0. # Categories ## Files -| ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status | -|--------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|--------|------|-------------|--------|-------------| -| 0x0101 | `nx_fopen` | Opens the file at the _len_ bytes long path _path_ and writes a file descriptor to the referenced file into _fd_ (which needs to be a pointer). | path | len | *fd | | status | Implemented | -| 0x0102 | `nx_fclose` | Closes the file which is indicated by descriptor _fd_. This should always be called, otherwise the OS will have to unload files without knowledge of usage. | fd | | | | status | Implemented | -| 0x0103 | `nx_fread` | Reads at most _n_ bytes from a file given as descriptor _fd_ and at a specific position _offset_ into a given memory region _mem_. | fd | offset | mem | n | status | Implemented | -| 0x0104 | `nx_fwrite` | Writes _n_ bytes from a given memory region _mem_ into the file referenced by _fd_ at the given position _offset_, not inserting but either overwriting existing content or appending to the file. | fd | offset | mem | n | status | Implemented | -| 0x0105 | `nx_fdelete` | Completely delete the file or folder at a given path _path_, which is _len_ bytes long. | path | len | | | status | Implemented | -| 0x0106 | `nx_flist` | List all files and/or directories at the _len_ bytes long path _path_ and write their NULL-separated names into _mem_. When _mem_ is NULL, _needed_mem_ (which needs to be a pointer to an 32-bit integer) is filled with the appropriate value. | path | len | mem | *needed_mem | status | Implemented | -| 0x0107 | `nx_finfo` | Writes the information about the files attribute _attr_ into mem. Types of attributes are described below. | fd | attr | mem | | status | N/A | +| ID | Name | Description | Arg1 | Arg2 | Arg3 | Arg4 | Result | Status | +|--------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------|--------|------|-------------|---------------|-------------| +| 0x0101 | `nx_fopen` | Opens the file at the _len_ bytes long path _path_ and writes a file descriptor to the referenced file into _fd_ (which needs to be a pointer). | path | len | *fd | | status | Implemented | +| 0x0102 | `nx_fclose` | Closes the file which is indicated by descriptor _fd_. This should always be called, otherwise the OS will have to unload files without knowledge of usage. | fd | | | | status | Implemented | +| 0x0103 | `nx_fread` | Reads at most _n_ bytes from a file given as descriptor _fd_ and at a specific position _offset_ into a given memory region _mem_. Returns the amount of bytes that were actually read. | fd | offset | mem | n | read_bytes | Implemented | +| 0x0104 | `nx_fwrite` | Writes at most _n_ bytes from a given memory region _mem_ into the file referenced by _fd_ at the given position _offset_, not inserting but either overwriting existing content or appending to the file. Returns the amount of bytes that were actually written. | fd | offset | mem | n | written_bytes | Implemented | +| 0x0105 | `nx_fdelete` | Completely delete the file or folder at a given path _path_, which is _len_ bytes long. | path | len | | | status | Implemented | +| 0x0106 | `nx_flist` | List all files and/or directories at the _len_ bytes long path _path_ and write their NULL-separated names into _mem_. When _mem_ is NULL, _needed_mem_ (which needs to be a pointer to an 32-bit integer) is filled with the appropriate value. | path | len | mem | *needed_mem | status | Implemented | +| 0x0107 | `nx_finfo` | Writes the information about the files attribute _attr_ into mem. Types of attributes are described below. | fd | attr | mem | | status | N/A | **Note:** The _len_ argument of paths isn't used at the moment, rather than using _len_, _path_ needs to be Null-Terminated.