6.1.3+Interrupt+Register

=__**Interrupt Register**__=
 * A processor can only do one thing at a time
 * Therefore, it has to be interrupted when a tasks needs attention that is more important than the task that is currently running.
 * 2 types of interrupts: hardware interrupts and software interrupts
 * Hardware interrupts: interrupts sent to processor from other hardware devices linked to the physical architecture of the computer.
 * Ex. printer sending 'out of paper'-message
 * Software interrupts: the processor itself generates the situation requiring handling
 * Ex. a situation needing handling would be an exception, such as accessing an index of an array beyond the dimension of that array
 * The code containing the information 'how to handle **hardware** interrupts' is stored in memory, in fixed positions relative from a base address. Where exactly, relative to the base address, is specified by the memory offset position. This offset is contained in the ** interrupt register **.
 * When a device sends an interrupt, the interrupt register is updated with the offset position.
 * **Interrupt Code Address = base address + interrupt registers**

__When an interrupt is detected__
 * 1) All current states of the processor's registers are PUSHED (stored) onto a stack
 * 2) The interrupt is executed
 * 3) The state before the interrupt was executed is recovered by POPPING the register values off the stack again

Written by Jocbe Last update: 24. September 2010


 * Jones, Richard. Computer Science Java Enabled. Victoria: IBID Press, 2004.