summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
committerBenji Dial <benji6283@gmail.com>2021-01-24 12:00:11 -0500
commitbce944d1498eaa3b6940ee234c863b3548a66b37 (patch)
treeea40c087ab4f0f236aee8d158cf68550f5209f72 /doc
parentca731aa747214919df7b3dfe3478dbe787ce5b68 (diff)
downloadportland-os-bce944d1498eaa3b6940ee234c863b3548a66b37.tar.gz
graphics!
Diffstat (limited to 'doc')
-rw-r--r--doc/internal/scantabs.txt17
-rw-r--r--doc/ints.txt58
-rw-r--r--doc/keys.txt26
-rw-r--r--doc/man.txt20
4 files changed, 66 insertions, 55 deletions
diff --git a/doc/internal/scantabs.txt b/doc/internal/scantabs.txt
new file mode 100644
index 0000000..208da08
--- /dev/null
+++ b/doc/internal/scantabs.txt
@@ -0,0 +1,17 @@
+scan table file header:
+ uint32_t: number of scan tables
+ 0x10 aligned scan table records
+
+scan table record:
+ uint32_t offset in file of table data / 0x200
+ uint8_t: length of prefix
+ uint8_t's: prefix
+
+table data (0x200 aligned):
+ first key down table then key up table
+ uint8_t's:
+ 0x00: bad scancode
+ 0x01: prefix (go to table)
+ 0x02: wrong polarity (go to other up or down)
+ 0x03: good scancode, no keycode
+ other: keycode
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.
diff --git a/doc/keys.txt b/doc/keys.txt
index 8deb480..bccd47a 100644
--- a/doc/keys.txt
+++ b/doc/keys.txt
@@ -19,18 +19,18 @@ table 1:
code | key
------|---------------
- 0x80 | caps lock
- 0x81 | insert
- 0x82 | num lock
- 0x83 | scroll lock
- 0x84 | left shift
- 0x85 | right shift
- 0x86 | left alt
- 0x87 | right alt
- 0x88 | left control
- 0x89 | right control
- 0x8a | left meta
- 0x8b | right meta
+ 0x80 | left shift
+ 0x81 | right shift
+ 0x82 | left control
+ 0x83 | right control
+ 0x84 | left alt
+ 0x85 | right alt
+ 0x86 | left win
+ 0x87 | right win
+ 0x88 | caps lock
+ 0x89 | num lock
+ 0x8a | scroll lock
+ 0x8b | insert
0x8c | reserved
.... | reserved
0x97 | reserved
@@ -102,4 +102,4 @@ bit 10: left meta
bit 11: right meta
bits 12-23 are reserved for future versions. in this version, they should be set
-to zero when giving a keycode, and should be ignored when recieving a keycode. \ No newline at end of file
+to zero when giving a keycode, and should be ignored when recieving a keycode.
diff --git a/doc/man.txt b/doc/man.txt
deleted file mode 100644
index 37a2642..0000000
--- a/doc/man.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-manual format:
-
-dword: length of title (without sz)
-title (sz)
-dword: number of links
-dword: length of link table (in bytes)
-link table
- entry:
- dword: line
- byte: start column
- byte: text length
- dword: length of file pointed to (without sz)
- file pointed to (sz)
-dword: length of line pointer list (in dwords)
-line pointer list
- dword offsets into file
-
-lines
- 0x00 - 0x7f are characters
- 0x80 - 0xff are color codes | 0x80 \ No newline at end of file