Swarm Kernel Interface

Contents:

Accessing the kernel
Services for applications
Memory services
Scheduler services
Messaging services
System services
Services for system code
Memory services
Scheduler services
Messaging services
System services

 Accessing the kernel

The kernel is accessed via a range of software interrupts. Each interrupt provides a group of related functions called a service. Services are split into 2 interfaces, the first for applications and the second for system code (device drivers, etc).
 
 
Interrupt Use
   Services for applications
 0x40     Memory services
 0x41     Time services
 0x42     Messaging services
 0x43     System services
 0x6F     Query services
   Services for system code
 0x60     Memory services 
 0x61     Time services
 0x62     Messaging services
 0x63     System services
 0x7F     Query services
 

Parameters are passed to the kernel in registers, EAX always holds the function number. AL is used to return an error code (if AL = 0 then no error). A list of standard error code can be found in the source code here.