HN DINT HNDINT Use the macro instruction to trap interruptions for a specified 1/0 device. The format of the HNDINT macro instruction is:
r , (label] , HNDINT SET, (dev1, [, (dev2 ••• } ••• ] t , I t CLR, (d ev 1) ( , (dev2) [ ••• ]] ) I , [ , ERROR=erraddr] L- label
SET
is an optional statement label.
specifies that you want to
specified device.
trap interruptions for the
dev specifies a four-character symbolic name for tne device whose
interruptions are to be trapped.
addr specifies the address in your program of the routine to be
given control when the interruption occurs. An address of 0 indicates that interruptions for the device are to be ignored.
cuu specifies the virtual device address, in hexadecimal, of the
device whose interruptions are to be trapped. ASAP specifies that the routine at addr is to be given control as
soon as the interruption occurs. specifies that the routine at addr is to be given control
after the WAITD macro is issued for the device.
CLR specifies that you no longer want to trap interruptions for
the specified device. HNDINT CLR should not be issued from
within the interruption handling routine. ERROR=erraddr specifies the address of an error routine to be given control
if an error is found. If ERROR= is not coded and an error
occurs, control returns to the next sequential instruction in
the calling as it does if no error occurs.
1. You can define interruption handling routines for more than one
device in a single HNDINT macro instruction. The argument list for
each device must be enclosed in parentheses and separated from the next list by a comma.
2. If you specify WAIT, then the routine at the specified address in
your program receives control when a WAITD macro instruction that
specifies the same symbolic device name is issued. If the WAITD ma=ro instruction has already been issued for the device when the
interruption occurs, then the routine at the specified address
receives control immediately.
316 VM/370 CMS Command and Macro Reference
HNDINT, HNDSVC 3. You are responsible for establishing proper entry and exit linkage
for your interruption handling routine. When your routine receives
control, the significant registers contain: 0-1 2-3 4 14 15
contents I/o-oIdPSW Channel status word (CSW) Address of interrupting device
Return address
Entry point address Your routine must return control to the address in 14, and
indicate, via register 15, whether processing is complete. A 0 in
register 15 means that you are through handling the interruption; any nonzero return code indicates that you expect another
interruption.
4. The interruption handling routine that you code should not perform any I/O operations. When it is given control, all IIO interruptions and external interruptions are disabled.
If an error condition occurs, register 15 will contain one of the
following return codes: Invalid device address (cuu) or interruption handling routine
address (addr).
2 Trap item replaces another of same device name.
3 Attempting to clear a nonexisting interruption.
HNDSVC Use the HNDSVC macro
specific supervisor call
macro instruction is:
instruction to trap (SVC) instructions.
interruptions caused by
The format of the HNDSVC r -----, I [label] I {
SET, (svcnum,. address) [ ,. (svcnum, address) ••• ] } I CLR,.svcnum[,.svcnum .•• ] , HNDSVC I , I [ , ERROR=erraddr] I L- label is an optional statement label. specifies that you want to trap SVcs of the specified
nu mber (s) .
sv cnum
address
specifies the number of the SVC you want to trap. SVC numbers
o through 200 and 206 through 255 are valid.
specifies the address of the routine in your program that
should receive control whenever the specified SVC is issued.
Section 6. Instructions 317
Previous Page Next Page