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

BRK: Difference between revisions

From SnesLab
Jump to: navigation, search
m (→‎Cycle Penalty: shorter word)
(re-framed speed)
Line 10: Line 10:
|00
|00
|2 bytes
|2 bytes
|7 cycles*
|8 cycles*
|}
|}


Line 49: Line 49:
'''BRK''' (Break) is a 65x instruction designed to trigger a software interrupt.  The byte following the opcode is called the [[Signature Byte]].  The state of the [[interrupt disable flag]] has no effect on the behavior of BRK.
'''BRK''' (Break) is a 65x instruction designed to trigger a software interrupt.  The byte following the opcode is called the [[Signature Byte]].  The state of the [[interrupt disable flag]] has no effect on the behavior of BRK.


===== Cycle Penalty =====
===== Cycle Skipped =====
BRK takes one extra cycle in [[native mode]] as it needs to push the [[program counter bank register]] to the [[stack]].
BRK takes one fewer cycle in [[emulation mode]] as it doesn't need to push the [[program counter bank register]] to the [[stack]].


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

Revision as of 07:37, 26 November 2023

Basic Info
Addressing Mode Opcode Length Speed
Stack 00 2 bytes 8 cycles*
Flags Affected
N V M X / B D I Z C
65c816 native mode . . . . 0 1 . .
6502 emulation mode . . . 1 0 1 . .

BRK (Break) is a 65x instruction designed to trigger a software interrupt. The byte following the opcode is called the Signature Byte. The state of the interrupt disable flag has no effect on the behavior of BRK.

Cycle Skipped

BRK takes one fewer cycle in emulation mode as it doesn't need to push the program counter bank register to the stack.

See Also

External Links