diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-13 22:59:42 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-13 22:59:42 -0400 |
commit | 20853582d5385d12421433d21910e783caa00764 (patch) | |
tree | 446bbd18353cfe0897d293a822458b7960a3645e /doc | |
parent | 44d29a33df81ac07163d5146a9e43a0c4fb80af0 (diff) | |
download | portland-os-20853582d5385d12421433d21910e783caa00764.tar.gz |
dirinfo command
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ints.txt | 43 |
1 files changed, 28 insertions, 15 deletions
diff --git a/doc/ints.txt b/doc/ints.txt index 191d719..d8abd6d 100644 --- a/doc/ints.txt +++ b/doc/ints.txt @@ -24,20 +24,19 @@ invalid system call numbers change eax to -1, and have no other effect. table 1: - function | eax | eax out | ebx | ecx | edx | esi | edi ----------------|-----|---------------|---------------|-------------|-----------|--------|----- - open file | 0x0 | handle | drive number | path | | | - close file | 0x1 | | handle | | | | - file read | 0x2 | read | handle | file offset | count | buffer | - get file size | 0x3 | size | handle | | | | - start task | 0x4 | handle | drive number | path | passed sz | | - log string | 0x5 | | sz string | | | | - get key | 0x6 | keycode | | | | | - allocate ram | 0x7 | start pointer | pages | | | | - memory info | 0x8 | see table 2 | see table 2 | | | | - wait for task | 0x9 | | handle | | | | - - + function | eax | eax out | ebx | ecx | edx | esi | edi +---------------|-----|---------------|---------------|-------------|-------------|--------|----- + open file | 0x0 | handle | drive number | path | | | + close file | 0x1 | | handle | | | | + file read | 0x2 | read | handle | file offset | count | buffer | + get file size | 0x3 | size | handle | | | | + start task | 0x4 | handle | drive number | path | passed sz | | + log string | 0x5 | | sz string | | | | + get key | 0x6 | keycode | | | | | + allocate ram | 0x7 | start pointer | pages | | | | + memory info | 0x8 | see table 2 | see table 2 | | | | + wait for task | 0x9 | | handle | | | | + enumerate dir | 0xa | count | drive number | path | see table 3 | max | table 2: @@ -50,4 +49,18 @@ eax -1 indicates unrecognized ebx 0x1 | kernel dynamic area left 0x2 | total userspace size 0x3 | total userspace left - 0x4 | this process memory left
\ No newline at end of file + 0x4 | this process memory left + + +table 3: +edx of "enumerate dir" is a pointer to a buffer where an array of "directory info"s can be put. +esi is the maximum number of "directory info"s to be placed in the buffer. +the "directory info" structure is defined as follows: + struct { + bool is_dir; + char name[100]; + uint32_t size; + } +"is_dir" here indicates whether or not the entry is another directory. +"name" is a null-terminated string, up to 99 characters, indicating the name of the entry. +"size" is the size of the file this entry refers to, in bytes.
\ No newline at end of file |