We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Y Index Register

From SnesLab
Revision as of 15:20, 16 August 2024 by Xetheria (talk | contribs) (8 bit emulation mode)
Jump to: navigation, search

The Y Index Register on 65x processors often holds the current index when iterating over things. It can be incremented or decremented by one with INY or DEY, but there is no instruction to add or subtract more than one. Although INY and DEY can affect the negative flag, the indexed addressing modes always interpret the bit pattern in the Y index register as a non-negative integer.

On the S-SMP it is always 8 bits wide. On the 65c816, it may be 8 or 16 bits wide. In emulation mode it is always 8 bits wide.

Unlike the X index register, there are no instructions to transfer value of the stack pointer to/from Y.

It is not specified to have any particular value after reset.

See Also

Reference