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

Direct Page Addressing: Difference between revisions

From SnesLab
Jump to: navigation, search
(added EOR)
(→‎References: hid archive URL for E&L)
 
(43 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Direct Page Addressing''' is an [[addressing mode]] that is supported by the [[65c816]] and [[SPC700]].
'''Direct Page Addressing''' is an [[addressing mode]] that is supported by the [[65c816]] and [[SPC700]]. It is an upgraded version of [[zero page addressing]].  The effective addresses generated by it are always in [[bank]] 0.<sup>[4]</sup>


The operand specifies which byte of the [[direct page]] to access.
The operand specifies which byte of the [[direct page]] to access.


Supported by:
==== Syntax ====
* [[EOR]]
<pre>
* [[ASL]]
LDA dp
* [[LSR]]
</pre>
* [[INC]]
 
* [[DEC]]
Supported by 24 instructions on the '816:
* [[BIT]]
* [[ADC]] (opcode 65)
* [[CMP]]
* [[SBC]] (opcode E5)
* [[CPX]]
* [[EOR]] (opcode 45)
* [[CPY]]
* [[ASL]] (opcode 06)
* [[ORA]]
* [[LSR]] (opcode 46)
* [[AND]]
* [[INC]] (opcode E6)
* [[LDA]]
* [[DEC]] (opcode C6)
* [[LDX]]
* [[BIT]] (opcode 24)
* [[LDY]]
* [[CMP]] (opcode C5)
* [[ROL]]
* [[CPX]] (opcode E4)
* [[ROR]]
* [[CPY]] (opcode C4)
* [[STA]]
* [[ORA]] (opcode 05)
* [[STX]]
* [[AND]] (opcode 25)
* [[STY]]
* [[LDA]] (opcode A5)
* [[STZ]]
* [[LDX]] (opcode A6)
* [[TRB]]
* [[LDY]] (opcode A4)
* [[TSB]]
* [[ROL]] (opcode 26)
* [[ROR]] (opcode 66)
* [[STA]] (opcode 85)
* [[STX]] (opcode 86)
* [[STY]] (opcode 84)
* [[STZ]] (opcode 64)
* [[TRB]] (opcode 14)
* [[TSB]] (opcode 04)


=== See Also ===
=== See Also ===
* [[Zero Page Addressing]]
* [[Direct Page Indexed, X Addressing]]
* [[Direct Page Indexed, Y Addressing]]
* [[Direct Page Indirect Addressing]]
* [[Direct Page Bit Addressing]]


=== Reference ===
=== References ===
* [[Eyes & Lichty]], page 389: https://archive.org/details/0893037893ProgrammingThe65816/page/n415
# [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/389 page 389]
# lbid, [https://archive.org/details/0893037893ProgrammingThe65816/page/114 page 114]
# section 3.5.17 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf
# lbid, section 3.3
# lbid, section 7.2


[[Category:ASM]]
[[Category:ASM]]
[[Category:Addressing Modes]]
[[Category:Addressing Modes]]
[[Category:Simple Admodes]]
[[Category:65c816 additions]]

Latest revision as of 14:23, 8 August 2024

Direct Page Addressing is an addressing mode that is supported by the 65c816 and SPC700. It is an upgraded version of zero page addressing. The effective addresses generated by it are always in bank 0.[4]

The operand specifies which byte of the direct page to access.

Syntax

LDA dp

Supported by 24 instructions on the '816:

  • ADC (opcode 65)
  • SBC (opcode E5)
  • EOR (opcode 45)
  • ASL (opcode 06)
  • LSR (opcode 46)
  • INC (opcode E6)
  • DEC (opcode C6)
  • BIT (opcode 24)
  • CMP (opcode C5)
  • CPX (opcode E4)
  • CPY (opcode C4)
  • ORA (opcode 05)
  • AND (opcode 25)
  • LDA (opcode A5)
  • LDX (opcode A6)
  • LDY (opcode A4)
  • ROL (opcode 26)
  • ROR (opcode 66)
  • STA (opcode 85)
  • STX (opcode 86)
  • STY (opcode 84)
  • STZ (opcode 64)
  • TRB (opcode 14)
  • TSB (opcode 04)

See Also

References

  1. Eyes & Lichty, page 389
  2. lbid, page 114
  3. section 3.5.17 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf
  4. lbid, section 3.3
  5. lbid, section 7.2