-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2c64cab
commit 630537d
Showing
2 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
assume adl=1 | ||
|
||
section .text | ||
public _memcpy | ||
|
||
if PREFER_OS_LIBC | ||
|
||
_memcpy := $0000A4 | ||
|
||
else | ||
|
||
_memcpy: | ||
ld iy,0 | ||
add iy,sp | ||
ld bc,(iy + 6) | ||
sbc hl,hl | ||
sbc hl,bc | ||
jr z,.zero | ||
ld de,(iy + 0) | ||
ld hl,(iy + 3) | ||
ldir | ||
.zero: | ||
ld hl,(iy + 0) | ||
ret | ||
|
||
end if | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters