I have been taught that when an interrupt arrives, the following generally happens:
- The current instruction finishes.
- The interrupt is acknowledged.
- The hardware state(PSW) is stored .
- The PC is updated with the interrupt service routine location (from the vector table).
- The software disables interrupts.
- The state is stored.
- Interrupts may be re-enabled; the service routine begins.
- After finishing, the software state is restored.
- The interrupts are re-enabled (if not already done).
- PSW and hardware restored.
My question is about 4. Where is the state of the process word stored: is there a stack or is it stored in memory? What happens then if multiple interrupts come in: is the psw overriden?