
2-62
PRELIMINARY
Interrupts and Exceptions
Advanci ng the S tandar ds
2.14
Interrupts and
Exceptions
The processing of an interrupt or an exception
changes the normal sequential flow of a
program by transferring program control to a
selected service routine. Except for SMM inter-
rupts, the location of the selected service
routine is determined by one of the interrupt
vectors stored in the interrupt descriptor table.
Hardware interrupts are generated by signal
sources external to the CPU. All exceptions
(including so-called software interrupts) are
produced internally by the CPU.
2.14.1 Interrupts
External events can interrupt normal program
execution by using one of the three interrupt
pins on the M II CPU.
Non-maskable Interrupt (NMI pin)
Maskable Interrupt (INTR pin)
SMM Interrupt (SMI# pin).
For most interrupts, program transfer to the
interrupt routine occurs after the current
instruction has been completed. When the
execution returns to the original program, it begins
immediately following the last completed instruc-
tion.
With the exception of string operations, inter-
rupts are acknowledged between instructions.
Long string operations have interrupt windows
between memory moves that allow interrupts
to be acknowledged.
The NMI interrupt cannot be masked by soft-
ware and always uses interrupt vector 2 to
locate its service routine. Since the interrupt
vector is fixed and is supplied internally, no
interrupt acknowledge bus cycles are
performed. This interrupt is normally reserved
for unusual situations such as parity errors and
has priority over INTR interrupts.
Once NMI processing has started, no additional
NMIs are processed until an IRET instruction is
executed, typically at the end of the NMI
service routine. If NMI is re-asserted prior to
execution of the IRET instruction, one and only
one NMI rising edge is stored and processed
after execution of the next IRET. During the
NMI service routine, maskable interrupts may
be enabled (unmasked). If an unmasked INTR
occurs during the NMI service routine, the
INTR is serviced and execution returns to the
NMI service routine following the next IRET. If
a HALT instruction is executed within the NMI
service routine, the M II CPU restarts execution
only in response to RESET, an unmasked INTR or
an SMM interrupt. NMI does not restart CPU
execution under this condition.
The INTR interrupt is unmasked when the
Interrupt Enable Flag (IF) in the EFLAGS
register is set to 1. When an INTR interrupt