Interrupts

Although the processor executes the instructions in a specified sequence, it should be able to respond to adhoc requests for its attention, such as pressing keys on the keyboard, or the printer signaling that it has run out of paper, and take the appropriate action required.

This is done through interrupts. An interrupt signal makes the microprocessor respond to such adhoc requests, even though it is busy working on something else. However, the microprocessor stores the status of the current work being processed before it diverts itself to handle the interrupt request. The microprocessor stores this status, i.e. the next instruction that was to be executed and all the intermediate results generated etc. into an area of the memory called the stack and retrieves this status to continue processing after it has completed the handling of the interrupt request.