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 Addressing: Difference between revisions
From SnesLab
(length in bytes) |
(→References: hid archive URL for E&L) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
They are all two bytes long. | They are all two bytes long. | ||
The effective addresses generated by stack relative addressing will always be in [[bank]] 0.<sup>[3]</sup> | The effective addresses generated by stack relative addressing will always be in [[bank]] 0.<sup>[3]</sup> The effective address is the sum of the [[stack pointer]] and the 8-bit operand byte. | ||
==== Syntax ==== | ==== Syntax ==== | ||
Line 17: | Line 17: | ||
LDA sr, S | LDA sr, S | ||
</pre> | </pre> | ||
There is no long version of this addressing mode. | |||
=== See Also === | === See Also === | ||
Line 23: | Line 25: | ||
=== References === | === References === | ||
# [[Eyes & Lichty]] | # [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/418 page 418] | ||
# section 3.5.23 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf | # section 3.5.23 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf | ||
# lbid, section 3.2 | # lbid, section 3.2 |
Latest revision as of 17:39, 8 August 2024
Stack Relative Addressing is supported by eight instructions:
- ADC (opcode 63)
- AND (opcode 23)
- CMP (opcode C3)
- EOR (opcode 43)
- LDA (opcode A3)
- ORA (opcode 03)
- SBC (opcode E3)
- STA (opcode 83)
They are all two bytes long. The effective addresses generated by stack relative addressing will always be in bank 0.[3] The effective address is the sum of the stack pointer and the 8-bit operand byte.
Syntax
LDA sr, S
There is no long version of this addressing mode.
See Also
References
- Eyes & Lichty, page 418
- section 3.5.23 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf
- lbid, section 3.2
- Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#5.20