diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-13 03:19:57 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-13 03:19:57 -0400 |
commit | 1e4a254674f668839e5de273916024c16814b045 (patch) | |
tree | 6774f4d4398a29c4aafb4120070975d864ffcde4 /doc/ints.txt | |
parent | b8284137d4e0eec11c78bc14047243fce6a51373 (diff) | |
download | portland-os-1e4a254674f668839e5de273916024c16814b045.tar.gz |
(basic, not much tested) keyboard, better panic
Diffstat (limited to 'doc/ints.txt')
-rw-r--r-- | doc/ints.txt | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/doc/ints.txt b/doc/ints.txt index cd91f60..dd47d81 100644 --- a/doc/ints.txt +++ b/doc/ints.txt @@ -9,31 +9,33 @@ 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 +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 functions returning "success" use 1 for success and 0 for failure 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. 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 | success | drive number | path | | | - log string | 0x5 | | sz string | | | | - get key | 0x6 | keycode | | | | | - allocate ram | 0x7 | start pointer | pages | | | | - memory info | 0x8 | see table 2 | see table 2 | | | | + 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 | 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 | | | | table 2: |