Unlike IRQ, the NMI doesn't feature a corresponding flag in the status register. I'm trying to figure out the implications.
To me, it seems the 6502 cannot "remember" it is currently running an NMI handler. So the CPU remains susceptible to subsequent NMIs, allowing an indefinite number of NMI levels to nest (assuming there is plenty of time and the stack isn't full).
Does anyone know if my assumption is right, or is there some hidden flag?
NMI handler interruptable by another NMI?
NMI handler interruptable by another NMI?
I trust my somewhat flawed English is comprehensible to all.
AFAIK, your assumption is right, the 6502 doesn't know that it's handling an NMI so your NMI handler can be interupted by another NMI. But the NMI is edge trigged, not level triggered, so as long as the original NMI source doesn't release the NMI line no new NMIs will be triggered (I dont know the right terminology, I hope you understand what I mean)
- GARTHWILSON
- Forum Moderator
- Posts: 8774
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
These things are addressed in the interrupts primer. The NMI portion starts here. Be sure to let it completely load before scrolling, so it will land on the right part of the page.
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?