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

Stack Relative Indirect Indexed, Y Addressing: Difference between revisions

From SnesLab
Jump to: navigation, search
(added LDA, ORA)
(→‎References: hid archive URL for E&L)
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
Supported by:
'''Stack Relative Indirect Indexed, Y Addressing''' is supported by eight instructions:


* [[ADC]]
* [[ADC]] (opcode 73)
* [[AND]]
* [[AND]] (opcode 33)
* [[CMP]]
* [[CMP]] (opcode D3)
* [[EOR]]
* [[EOR]] (opcode 53)
* [[LDA]]
* [[LDA]] (opcode B3)
* [[ORA]]
* [[ORA]] (opcode 13)
* [[SBC]] (opcode F3)
* [[STA]] (opcode 93)


=== Reference ===
They are all two bytes long.
* [[Eyes & Lichty]] page 419, https://archive.org/details/0893037893ProgrammingThe65816/page/n445


The '''indirect address''' lives on the [[stack]] at sum of the [[stack pointer]] and the 8-bit operand.
The '''effective address''' is generated by concatenating the [[data bank register]] to the indirect address, and then adding the [[Y index register]] to the 24-bit sum.
==== Syntax ====
<pre>
LDA (sr, S), Y
</pre>
=== See Also ===
* [[Stack Addressing]]
* [[Stack Relative Addressing]]
=== References ===
* [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/419 page 419]
* section 3.5.24 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf
* Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#5.21
[[Category:ASM]]
[[Category:Addressing Modes]]
[[Category:Addressing Modes]]
[[Category:Complex Admodes]]
[[Category:65c816 additions]]

Latest revision as of 18:27, 8 August 2024

Stack Relative Indirect Indexed, Y Addressing is supported by eight instructions:

  • ADC (opcode 73)
  • AND (opcode 33)
  • CMP (opcode D3)
  • EOR (opcode 53)
  • LDA (opcode B3)
  • ORA (opcode 13)
  • SBC (opcode F3)
  • STA (opcode 93)

They are all two bytes long.

The indirect address lives on the stack at sum of the stack pointer and the 8-bit operand.

The effective address is generated by concatenating the data bank register to the indirect address, and then adding the Y index register to the 24-bit sum.

Syntax

LDA (sr, S), Y

See Also

References