Does anybody know the execution time of NMIs and IRQs? I've written a small test program, and from what I can see, NMI seems to take 5 cycles. Is that correct? I was expecting 7 cycles (like BRK), or maybe 6 cycles (one faster than BRK).
EDIT: No, my test program indicates 7 cycles (not 5 cycles). I've been doing something wrong when counting clock cycles.
Surprisingly, there appears to be little or no info on IRQ/NMI timings in the internet. The typical opcode charts are listing only opcode timings... And in-depth NMI related pages are only discussing rather obscure scenarios like "what happens if a NMI collides with a branch opcode?"
NMI and IRQ execution time
Moderator: Moderators
-
doppelganger
- Posts: 183
- Joined: Tue Apr 05, 2005 7:30 pm
Re: NMI and IRQ execution time
They take 7 cycles under normal, non-obscure scenario circumstances. (Actually, so does RESET, which uses some of the same interrupt logic, save for writing to the stack.)
Be whatever the situation demands.
Re: NMI and IRQ execution time
googling for "6502 interrupt timing" found http://www.6502.org/tutorials/interrupts.html#1.3 as the first hit...