We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
X Index Register: Difference between revisions
From SnesLab
(shorten description) |
(one fewer sentence) |
||
Line 5: | Line 5: | ||
On the [[65c816]], it may be 8 or 16 bits wide. Indexing may cross bank boundaries.<sup>[1]</sup> | On the [[65c816]], it may be 8 or 16 bits wide. Indexing may cross bank boundaries.<sup>[1]</sup> | ||
Unlike the [[Y index register]], the value of the [[stack pointer]] can be transferred to/from | Unlike the [[Y index register]], the value of the [[stack pointer]] can be transferred to/from with [[TXS]] and [[TSX]]. | ||
=== See Also === | === See Also === |
Revision as of 10:39, 1 August 2024
The X Index Register on 65x processors often holds the current index when iterating over things. It can be incremented or decremented by one with INX or DEX, but there is no instruction to add or subtract more than one.
On the S-SMP it is always 8 bits wide. It is the divisor for division commands.[2]
On the 65c816, it may be 8 or 16 bits wide. Indexing may cross bank boundaries.[1]
Unlike the Y index register, the value of the stack pointer can be transferred to/from with TXS and TSX.
See Also
References
- https://wilsonminesco.com/816myths
- 8.1.2 of page 3-8-4 of Book I of the official Super Nintendo development manual