JimDrew wrote:
We know that the RTI instruction has a fixed instruction time (6 cycles). But what I have never seen is exactly at what point are interrupts actually allowed during the course of that instruction. Is it at instruction clock 1,2,3,4,5, or only after the conclusion of cycle 6?
Anyone know?
I can't speak for the exact timing of the 65C02, but I can tell you that the 65C816 pulls the status register at cycle 4, which would enable interrupts if the I bit in the stack copy of SR is clear. However, you should note that the MPU doesn't actually acknowledge an IRQ until the completion of the current instruction. Hence the exact point at which interrupts are enabled in the RTI instruction sequence isn't particularly important.
Incidentally, in 65C816 native mode, RTI requires seven clock cycles.