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_read_vm.z80 | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'src/ubox/ubox_read_vm.z80') diff --git a/src/ubox/ubox_read_vm.z80 b/src/ubox/ubox_read_vm.z80 index 7ef0f41..78df980 100644 --- a/src/ubox/ubox_read_vm.z80 +++ b/src/ubox/ubox_read_vm.z80 @@ -3,21 +3,23 @@ LDIRMV = 0x0059 _ubox_read_vm:: + ex de, hl + ; dst -> de + ; len -> hl + ld c, l + ld b, h + ; len -> bc + ld hl, #2 add hl, sp - - ld e, (hl) - inc hl - ld d, (hl) - inc hl - ld c, (hl) - inc hl - ld b, (hl) - inc hl ld a, (hl) inc hl ld h, (hl) ld l, a + ; src -> hl - jp LDIRMV + call LDIRMV + pop hl + pop bc + jp (hl) -- cgit v1.2.3