User Tools

Site Tools


base:swapping_zp_data
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


base:swapping_zp_data [2015-04-17 04:34] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +====== Swapping ZeroPage data ======
  
 +On some occasions you might want to save and restore ZP data. I.e. you have no time to patch a SID player, or the speedup you gain by giving several routines full ZP access is worth it. The small snippet below swaps 10 bytes from $00 on with memory in $10. It clutters X,Y and A though. Enjoy, enthusi.
 +
 +<code>
 +   ldx #10 
 +loop 
 +   ldy $00,x 
 +   lda $10,x 
 +   sta $00,x 
 +   sty $10,x 
 +   dex 
 +   bpl loop
 +</code>
base/swapping_zp_data.txt · Last modified: 2015-04-17 04:34 by 127.0.0.1