Add new ROM function: poweroff

This commit is contained in:
jn 2023-01-30 00:57:13 +01:00
parent c67c96bf3a
commit e5b5f787a0
2 changed files with 9 additions and 0 deletions

View File

@ -13,6 +13,7 @@ scancode_to_ascii: jmp [0xF0040020]
shift_pressed: jmp [0xF0040024] shift_pressed: jmp [0xF0040024]
shift_released: jmp [0xF0040028] shift_released: jmp [0xF0040028]
caps_pressed: jmp [0xF004002C] caps_pressed: jmp [0xF004002C]
poweroff: jmp [0xF0040030]
; generic drawing jump table ; generic drawing jump table
draw_str_generic: jmp [0xF0041000] draw_str_generic: jmp [0xF0041000]

View File

@ -169,6 +169,13 @@ get_rom_version:
mov r2, FOX32ROM_VERSION_PATCH mov r2, FOX32ROM_VERSION_PATCH
ret ret
poweroff:
mov r0, 0x80010000
mov r1, 0
out r0, r1
poweroff_wait:
jmp poweroff_wait
; code ; code
#include "audio.asm" #include "audio.asm"
#include "background.asm" #include "background.asm"
@ -216,6 +223,7 @@ get_rom_version:
data.32 shift_pressed data.32 shift_pressed
data.32 shift_released data.32 shift_released
data.32 caps_pressed data.32 caps_pressed
data.32 poweroff
; generic drawing jump table ; generic drawing jump table
org.pad 0xF0041000 org.pad 0xF0041000