MGMT 1040 Lecture Notes - Lecture 19: Subroutine, Infinite Loop, Interrupt
MGMT 1040 Tutorial 19 Notes – Second Interrupt in Same Classes
Introduction
• A second interrupt of the same class would destroy the return address to the original
program.
• Worse yet, the second interrupt would store the current address being executed in the
OLD PSW space.
• Since that address is itself within the service routine, this would result in an infinite loop.
• Pick a location inside the service routine, say, 205, and cause an interrupt to occur at
that point.
• Now, follow through the diagram, and notice the results.
• The preceding example demonstrates one way of providing return access from
interrupts.
• An alternative method is used in x86 series computers.
• The x 86 interrupt structures are also vectored, but the context is stored on an interrupt
stack.
• Using a stack in this way is essentially analogous to the way in which subroutine jumps
and returns work.
• These were discussed in detail
• Stack storage for interrupts makes interrupts reentrant, although such a condition
would seem to be extremely rare.
• Interrupts are normally checked at the completion of each instruction.
• That is, interrupts are normally checked after one instruction is finished and before
another begins.
• This assures that coditios wo’t chage i the iddle of a istructio that would
affect the istructio’s executio.
• Certain long System z instructions can be interrupted in the middle of their fetch-
execution cycle, however.
• These instructions use the general-purpose registers for their intermediate values
find more resources at oneclass.com
find more resources at oneclass.com