koitsu wrote:
cadahl wrote:
From what I've read, the 6502 will ignore a BRK if a hardware interrupt (NMI) happens at the exact same time.
I've never seen this mentioned anywhere before; in fact,
the documentation I refer people to actually says otherwise:
Code:
When an interrupt is first received, the processor finishes the currently executing instruction and pushes the ...
...
Since an interrupt always lets the current instruction complete execution, ...
I had
some conversation related to this topic with the 6502.org forum guys. I was trying to figure out the interaction of BRK/NMI/IRQ.
My concern though was more which of the three is vectored to if one is asserted during the 7-cycle preamble of another. The question at the time I was trying to sort out was whether the 7-cycles are atomic. During the thread several visual6502 traces were used to show that indeed they are not atomic.
From what I remember BRK could be ignored because it only changes the internal state of the 6502 to assert itself, while IRQ is not usually ignored because it usually remains asserted by the external source until it is serviced.