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

Program Counter Relative Addressing: Difference between revisions

From SnesLab
Jump to: navigation, search
(effective address calculation)
(all of these are on the 65c816)
Line 1: Line 1:
'''Program Counter Relative Addressing''' is supported by nine instructions:
'''Program Counter Relative Addressing''' is supported by nine instructions on the [[65c816]]:


* [[BCC]] (opcode 90)
* [[BCC]] (opcode 90)

Revision as of 19:41, 4 August 2024

Program Counter Relative Addressing is supported by nine instructions on the 65c816:

  • BCC (opcode 90)
  • BCS (opcode B0)
  • BEQ (opcode F0)
  • BMI (opcode 30)
  • BNE (opcode D0)
  • BPL (opcode 10)
  • BRA (opcode 80)
  • BVC (opcode 50)
  • BVS (opcode 70)

All of which are two bytes long.

The effective address is generated by sign-extending the 8-bit operand to 16 bits and then adding it to the program counter. The program bank register remains the same.

Syntax

BRA label

See Also

Reference