aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_set_colors.z80
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2024-05-27 23:24:19 +0100
committerJuan J. Martinez <jjm@usebox.net>2024-05-27 23:24:19 +0100
commit703ab56587aac0d79ccc0f72f2b8d9ee235e20a5 (patch)
tree32b186dc14c56fe19c004a403eeaaf7e2dd0b10f /src/ubox/ubox_set_colors.z80
parent420ac2c8f2307ddcbe551972544bbe11f05ee7ff (diff)
downloadubox-msx-lib-703ab56587aac0d79ccc0f72f2b8d9ee235e20a5.tar.gz
ubox-msx-lib-703ab56587aac0d79ccc0f72f2b8d9ee235e20a5.zip
Use SDCC's new calling convention
(this is an ABI breaking change, and will require changes to user-written asm functions or their declarations)
Diffstat (limited to 'src/ubox/ubox_set_colors.z80')
-rw-r--r--src/ubox/ubox_set_colors.z8016
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ubox/ubox_set_colors.z80 b/src/ubox/ubox_set_colors.z80
index 74a5b7f..4b89c99 100644
--- a/src/ubox/ubox_set_colors.z80
+++ b/src/ubox/ubox_set_colors.z80
@@ -6,17 +6,17 @@ BAKCLR = 0xf3ea
BDRCLR = 0xf3eb
_ubox_set_colors::
- ld hl, #2
- add hl, sp
-
- ld a, (hl)
- inc hl
ld (FORCLR), a
- ld a, (hl)
- inc hl
+ ld a, l
ld (BAKCLR), a
+
+ ld hl, #2
+ add hl, sp
ld a, (hl)
ld (BDRCLR), a
+
call CHGCLR
- ret
+ pop hl
+ inc sp
+ jp (hl)