Quote:
Originally Posted by alexh
That is exactly what I do. Before fetching the next opcode, I "check" the interrupt status. If a bit is set, I use an address from vector table to fetch the next opcode.
But at that point I've just finished executing the instruction at the current PC.
|
And this is specifically the bit which I don't get. At the point where you check the interrupt status, I would expect the PC to always point to the instruction that is next in line for execution.
If the PC still points to the latest instruction which was executed, then it means that the instruction has just been executed, but the PC has not been updated. This will only happen if updating of the PC is not considered to be part of the execution of the instruction.
What am I (we?) missing here?