Category:6502 Assembly: Difference between revisions

m
m (→‎Know Your Opcodes: clarification)
Line 263:
 
Like before, you are <b>required</b> to use X in this mode. If you don't want to offset, just have X equal zero. In fact, when x and y both equal zero, <code>($HH,x) = ($HH),y</code> for all 8-bit hexadecimal values $HH.
 
===Zero Page Indirect, No X or Y===
This one isn't available on the original 6502, only on its revision the 65c02. This behaves just like the two above, except it doesn't involve X or Y. Essentially this saves you the trouble of setting X or Y to zero temporarily just to do an indirect lookup without offsetting.
 
<lang 6502asm> LDA ($00) ;same as "LDA ($00),y" when y = 0</lang>
 
==Quirks and Tricks For Efficient Coding==
1,489

edits