Memory Copy Code optimization. Help needed!
Posted: Fri Dec 29, 2023 8:59 am
Hello,
for a sub routine i have this code snippet.
And for some other reasons i have this one:
The VarP contains the Low and Highbyte of a Memory location.
But how can i optimazed it to the first routine?
Is this possible?
Best regards
Sven
for a sub routine i have this code snippet.
Code: Select all
LDY #$1F
LDA #$00
Loop:
STA $1A00,Y
STA $1A20,Y
STA $1A40,Y
DEY
BPL Loop
Code: Select all
LDY #$5F
;LDY #$1F
Loop:
LDA $1A00,Y
STA (VarP),Y
;LDA $1A20,Y
;STA (VarP+$20),Y
;LDA $1A40,Y
;STA (VarP+$40),Y
DEY
BPL Loop
But how can i optimazed it to the first routine?
Is this possible?
Best regards
Sven