Syscall ABI
User code calls the kernel with ecall.
a7 = syscall numbera0 = arg0a1 = arg1a2 = arg2| Number | Name | Arguments | Return |
|---|---|---|---|
| 1 | SYS_EXIT | none | does not return |
| 2 | SYS_SLEEP | a0 = milliseconds | returns after sleep |
| 3 | SYS_YIELD | none | returns when scheduled again |
| 10 | SYS_EP_CREATE | none | a0 = endpoint ID |
| 11 | SYS_EP_SEND | a0 = endpoint, a1/a2 = message | a0 = 0 after delivery |
| 12 | SYS_EP_RECV | a0 = endpoint | a0/a1 = message |
| 100 | SYS_PUTCHAR | a0 = byte | none |
The capability chapter changes endpoint arguments from raw endpoint IDs to capability slots.