Input/Output Interruptions
Terminal Interruptions
TheDMSHDS initialization program sets up the user-defined SVC table. It is pos
sible for a user to provide his ownSVC routines.
All input/output interruptions are received by theI/O interrupt handler, DMSITI. DMSITI saves the I/O old PSW and the CSW (channel status word). It then
determines the status and requirements of the device causing the interruption and
passes control to the routine that processes interruptions from that device.DMSITI scans the entries in the device table until it finds the one containing the
device address that is the same as that of the interrupting device. The device table
(DEVTAB) contains an entry for each device in the system. Each entry for a par
ticular device contains, among other things, the address of the program that proc
esses interruptions from that device.
When the appropriate interrupt handling routine completes its processing, it returns
control toDMSITI. At this point, DMSITI tests the wait bit in the saved I/O old PSW. If this bit is off, the interruption was probably caused by a terminal (asyn
chronous)I/O operation. DMSITI then returns control to the interrupted program
by loading theI/O old PSW. If the wait bit is on, the interruption was probably caused by a nonterminal (syn
chronous)I/O operation. The program that initiated the operation most likely
called theDMSIOW function routine to wait for a particular type of interruption
(usually a device end). In this case,DMSITI checks the pseudo-wait bit in the
device table entry for the interrupting device. If this bit is off, the system is waiting
for some event other than the interruption from the interrupting device;DMSITI returns to the wait state by loading the saved I/O old PSW. (This PSW has the
wait bit on.)
If the pseudo-wait bit is on, the system is waiting for an interruption from that par
ticulardevice. If this interruption is not the one being waited for,DMSITI loads
the savedI/O old PSW. This again places the machine in the wait state. Thus, the
program that is waiting for a particular interruption is kept waiting until that inter
ruption occurs.
If the interruption is the one being waited for,DMSITI resets both the pseudo-wait
bit in the device table entry and the wait bit in theI/O old PSW. It then loads that PSW. This causes control to be returned to the DMSIOW function routine, which,
in turn, returns control to the program that called it to wait for the interruption.
Terminal input/output interruptions are handled by theDMSCIT module. All
interruptions other than those containing device end, channel end, attention, or unit
exception status are ignored. If device end status is present with attention and a
write CCW was terminated, its buffer is unstacked. An attention interrupt causes a
read to be issued to the terminal, unless attention exits have been queued via theST AX macro. The attention exit with the highest priority is given control at each
attention until the queue is exhausted, then a read is issued. Device end status indi
cates that the lastI/O operation has been completed. If the last I/O operation was
a write, the line is deleted from the output buffer and the next write, if any, is
started. If the lastI/O operation was a normal read, the buffer is put on the fin
ished read list and the next operation is started. If the read is caused by an atten
tion interrupt, the line is first checked to see if it is an immediate command
(user-defined or built-in). If it is a user-defined immediate command, control is
Interrupt Handling In eMS 313
Terminal Interruptions
The
sible for a user to provide his own
All input/output interruptions are received by the
determines the status and requirements of the device causing the interruption and
passes control to the routine that processes interruptions from that device.
device address that is the same as that of the interrupting device. The device table
(DEVTAB) contains an entry for each device in the system. Each entry for a par
ticular device contains, among other things, the address of the program that proc
esses interruptions from that device.
When the appropriate interrupt handling routine completes its processing, it returns
control to
chronous)
by loading the
chronous)
called the
(usually a device end). In this case,
device table entry for the interrupting device. If this bit is off, the system is waiting
for some event other than the interruption from the interrupting device;
wait bit on.)
If the pseudo-wait bit is on, the system is waiting for an interruption from that par
ticulardevice. If this interruption is not the one being waited for,
the saved
program that is waiting for a particular interruption is kept waiting until that inter
ruption occurs.
If the interruption is the one being waited for,
bit in the device table entry and the wait bit in the
in turn, returns control to the program that called it to wait for the interruption.
Terminal input/output interruptions are handled by the
interruptions other than those containing device end, channel end, attention, or unit
exception status are ignored. If device end status is present with attention and a
write CCW was terminated, its buffer is unstacked. An attention interrupt causes a
read to be issued to the terminal, unless attention exits have been queued via the
attention until the queue is exhausted, then a read is issued. Device end status indi
cates that the last
a write, the line is deleted from the output buffer and the next write, if any, is
started. If the last
ished read list and the next operation is started. If the read is caused by an atten
tion interrupt, the line is first checked to see if it is an immediate command
(user-defined or built-in). If it is a user-defined immediate command, control is
Interrupt Handling In eMS 313