made lua debugger stop crying and added more docs
This commit is contained in:
14
docs/kernel/Syscalls/README.md
Normal file
14
docs/kernel/Syscalls/README.md
Normal file
@@ -0,0 +1,14 @@
|
||||
# Syscalls
|
||||
---
|
||||
|
||||
Syscalls allow for tasks to request somthing only the kernel can do (ex: reading a file).
|
||||
|
||||
Syscalls can be called in 2 ways, ```syscall.{id / name}(args...)``` or ```coroutine.yeild("syscall", {name / id}, args...)```.
|
||||
|
||||
Syscalls are also implemented as functions in
|
||||
```
|
||||
sleep(ms)
|
||||
print(...)
|
||||
printInline(...)
|
||||
printf(fmt, ...)
|
||||
```
|
||||
@@ -21,4 +21,9 @@ maxFilesPerTask<num>
|
||||
preempt<bool>
|
||||
enable/disable preemptive multitasking
|
||||
|
||||
debugSyscalls<bool>
|
||||
logs syscalls and thier return values aswell as what task executed them
|
||||
|
||||
logTaskExit<bool>
|
||||
logs task exits and errors
|
||||
```
|
||||
@@ -1,26 +0,0 @@
|
||||
# Drivers
|
||||
---
|
||||
|
||||
Hyperion OS supports many driver types to allow it to run on any hardware
|
||||
```
|
||||
Driver types
|
||||
tty - Supports basic teletype devices
|
||||
gpio - Supports things like redstone
|
||||
runner - Kernel level programs (no api)
|
||||
timer - Timers and time related
|
||||
periph - Basic peripheral info
|
||||
gfx - PixelScreens
|
||||
modem - networking
|
||||
```
|
||||
Hyperion also has a base driver api
|
||||
```
|
||||
Driver API
|
||||
name - Name of driver
|
||||
type - Type of driver
|
||||
load - loading code
|
||||
unload - unloading code
|
||||
main - Ran as a process and has normal behavior (used for checking network like things)
|
||||
arch - architecture difined in bootloader (EX: cct, oc, ac, cc, ccpc, or all)
|
||||
description - discription
|
||||
author - author of driver
|
||||
```
|
||||
@@ -1,37 +0,0 @@
|
||||
# tty driver
|
||||
---
|
||||
|
||||
tty (Teletypewriter) is a driver class made for basic text output (ASCII only) used for primitive ui.
|
||||
|
||||
```
|
||||
API Signature
|
||||
String: address
|
||||
Address unique to the screen
|
||||
|
||||
print(String: text):Nil
|
||||
Prints text to the screen with a following \n
|
||||
|
||||
printInline(String: text):Nil
|
||||
Prints text to the screen without following \n
|
||||
|
||||
clear():Nil
|
||||
Clears screen sets x,y of cursor to 0,0
|
||||
|
||||
setBackgroundColor(Number: index):Nil
|
||||
Sets background color to index of pallete
|
||||
|
||||
getBackgroundColor():Number
|
||||
Returns current background index of screen
|
||||
|
||||
setForegroundColor(Number: index):Nil
|
||||
Sets foreground color to index of pallete
|
||||
|
||||
getForegroundColor():Number
|
||||
Returns current foreground index of screen
|
||||
|
||||
setCursorPos(Number: x, Number: y):Nil
|
||||
Sets x,y position of cursor
|
||||
|
||||
getCursorPos():Number, Number
|
||||
Gets x,y position of cursor
|
||||
```
|
||||
@@ -1,37 +0,0 @@
|
||||
|
||||
01 SIGHUP Terminate Hang up controlling terminal or Yes
|
||||
process
|
||||
02 SIGINT Terminate Interrupt from keyboard, Control-C Yes
|
||||
03 SIGQUIT Dump Quit from keyboard, Control-\ Yes
|
||||
04 SIGILL Dump Illegal instruction Yes
|
||||
05 SIGTRAP Dump Breakpoint for debugging No
|
||||
06 SIGABRT Dump Abnormal termination Yes
|
||||
06 SIGIOT Dump Equivalent to SIGABRT No
|
||||
07 SIGBUS Dump Bus error No
|
||||
08 SIGFPE Dump Floating-point exception Yes
|
||||
09 SIGKILL Terminate Forced-process termination Yes
|
||||
10 SIGUSR1 Terminate Available to processes Yes
|
||||
11 SIGSEGV Dump Invalid memory reference Yes
|
||||
12 SIGUSR2 Terminate Available to processes Yes
|
||||
13 SIGPIPE Terminate Write to pipe with no readers Yes
|
||||
14 SIGALRM Terminate Real-timer clock Yes
|
||||
15 SIGTERM Terminate Process termination Yes
|
||||
16 SIGSTKFLT Terminate Coprocessor stack error No
|
||||
17 SIGCHLD Ignore Child process stopped or terminated Yes
|
||||
or got a signal if traced
|
||||
18 SIGCONT Continue Resume execution, if stopped Yes
|
||||
19 SIGSTOP Stop Stop process execution, Ctrl-Z Yes
|
||||
20 SIGTSTP Stop Stop process issued from tty Yes
|
||||
21 SIGTTIN Stop Background process requires input Yes
|
||||
22 SIGTTOU Stop Background process requires output Yes
|
||||
23 SIGURG Ignore Urgent condition on socket No
|
||||
24 SIGXCPU Dump CPU time limit exceeded No
|
||||
25 SIGXFSZ Dump File size limit exceeded No
|
||||
26 SIGVTALRM Terminate Virtual timer clock No
|
||||
27 SIGPROF Terminate Profile timer clock No
|
||||
28 SIGWINCH Ignore Window resizing No
|
||||
29 SIGIO Terminate I/O now possible No
|
||||
29 SIGPOLL Terminate Equivalent to SIGIO No
|
||||
30 SIGPWR Terminate Power supply failure No
|
||||
31 SIGSYS Dump Bad system call No
|
||||
32 SIGUNUSED Dump Equivalent to SIGSYS No
|
||||
Reference in New Issue
Block a user