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

RTI: Difference between revisions

From SnesLab
Jump to: navigation, search
(added pitfalls section)
(re-framed speed)
Line 10: Line 10:
|40
|40
|1 byte
|1 byte
|6 cycles*
|7 cycles*
|}
|}


Line 52: Line 52:
* RTI should only be run when the e flag is in the same state as when the interrupt fired
* RTI should only be run when the e flag is in the same state as when the interrupt fired


===== Cycle Penalty =====
===== Cycle Skipped =====
RTI takes one additional cycle in [[native mode]] as the [[program bank register]] needs to be pulled from the [[stack]].
RTI takes one fewer cycle in [[emulation mode]] as the [[program bank register]] needs to be pulled from the [[stack]].


=== See Also ===
=== See Also ===

Revision as of 07:41, 26 November 2023

Basic Info
Addressing Mode Opcode Length Speed
Stack (RTI) 40 1 byte 7 cycles*
Flags Affected
N V M X D I Z C
65c816 native mode
6502 emulation mode . .

RTI (Return from INterrupt) is a 65x instruction used to return control from an interrupt handler.

Pitfalls
  • RTI should only be run when the e flag is in the same state as when the interrupt fired
Cycle Skipped

RTI takes one fewer cycle in emulation mode as the program bank register needs to be pulled from the stack.

See Also

External Links