fix: undefined sys.memcopy when initializing array on cx16

This commit is contained in:
Irmen de Jong 2022-02-08 20:01:33 +01:00
parent 1635612430
commit 72dfb0bda3
3 changed files with 5 additions and 2 deletions

View File

@ -555,6 +555,7 @@ sys {
}
asmsub memcopy(uword source @R0, uword target @R1, uword count @AY) clobbers(A,X,Y) {
; note: can't be inlined because is called from asm as well
%asm {{
ldx cx16.r0
stx P8ZP_SCRATCH_W1 ; source in ZP

View File

@ -520,6 +520,7 @@ sys {
}
asmsub memcopy(uword source @R0, uword target @R1, uword count @AY) clobbers(A,X,Y) {
; note: can't be inlined because is called from asm as well
%asm {{
ldx cx16.r0
stx P8ZP_SCRATCH_W1 ; source in ZP

View File

@ -821,11 +821,12 @@ sys {
}}
}
inline asmsub memcopy(uword source @R0, uword target @R1, uword count @AY) clobbers(A,X,Y) {
asmsub memcopy(uword source @R0, uword target @R1, uword count @AY) clobbers(A,X,Y) {
; note: can't be inlined because is called from asm as well
%asm {{
sta cx16.r2
sty cx16.r2+1
jsr cx16.memory_copy
jmp cx16.memory_copy
}}
}