summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/ints.txt43
1 files changed, 21 insertions, 22 deletions
diff --git a/doc/ints.txt b/doc/ints.txt
index d8abd6d..45c09b3 100644
--- a/doc/ints.txt
+++ b/doc/ints.txt
@@ -24,19 +24,23 @@ 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 | | | |
- enumerate dir | 0xa | count | drive number | path | see table 3 | max |
+ 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 |
+ vga print at | 0xb | | row << 8 | col | sz string | | |
+ count of dir | 0xc | number of files | drive number | path | | |
+ clear screen | 0xd | | | | | |
+ set color | 0xe | | VGA color code | | | |
table 2:
@@ -55,12 +59,7 @@ eax -1 indicates unrecognized ebx
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
+the "directory info" structure is 128 bytes long. The first 100 bytes are a null-terminated string
+ indicating the name of the file represented by this entry. The next four bytes are a 32-bit integer
+ indicating the size of the file represented in bytes. The next byte's lowest bit is a one if this
+ entry is a directory, and a zero if this entry is not. The remainder of the structure is reserved. \ No newline at end of file