WonderWitch/FreyaBIOS/System: Difference between revisions
From WSdev Wiki
Jump to navigationJump to search
(→Interrupts: start) |
(provide initial inormation on sys_suspend/resume) |
||
Line 1: | Line 1: | ||
The System interrupt provides assorted system-related functionality. | The System interrupt provides assorted system-related functionality. | ||
== Interrupts == | == Interrupts == | ||
Line 73: | Line 52: | ||
=== INT $17/AH=$0B - sys_suspend === | === INT $17/AH=$0B - sys_suspend === | ||
* AH = $0B | |||
* AL = Suspend slot (see below) | |||
* DS:BX = ? | |||
Return: | |||
* AX = ? | |||
TODO | |||
==== Suspend/resume structure ==== | |||
This structure is stored in SRAM block 3, offset <code>$7E00</code> (slot 1) and <code>$BF00</code> (slot 0). | |||
{| class="wikitable" | |||
|- | |||
! Offset !! Size !! Contents | |||
|- | |||
| $0000 || 16384 || Copy of RAM area <code>$0000</code> - <code>$3FFF</code> | |||
|- | |||
| $4000 || 2 || Stack segment? | |||
|- | |||
| $4002 || 2 || Data segment? | |||
|- | |||
| $4004 || 224 || Copy of IO ports <code>$00</code> - <code>$DF</code> | |||
|- | |||
| $40E4 || 6 || ? | |||
|} | |||
=== INT $17/AH=$0C - sys_resume === | === INT $17/AH=$0C - sys_resume === | ||
* AH = $0B | |||
* AL = Suspend slot (see below) | |||
TODO | |||
=== INT $17/AH=$0D - sys_set_remote === | === INT $17/AH=$0D - sys_set_remote === |
Revision as of 07:51, 15 December 2024
The System interrupt provides assorted system-related functionality.
Interrupts
INT $17/AH=$00 - sys_interrupt_set_hook
- AH = $00
- AL = Interrupt index
- DS:BX = Pointer to new vector (read from)
- DS:DX = Pointer to old vector (written to)
INT $17/AH=$01 - sys_interrupt_reset_hook
- AH = $01
- AL = Interrupt index
- DS:BX = Pointer to old vector (read from)
INT $17/AH=$02 - sys_wait
- AH = $02
- CX = Frames to wait
INT $17/AH=$03 - sys_get_tick_count
- AH = $03
Return:
- DX:AX = Number of frames since system start
INT $17/AH=$04 - sys_sleep
INT $17/AH=$05 - sys_set_sleep_time
INT $17/AH=$06 - sys_get_sleep_time
INT $17/AH=$07 - sys_set_awake_key
INT $17/AH=$08 - sys_get_awake_key
INT $17/AH=$09 - sys_set_keepalive_int
INT $17/AH=$0A - sys_get_ownerinfo
- AH = $0A
- DS:DX = Output buffer
- CX = Output buffer size, in bytes
Errata:
- The FreyaBIOS implementation only works correctly in the "mono" mode. An alternate implementation that supports "color" mode is provided as part of libwwc.
INT $17/AH=$0B - sys_suspend
- AH = $0B
- AL = Suspend slot (see below)
- DS:BX = ?
Return:
- AX = ?
TODO
Suspend/resume structure
This structure is stored in SRAM block 3, offset $7E00
(slot 1) and $BF00
(slot 0).
Offset | Size | Contents |
---|---|---|
$0000 | 16384 | Copy of RAM area $0000 - $3FFF
|
$4000 | 2 | Stack segment? |
$4002 | 2 | Data segment? |
$4004 | 224 | Copy of IO ports $00 - $DF
|
$40E4 | 6 | ? |
INT $17/AH=$0C - sys_resume
- AH = $0B
- AL = Suspend slot (see below)
TODO
INT $17/AH=$0D - sys_set_remote
INT $17/AH=$0E - sys_get_remote
INT $17/AH=$0F - sys_alloc_iram
INT $17/AH=$10 - sys_free_iram
INT $17/AH=$11 - sys_get_my_iram
INT $17/AH=$12 - sys_get_version
- AH = $12
Return:
- AX = BIOS version