Skip to content

Commit

Permalink
Add an API version
Browse files Browse the repository at this point in the history
  • Loading branch information
ry755 committed Mar 7, 2023
1 parent 14bc2af commit 0013a9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions fox32rom.def
Expand Up @@ -14,6 +14,7 @@ shift_pressed: jmp [0xF0040024]
shift_released: jmp [0xF0040028]
caps_pressed: jmp [0xF004002C]
poweroff: jmp [0xF0040030]
get_rom_api_version: jmp [0xF0040034]

; generic drawing jump table
draw_str_generic: jmp [0xF0041000]
Expand Down
7 changes: 7 additions & 0 deletions main.asm
Expand Up @@ -6,6 +6,8 @@ const FOX32ROM_VERSION_MAJOR: 0
const FOX32ROM_VERSION_MINOR: 7
const FOX32ROM_VERSION_PATCH: 0

const FOX32ROM_API_VERSION: 1

const SYSTEM_STACK: 0x01FFF800
const BACKGROUND_COLOR: 0xFF674764
const TEXT_COLOR: 0xFFFFFFFF
Expand Down Expand Up @@ -172,6 +174,10 @@ get_rom_version:
mov r2, FOX32ROM_VERSION_PATCH
ret

get_rom_api_version:
mov r0, FOX32ROM_API_VERSION
ret

poweroff:
mov r0, 0x80010000
mov r1, 0
Expand Down Expand Up @@ -227,6 +233,7 @@ poweroff_wait:
data.32 shift_released
data.32 caps_pressed
data.32 poweroff
data.32 get_rom_api_version

; generic drawing jump table
org.pad 0xF0041000
Expand Down

0 comments on commit 0013a9d

Please sign in to comment.