Interrupt Controller (8259A)
Special consideration should be given, however, when deciding to use
the automatic EOI mode because it disturbs the fully-nested mode. In
the automatic EOI mode the ISR bit of a routine in service is reset
immediately after it is acknowledged, thus leaving no designation in
the ISR that a service routine is being executed. If any interrupt
request occurs during this time (and if interrupts are enabled), it will
be serviced regardless of its priority, low or high. The problem of
"over nesting" may also occur in this situation. "Over nesting" occurs
when an IR input keeps interrupting its own routine, resulting in
unnecessary stack pushes that could fill the stack in a worst case
condition. This is usually not a desired form of operation!
When To Use Automatic EOI Mode
As with the other EOIs, selection of the automatic EOI mode is
dependent upon the application. If interrupts are controlled at a
predetermined rate (thus preventing the problems mentioned above),
the automatic EOI mode works properly just the way it is. However,
if interrupts happen sporadically at an indeterminate rate, the
automatic EOI mode should be used only under the following
guideline.
When using the automatic EOI mode with an indeterminate interrupt
rate, the microprocessor should keep its interrupt request input
disabled during execution of service routines.
By disabling the CPU’s interrupt request input during interrupt service
routines, higher priority interrupt levels will be serviced only after the
completion of a routine in service. This guideline restores the fully-
nested structure in regard to the IRR. However, this also means that a
routine in service cannot be interrupted.
12-33