View Single Post
Old 29 October 2014, 01:14   #3
Kalms
Registered User
 
Join Date: Nov 2006
Location: Stockholm, Sweden
Posts: 237
a6 is intended to point to $dff002 (DMACONR).

The code in question wants to read from $dff00a (JOY0DAT) which contains the current mouse cursor position.


... and setting a6 to $dff002 instead of $dff000 is a micro-optimization: there are probably a couple of places in your program where you want to access $dff002 but none where you want to access $dff000. Therefore your program will become a couple of bytes smaller by using $dff002 as your base pointer... although, as you already noticed, the sourcecode becomes a tad more confusing. Whether or not it's worth it is up to you.
Kalms is offline  
 
Page generated in 0.04365 seconds with 11 queries