summaryrefslogtreecommitdiff
path: root/doc/ints.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ints.txt')
-rw-r--r--doc/ints.txt58
1 files changed, 36 insertions, 22 deletions
diff --git a/doc/ints.txt b/doc/ints.txt
index c89b433..ca4d91f 100644
--- a/doc/ints.txt
+++ b/doc/ints.txt
@@ -13,35 +13,49 @@ modifies ecx, edx
modifies eax even if no value is returned
see table 1
-file system calls have units of bytes unless otherwise specified
-functions returning handles or pointers use 0 to indicate error
-see keys.txt for the return type of the "get key" system call
+file system calls have units of bytes unless otherwise specified.
+functions returning handles or pointers use 0 to indicate error.
+see keys.txt for the return type of the "get key" system call.
the edx register of "start task" is a pointer to a null-terminated string.
a pointer to a readonly copy of this string is put into the new task's edx.
+ the esi register of the new task contains a handle to the caller's task.
+ the edi register is copied directly, and is intended to hold a task handle.
+ this task handle is who stdio ipc communication should be done with.
+ipc operations return 0xffffffff if the specified task doesn't exist.
+ "find unread ipc" system call returns 0 if there is no unread ipc.
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 |
- 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 | | | |
- swap color | 0xf | | row << 8 | col | | | |
+ function | eax | eax out | ebx | ecx | edx | esi | edi
+-------------------|------|-----------------|----------------|----------------|--------------|--------------|--------------
+ open file | 0x00 | handle | drive number | path | | |
+ close file | 0x01 | | handle | | | |
+ file read | 0x02 | read | handle | file offset | count | buffer |
+ get file size | 0x03 | size | handle | | | |
+ start task | 0x04 | handle | drive number | path | passed sz | | passed dword
+ ipc send | 0x05 | written | task handle | max count | buffer | |
+ ipc read | 0x06 | read | task handle | max count | buffer | |
+ allocate ram | 0x07 | start pointer | pages | | | |
+ memory info | 0x08 | see table 2 | see table 2 | | | |
+ wait for task | 0x09 | | handle | | | |
+ enumerate dir | 0x0a | count | drive number | path | see table 3 | max |
+ system log | 0x0b | | message sz | | | |
+ count of dir | 0x0c | number of files | drive number | path | | |
+ new window | 0x0d | window handle | width | height | pixel buffer | |
+ delete window | 0x0e | | window handle | | | |
+ resize window | 0x0f | | window handle | width | height | |
+ reassign pixbuf | 0x10 | | window handle | pixel buffer | | |
+ paint window | 0x11 | | window handle | | | |
+ get win action | 0x12 | | window handle | action pointer | | |
+ wait for action | 0x13 | | | | | |
+ wait ipc send | 0x14 | | sending task | | | |
+ wait any ipc send | 0x15 | | | | | |
+ find unread ipc | 0x16 | sending task | | | | |
+ wait ipc read | 0x17 | | reading task | | | |
+ is task running | 0x18 | boolean | task handle | | | |
table 2:
@@ -63,4 +77,4 @@ esi is the maximum number of "directory info"s to be placed in the buffer.
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
+ entry is a directory, and a zero if this entry is not. The remainder of the structure is reserved.