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 Bank Register: Difference between revisions

From SnesLab
Jump to: navigation, search
(superscripted 4)
(incrementing pc does not affect it)
Line 8: Line 8:
* [[JSL]]
* [[JSL]]
* [[JMP]] absolute long
* [[JMP]] absolute long
Incrementing the [[program counter]] past FFFFh does not affect PBR.<sup>[4]</sup>


There is also a program bank register on the [[GSU]].<sup>[1]</sup>  It can be used to specify any mapped bank address.<sup>[3]</sup>
There is also a program bank register on the [[GSU]].<sup>[1]</sup>  It can be used to specify any mapped bank address.<sup>[3]</sup>


=== See Also ===
=== See Also ===
* [[RTI]]
* [[Program Counter]]
* [[Data Bank Register]]
* [[Data Bank Register]]
* [[LJMP]]
* [[LJMP]]

Revision as of 23:47, 31 July 2024

The Program Bank Register (PBR or K) exists on the 65c816. It tells the processor which bank to fetch the next opcode from. It is 8 bits wide. It is cleared to zero on reset.[2] PHK pushes it onto the stack, but there is no PLK to pull it.

PBR is affected only by:[4]

Incrementing the program counter past FFFFh does not affect PBR.[4]

There is also a program bank register on the GSU.[1] It can be used to specify any mapped bank address.[3]

See Also

References

  1. paragraph 4.5 on page 2-4-5 of Book II
  2. section 2.9 on page 7 of 65c816 datasheet, https://westerndesigncenter.com/wdc/documentation/w65c816s.pdf
  3. Figure 2-3-2 Super FX Memory Map on page 2-3-4 of Book II
  4. section 3.4 Program Address Space of 65c816 datasheet