HNDEXT Macro HNDEXT Use the macro instruction to trap external interruptions and pass
control to an internal routine for processing. External interruptions
are caased
i
in a machine, by the CP EXTERNAL command. The
format of the HNDElT macro instruction is: r- I [ label] , L-- label SET address
CLR HNDE1CT {
SET,
address }
CLR
is an optional statement label.
____ --I specifies that you want to trap external interraptions.
specifies the address in your program of the routine to be
given control when an external interruption occurs.
specifies that
interruptions.
you no longer want to trap external
1. External interruptions (other than timer interruptions) normally
place your virtual machine in the debug environment.
2. When your interruption handling routine is given control, all
virtual interruptions, except multiplexer, are disabled. If you
are using the CMS blip function, all blips are stacked.
3. You are responsible for providing proper entry and exit linkage for your interruption handling routine. When your routine receives
control, register 1 points to a save area in the format: GRS FRS PSi tJAREA END o
64
96 104 176
_Hex_
o 40 60 68 BO Register 13 points to the user save area at label UAREA. Register 15 contains the entry point address of yoar routine; it
must return control to the address in register 14.
4. If you issue a STAX macro instruction to handle attention
interruptions while the HNDEXT macro is active, either exit may be
interrupted while the other is running. If your exits depend on
data in static areas, results may be undesirable. Section 6. CMS Macro Instructions 315
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
Previous Page Next Page