Skip to content

Commit f92e4d0

Browse files
committed
fix non-OS memcpy
1 parent 78dd1dd commit f92e4d0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libc/memcpy.src

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ else
1212
_memcpy:
1313
ld iy,0
1414
add iy,sp
15-
ld bc,(iy + 6)
15+
ld bc,(iy + 9) ; Load count
1616
sbc hl,hl
1717
sbc hl,bc
1818
jr z,.zero
19-
ld de,(iy + 0)
20-
ld hl,(iy + 3)
19+
ld de,(iy + 3) ; Load destination
20+
ld hl,(iy + 6) ; Load source
2121
ldir
2222
.zero:
23-
ld hl,(iy + 0)
23+
ld hl,(iy + 3) ; Return the destination pointer
2424
ret
2525

2626
end if

0 commit comments

Comments
 (0)