We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
Indirect Addressing: Difference between revisions
From SnesLab
(clarify which MOV variants) |
(clarify description) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Indirect Addressing''' is | '''Indirect Addressing''' is used by some one-byte [[SPC700]] instructions. Usually, the [[accumulator]] appears as the first operand in the assembler source, with the other operand being the [[X index register]], which is interpreted as a pointer. These eight opcodes use indirect addressing: | ||
* [[MOV]] (opcodes E6 and C6) | |||
* [[AND]] (opcode 26) | |||
* [[OR]] (opcode 06) | |||
* [[EOR]] (opcode 46) | |||
* [[ADC]] (opcode 86) | |||
* [[SBC]] (opcode A6) | |||
* [[CMP]] (opcode 66) | |||
In the above list, MOV is the only mnemonic that can take the accumulator as the second operand. | |||
Some of the above mnemonics have an opcode where both operands utilize indirect addressing, in which case the whole instruction is considered to use [[Indirect Page to I.P. Addressing]]. | |||
==== Symbol ==== | ==== Symbol ==== | ||
Line 15: | Line 27: | ||
=== References === | === References === | ||
* Figure 3-8-3 on [https://archive.org/details/SNESDevManual/book1/page/n187 page 3-8-9 of Book I] of the official Super Nintendo development manual | * Figure 3-8-3 Memory Access Addressing Effective Address on [https://archive.org/details/SNESDevManual/book1/page/n187 page 3-8-9 of Book I] of the official Super Nintendo development manual | ||
* [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/37 page 37] | * [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/37 page 37] | ||
Latest revision as of 05:43, 5 January 2025
Indirect Addressing is used by some one-byte SPC700 instructions. Usually, the accumulator appears as the first operand in the assembler source, with the other operand being the X index register, which is interpreted as a pointer. These eight opcodes use indirect addressing:
- MOV (opcodes E6 and C6)
- AND (opcode 26)
- OR (opcode 06)
- EOR (opcode 46)
- ADC (opcode 86)
- SBC (opcode A6)
- CMP (opcode 66)
In the above list, MOV is the only mnemonic that can take the accumulator as the second operand.
Some of the above mnemonics have an opcode where both operands utilize indirect addressing, in which case the whole instruction is considered to use Indirect Page to I.P. Addressing.
Symbol
(X)
See Also
- Absolute Indirect Addressing
- Absolute Indirect Long Addressing
- Direct Page Indirect Addressing
- Direct Page Indirect Indexed, Y Addressing
- Direct Page Indirect Long Addressing
- Direct Page Indirect Long Indexed, Y Addressing
References
- Figure 3-8-3 Memory Access Addressing Effective Address on page 3-8-9 of Book I of the official Super Nintendo development manual
- Eyes & Lichty, page 37