summaryrefslogtreecommitdiff
path: root/doc/ints.txt
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-06 00:48:07 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-06 00:48:07 -0400
commite8c6577617bffa4402c07c7aa20e3c24f03c1c20 (patch)
tree2fb9230b62d2344a44453117de9e656892219788 /doc/ints.txt
parent7ff724fe8f709440da9c730fdb8dcbaa4f989ed5 (diff)
downloadportland-os-e8c6577617bffa4402c07c7aa20e3c24f03c1c20.tar.gz
program loading, others
big kernel additions: paging, elf loading, separate kernel and user page allocation it now properly loads and runs sd0:bin/init.elf still need to determine which disk was booted from, and start the init on that disk
Diffstat (limited to 'doc/ints.txt')
-rw-r--r--doc/ints.txt52
1 files changed, 27 insertions, 25 deletions
diff --git a/doc/ints.txt b/doc/ints.txt
index 1da08fd..2a97049 100644
--- a/doc/ints.txt
+++ b/doc/ints.txt
@@ -1,30 +1,32 @@
-int 0x30 - exit task
-int 0x31 - yield to scheduler
-int 0x33 - extend data section by eax bytes
- actual amount extended returned in eax
+quit task is int 0x38
-int 0x32 - system call
+
+yield task is int 0x39
+eax is cleared on yield
+
+
+syscall is int 0x30
system call number in eax
args in ebx, ecx, edx, esi, edi
result in eax
+ note: do not assume eax is unmodified if there is no value to be returned
+modifies ecx, edx
+
+file system calls have units of bytes unless otherwise specified
+functions returning handles or pointers use 0 to indicate error
+functions returning "success" use 1 for success and 0 for failure
+see keys.txt for the return type of the "get key" system call
+
+invalid system call numbers change eax to -1, and have no other effect.
+
- function | eax | eax out | ebx | ecx | edx | esi | edi
----------------|-----|-----------|---------------|--------|--------|-----|-----
- vga_blank | 0x0 | | | | | |
- vga_set_color | 0x1 | | color | | | |
- vga_printch | 0x2 | | char | | | |
- vga_printsz | 0x3 | | sz string | | | |
- vga_printsn | 0x4 | | non-sz string | length | | |
- | | | | | | |
- fs_open | 0x5 | handle | path | | | |
- fs_open_root | 0x6 | handle | | | | |
- fs_new | 0x7 | handle | path | | | |
- fs_close | 0x8 | | handle | | | |
- fs_delete | 0x9 | | path | | | |
- fs_exists | 0xa | does | path | | | |
- fs_seek | 0xb | seeked by | handle | by | | |
- fs_tell | 0xc | position | handle | | | |
- fs_read | 0xd | read | handle | max | buffer | |
- fs_write | 0xe | written | handle | max | buffer | |
- | | | | | | |
- plef_run | 0xf | handle | image path | | | | \ No newline at end of file
+ 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 | success | drive number | path | | |
+ log string | 0x5 | | sz string | | | |
+ get key | 0x6 | keycode | | | | |
+ allocate ram | 0x7 | start pointer | pages | | | | \ No newline at end of file