System Services |
Function Number | Function |
0x90 | Allocate port |
0x91 | Allocate list of ports |
0x94 | Read from IO port |
0x95 | Read string from IO port |
0x98 | De-allocate port |
0x99 | De-allocate list of ports |
0x9C | Write to IO port |
0x9D | Write string to IO port |
0xA0 | Allocate IRQ |
0xA1 | Allocate priority IRQ |
0xA4 | End of IRQ |
0xA7 | Allocate CPU interrupt |
0xA8 | De-allocate IRQ |
0xAF | De-allocate CPU interrupt |
0xEF | Hook CPU interrupts |
0xF0 | Self Test |
0xF1 | Idle |
0xFE | Shutdown module |
This service allocates a single IO port.
Input
BX Port number
CX Code ID of owner
Output
AL status
This service allocates multiple IO ports, taken from a 0 terminated list of word sized port numbers. If an error is encountered no ports will be allocated.
Input
EBX Address of list
CX Code ID of owner
Output
AL status
This reads an IO port.
Input
BL Read size
0 = byte
1 = word
2 = dword
CX Code ID of owner
DX IO Port number
Output
EBX Returned value
AL status
This reads an IO port multiple times. Data read is stored in a buffer.
Input
BL Read size
0 = byte
1 = word
2 = dword
CX Code ID of owner
DX IO Port number
ESI Number of reads
EDI Address of buffer
Output
EBX Number of bytes read
AL status
This service allocates a single IO port.
Input
BX Port number
CX Code ID of owner
Output
AL status
0x99 De-allocate
list of ports
This service allocates multiple IO ports, taken from a 0 terminated list of word sized port numbers. If an error occurs as many ports will be de-allocated as possible.
Input
EBX Address of list
CX Code ID of owner
Output
AL status
This writes to an IO port.
Input
BL Write size
0 = byte
1 = word
2 = dword
CX Code ID of owner
DX IO Port number
ESI Value to write
Output
AL status
This sends a buffer out to an IO port.
Input
BL Write size
0 = byte
1 = word
2 = dword
CX Code ID of owner
DX IO Port number
ESI Number of writes
EDI Address of buffer
Output
EBX Number of bytes written
AL status
This service allocates and enables an IRQ (using the PIC) and creates a trap gate for it. Trap gates don't automatically disable interrupts.
Input
BL IRQ number
CX Code ID of owner
EDX Offset of interrupt handler
Output
AL status
This service allocates and enables an IRQ (using the PIC) and creates an interrupt gate for it. Interrupt gates automatically disable interrupts.
Input
BL IRQ number
CX Code ID of owner
EDX Offset of interrupt handler
Output
AL status
This service should only be called IRQ interrupt handlers before ending the interrupt (with IRETD).
Input
BL IRQ number
Output
AL status
The service can be used by system modules and drivers only. When one or more CPU interrupts are allocated to some code that code will be called by system services when/if that interrupt occurs. See debugging for details.
Input
BL Interrupt number
CX Code ID of owner
EDX Offset of handler
Output
AL status
This service de-allocates and disables an IRQ (using the PIC) and deletes the interrupt descriptor for it.
Input
BL IRQ number
CX Code ID of owner
Output
AL status
0xAF De-allocate
CPU interrupt
This service de-allocates interrupts allocated with system service 0xA7.
Input
BL Interrupt number
CX Code ID of owner
Output
AL status
This should only ever be called by time services during boot. See debugging for details.
Input
none
Output
AL status
This service test the system services data structures.
Input
none
Output
EBX address of error string (unless no
error)
AL status
This is used to give the system services idle time. It's normally only ever used by time services.
Input
none
Output
AL status (0 means ok, no error
string)
0xFE Shutdown module
This de-allocates all resources used. Interrupts must be disabled before removing the system services, and they should not be enabled again until another system services has taken it's place. The code selector returned by this service should be de-allocated by the caller.
Input
none
Output
bx Code Selector
Home Index |