Input/Output Interruptions
Terminal Interruptions
The DMSHDS initialization program sets up the user-defined SVC table. It is pos­
sible for a user to provide his own SVC routines.
All input/output interruptions are received by the I/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 to DMSITI. 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 the I/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 the DMSIOW 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 saved I/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 the I/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 the DMSCIT 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 the ST 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 last I/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 last I/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
passed to a user specified exit, if one exists. Upon completion, the exit returns to
DMSCIT. If it is a built-in immediate command (HX, for example), appropriate
processing is performed by DMSCIT. Unit exception indicates a canceled read.
The read is reissued, unless it had been issued with ATTREST=NO, in which case
unit exception is treated as device end.
Reader /Punch/Printer Interruptions
Interruptions from these devices are handled by the routines that actually issue the
corresponding 110 operations. When an interruption from any of these devices
occurs, control passes to DMSITI. Then DMSITI passes control to DMSIOW, which returns control to the routine that issued the 110 operation. This routine can
then analyze the cause of the interruption.
User-Controlled Device Interruptions . i Program Interruptions
External Interruptions
Interrupts from devices under user control are serviced the same as CMS devices
except that DMSIOW and DMSITI manipulate a user-created device table, and DMSITI passes control to any user-written interrupt processing routine that is spec­
ified in the user device table. Otherwise, the processing program regains control
directly.
The program interruption handler, DMSITP, receives control when a program
interruption occurs. When DMSITP gets control, it stores the program old PSW and the contents of the registers 14, 15, 0, 1, and 2 into the program interruption
element (PIE). (The routine that handles the SPIE macro instruction has already
placed the address of the program interruption control area (PICA) into PIE.) DMSITP then determines whether or not the event that caused the interruption was
one of those selected by a SPIE macro instruction. If it was not, DMSITP passes
control to the DMSABN abend recovery routine.
If the cause of the interruption was one of those selected in a SPIE macro instruc­
tion, DMSITP picks up the exit routine address from the PICA and passes control
to the exit routine. Upon return from the exit routine, DMSITP returns to the
interrupted program by loading the original program check old PSW. The address
field of the PSW was modified by a SPIE exit routine in the PIE.
An external interruption causes control to be passed to the external interrupt han­
dler DMSITE. If CMS IUCV support is active in the virtual machine and an IUCV external inter­
rupt occurs, control is passed to the user exit specified on the HNDIUCV or CMSIUCV macro. If the user has issued the HNDEXT macro to trap external
interrupts, DMSITE passes control to the user's exit routine. If the interrupt was
caused by the timer, DMSITE resets the timer and types the BLIP character at the
terminal. The standard BLIP timer setting is two seconds, and the standard BLIP
character is uppercase, followed by the lowercase (it moves the typeball without
printing). Otherwise, control is passed to the DEBUG routine.
Machine Check Interruptions
Hard machine check interruptions on the real processor are not reflected to a CMS virtual user by CP. A message prints on the console indicating the failure. The
user is then disabled and must IPL CMS again in order to continue.
314 VM/SP System Programmer's Guide
Previous Page Next Page