mirror of
https://github.com/irmen/prog8.git
synced 2024-12-25 08:29:25 +00:00
fix: undefined sys.memcopy when initializing array on cx16
This commit is contained in:
parent
1635612430
commit
72dfb0bda3
@ -555,6 +555,7 @@ sys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 {{
|
%asm {{
|
||||||
ldx cx16.r0
|
ldx cx16.r0
|
||||||
stx P8ZP_SCRATCH_W1 ; source in ZP
|
stx P8ZP_SCRATCH_W1 ; source in ZP
|
||||||
|
@ -520,6 +520,7 @@ sys {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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 {{
|
%asm {{
|
||||||
ldx cx16.r0
|
ldx cx16.r0
|
||||||
stx P8ZP_SCRATCH_W1 ; source in ZP
|
stx P8ZP_SCRATCH_W1 ; source in ZP
|
||||||
|
@ -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 {{
|
%asm {{
|
||||||
sta cx16.r2
|
sta cx16.r2
|
||||||
sty cx16.r2+1
|
sty cx16.r2+1
|
||||||
jsr cx16.memory_copy
|
jmp cx16.memory_copy
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user