Changes

Jump to: navigation, search

6502

42 bytes added, 23 September
/* Interrupt hijacking */
=== Interrupt hijacking ===
On NMOS, if NMI is asserted during the first 4 ticks of a BRK instruction, the BRK instruction will execute normally at first (PC increments will occur and P will be pushed with BF set to 1), but execution will branch to the NMI vector instead of the IRQ/BRK vector, effectively skipping the BRK instruction. On CMOS, this situation is correctly handled by executing BRK and then servicing the interrupt.
An IRQ can also hijack a BRK, though it won't be as visible since they use the same interrupt vector.
8,990
edits