3 ms·
I knew 6502 people would improve it :-) >moving it into the zero page and not using indexed mode I'm not sure I follow.. you mean restrict the memcpy to only
by jhallenworld 6y ago
I knew 6502 people would improve it :-)
>moving it into the zero page and not using indexed mode
I'm not sure I follow.. you mean restrict the memcpy to only within the zero-page?
>jmp inner..
Yeah, it doesn't matter to much, not in the inner loop. You could move the start of the code to right after the rts also..
- Someone 6y agoNo, moving the code into the zero page. See https://retrocomputing.stackexchange.com/a/92 https://retrocomputing.stackexchange.com/a/92 for what the Basic in the Commodore 64 does. Increasing an address is faster in the zero page, and self-modifying code is faster. That combines the two.
- jhallenworld 6y agoOh I see: inc $c9 5 cycles 00c8: lda $xxxx 4 cycles vs. lda $xxxx,x 4 inx 2 Mine is still faster...
- Someone 6y agoLuckily, I said my 6502 is rusty :-). You can win a cycle increasing the high byte of pointers, but that probably isn’t worth the zero page memory in most cases.