aboutsummaryrefslogtreecommitdiff
path: root/src/ubox/ubox_set_sprite_pat16.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_sprite_pat16.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_sprite_pat16.z80')
-rw-r--r--src/ubox/ubox_set_sprite_pat16.z8021
1 files changed, 8 insertions, 13 deletions
diff --git a/src/ubox/ubox_set_sprite_pat16.z80 b/src/ubox/ubox_set_sprite_pat16.z80
index 59d7ccb..ee0f3c4 100644
--- a/src/ubox/ubox_set_sprite_pat16.z80
+++ b/src/ubox/ubox_set_sprite_pat16.z80
@@ -4,14 +4,11 @@
SP_PATTERNS = 0x3800
_ubox_set_sprite_pat16::
+ ld e, l
+ ld d, h
+
ld hl, #2
add hl, sp
-
- ld e, (hl)
- inc hl
- ld d, (hl)
- inc hl
-
ld l, (hl)
ld h, #0
add hl, hl
@@ -23,12 +20,10 @@ _ubox_set_sprite_pat16::
add hl, bc
push de
- ld bc, #32
- push bc
- push hl
+ ld de, #32
+ ; hl: dst, de: len, stack: src
call _ubox_write_vm
- pop af
- pop af
- pop af
- ret
+ pop hl
+ inc sp
+ jp (hl)