Exam-style question
Try this first
Describe how an interrupt affects the Fetch-Execute cycle. Include the purpose of an interrupt service routine and explain why the volatile environment must be saved.
Model answer
What a good answer should say
- An interrupt temporarily diverts the processor from its normal Fetch-Execute cycle so that it can deal with an event.
- The processor runs an interrupt service routine, which is the routine that services the interrupt.
- Before or while changing to the ISR, the volatile environment is saved.
- This preserves the information needed by the interrupted program.
Explanation
Why this works
A complete answer identifies the temporary change from normal instruction processing, names the ISR and its purpose, and links saving the volatile environment to correct continuation of the interrupted program.
Common mistake
No common mistake is linked to this question yet.
