From 703ab56587aac0d79ccc0f72f2b8d9ee235e20a5 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Mon, 27 May 2024 23:24:19 +0100 Subject: Use SDCC's new calling convention (this is an ABI breaking change, and will require changes to user-written asm functions or their declarations) --- src/ubox/ubox_set_sprite_pat8.z80 | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'src/ubox/ubox_set_sprite_pat8.z80') diff --git a/src/ubox/ubox_set_sprite_pat8.z80 b/src/ubox/ubox_set_sprite_pat8.z80 index 06b484c..c48588e 100644 --- a/src/ubox/ubox_set_sprite_pat8.z80 +++ b/src/ubox/ubox_set_sprite_pat8.z80 @@ -4,14 +4,11 @@ SP_PATTERNS = 0x3800 _ubox_set_sprite_pat8:: + 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 @@ -21,12 +18,10 @@ _ubox_set_sprite_pat8:: add hl, bc push de - ld bc, #8 - push bc - push hl + ld de, #8 + ; hl: dst, de: len, stack: src call _ubox_write_vm - pop af - pop af - pop af - ret + pop hl + inc sp + jp (hl) -- cgit v1.2.3