Ex6502.CPU.Executor.BRK (ex6502 v0.1.0) View Source

Break

The program counter of the second byte after the BRK is automatically stored on the stack along with the process status at the beginning of the instruction. The control is then transferred to the interrupt vector (FFFE-FFFF).

After the operation, the stack will be (if nothing else is on the stack)

0x01fd  Status register with B set
0x01fe  PCL
0x01ff  PCH
===========

Operation

PC + 2 ↓, [FFFE] → PCL, [FFFF] → PCH

Table

BRK | Break
================================================

PC + 2 , [FFFE]  PCL          N V - B D I Z C
          [FFFF]  PCH          - - - 1 - - - -

addressing       assembler    opc  bytes  cycles
------------------------------------------------
implied          BRK           00    1      7

Flags

  • Interrupt: always 1

Link to this section Summary

Link to this section Functions