We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
Absolute Addressing: Difference between revisions
From SnesLab
(opcode 6D) |
(linkify bank) |
||
(47 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Twenty six instructions support absolute addressing | '''Absolute addressing''' wraps within [[bank]] 0.<sup>[4]</sup> The effective addresses generated are 16-bit. | ||
==== Syntax ==== | |||
<pre> | |||
LDA addr | |||
</pre> | |||
Twenty six instructions support '''absolute addressing''': | |||
* [[ADC]] (opcode 6D) | * [[ADC]] (opcode 6D) | ||
* [[AND]] | * [[AND]] (opcode 2D) | ||
* [[ASL]] | * [[ASL]] (opcode 0E) | ||
* [[BIT]] | * [[BIT]] (opcode 2C) | ||
* [[CMP]] | * [[CMP]] (opcode CD) | ||
* [[CPX]] | * [[CPX]] (opcode EC) | ||
* [[CPY]] | * [[CPY]] (opcode CC) | ||
* [[DEC]] | * [[DEC]] (opcode CE) | ||
* [[EOR]] | * [[EOR]] (opcode 4D) | ||
* [[INC]] | * [[INC]] (opcode EE) | ||
* [[LDA]] | * [[LDA]] (opcode AD) | ||
* [[LDX]] | * [[LDX]] (opcode AE) | ||
* [[LDY]] | * [[LDY]] (opcode AC) | ||
* [[STA]] | * [[LSR]] (opcode 4E) | ||
* [[STX]] | * [[ORA]] (opcode 0D) | ||
* [[STY]] | * [[ROL]] (opcode 2E) | ||
* [[STZ]] | * [[ROR]] (opcode 6E) | ||
* [[TRB]] | * [[SBC]] (opcode ED) | ||
* [[TSB]] | * [[STA]] (opcode 8D) | ||
* [[STX]] (opcode 8E) | |||
* [[STY]] (opcode 8C) | |||
* [[STZ]] (opcode 9C) | |||
* [[TRB]] (opcode 1C) | |||
* [[TSB]] (opcode 0C) | |||
* [[JMP]] (opcode 4C) | |||
* [[JSR]] (opcode 20) | |||
On the [[SPC700]], operands which use absolute addressing are prefixed with an exclamation point (!). | |||
The [[Leventhal]] 6502 textbook also refers to absolute addressing as "direct", but this usage is discouraged on the [[65c816]] to avoid confusion with [[direct page addressing]]. | |||
There is no syntax to differentiate between absolute and [[relative addressing]].<sup>[5]</sup> | |||
=== See Also === | === See Also === | ||
* [[Absolute Long Addressing]] | * [[Absolute Long Addressing]] | ||
* [[Absolute Indirect Addressing]] | |||
=== | === References === | ||
# [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/379 page 379] | |||
# lbid, [https://archive.org/details/0893037893ProgrammingThe65816/page/111 page 111] | |||
# section 3.5.1 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf | |||
# Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#5.1.2 | |||
# lbid, http://www.6502.org/tutorials/65c816opcodes.html#6.8.1 | |||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Addressing Modes]] | [[Category:Addressing Modes]] | ||
[[Category:Simple Admodes]] | |||
[[Category:Inherited from 6502]] | [[Category:Inherited from 6502]] |
Latest revision as of 00:57, 10 August 2024
Absolute addressing wraps within bank 0.[4] The effective addresses generated are 16-bit.
Syntax
LDA addr
Twenty six instructions support absolute addressing:
- ADC (opcode 6D)
- AND (opcode 2D)
- ASL (opcode 0E)
- BIT (opcode 2C)
- CMP (opcode CD)
- CPX (opcode EC)
- CPY (opcode CC)
- DEC (opcode CE)
- EOR (opcode 4D)
- INC (opcode EE)
- LDA (opcode AD)
- LDX (opcode AE)
- LDY (opcode AC)
- LSR (opcode 4E)
- ORA (opcode 0D)
- ROL (opcode 2E)
- ROR (opcode 6E)
- SBC (opcode ED)
- STA (opcode 8D)
- STX (opcode 8E)
- STY (opcode 8C)
- STZ (opcode 9C)
- TRB (opcode 1C)
- TSB (opcode 0C)
- JMP (opcode 4C)
- JSR (opcode 20)
On the SPC700, operands which use absolute addressing are prefixed with an exclamation point (!).
The Leventhal 6502 textbook also refers to absolute addressing as "direct", but this usage is discouraged on the 65c816 to avoid confusion with direct page addressing.
There is no syntax to differentiate between absolute and relative addressing.[5]
See Also
References
- Eyes & Lichty, page 379
- lbid, page 111
- section 3.5.1 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf
- Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#5.1.2
- lbid, http://www.6502.org/tutorials/65c816opcodes.html#6.8.1