MGMT 1040 Lecture Notes - Lecture 19: Subroutine, Infinite Loop, Interrupt

30 views2 pages
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 coditios wo’t chage i the iddle of a istructio that would
affect the istructio’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
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents