git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

commit 766b0415d246c8ac932731166f26f7eeca49a2b7
parent 1132a2f21d49c758d17327cce5793ff05c6c314a
Author: Toxa <untoxa@mail.ru>
Date:   Fri, 24 May 2024 01:27:47 +0300

Z80 library: return correct result from memcpy()

Diffstat:
Mgbdk-lib/libc/asm/z80/memcpy.s12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/gbdk-lib/libc/asm/z80/memcpy.s b/gbdk-lib/libc/asm/z80/memcpy.s @@ -14,11 +14,12 @@ ___memcpy: push af ld a, b or c - ret z - ld a, c - and #7 + ret z + push de + ld a, c + and #15 add a - sub #16 + sub #32 neg ld iy, #1$ add iyl @@ -29,8 +30,9 @@ ___memcpy: xor a jp (iy) 1$: - .rept 8 + .rept 16 ldi .endm jp pe, 1$ + pop de ret

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.