base:use_shy_as_sty_abs_x
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
base:use_shy_as_sty_abs_x [2017-11-16 01:26] – cruzer | base:use_shy_as_sty_abs_x [2017-11-16 01:38] (current) – cruzer | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Using SHY as sta abs,y ====== | + | ====== Using shx/ |
- | The 6510 doesn' | + | The 6510 doesn' |
< | < | ||
- | tay | + | //store X indexed by Y: |
+ | txa | ||
+ | sta address,y | ||
+ | |||
+ | //store Y indexed by X: | ||
+ | tya | ||
sta address,x | sta address,x | ||
</ | </ | ||
- | Which takes 7 cycles. But instead you can do this, which only takes 5: | + | Which each take 7 cycles. But instead you can do this, which only takes 5: |
< | < | ||
+ | //store X indexed by Y: | ||
+ | shx address,y | ||
+ | |||
+ | //store Y indexed by X: | ||
shy address,x | shy address,x | ||
</ | </ | ||
- | However, there' | + | However, there' |
+ | |||
+ | The opcodes are classified as unstable, but this only affects the and' | ||
base/use_shy_as_sty_abs_x.txt · Last modified: 2017-11-16 01:38 by cruzer