WAITD Macro WAITD Use the WAI:D macro instruction to cause the program to wait until the
next interruption occurs on the specified device. The format of the WAITD macro instruction is:
r ---, I [label] I WAITD I device ••• [,devicen] [,ERROR=erraddr] , '-- ,----------------------------------------------_______ -J label is an optional statement label.
d evicen specifies the device(s) to be waited for.
following may be specified: O·ne of the
symn indicates the symbolic device name and number, where:
sym is CON, DSK, PRT, PUN,RDR, or TAP.
n indicates a device number.
user is a four-character symbolic name specified a HNDINT
macro issued for the same device.
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 returRS to the next sequential instruction in
the calling program, as it does if no error occurs.
1. Use the WAITD macro instruction to ensure completion of an I/O operation. If an interruption has been received and not processed
from a device specified in the WAITD macro instruction, the
interruption is processed before program execution continues.
2. When the interruption has been completely processed
control is
returned to the caller with the name of the interrupting device in
register 1.
3. If an HNDINT macro instruction issued for the same device specified ASAP and an interruption has already been processed for the device,
the wait condition is satisfied.
4. If an HNDINT macro instruction issued for the same device specified WAIT and an interruption for the device has been received, the
interruption handling routine is given control.
5. The interruption routine determines if an interruption
considered processed or if more interruptions are necessary
satisfy the wait condition. For additional information see
discussion of the HNDINT macro instruction.
When an error is detected, register 15 contains a 1 to indicate that an
invalid device number was specified.
Section 6. CMS Macro Instructions 339
WAITT, WRTAPE Macros WAITT Use the macro instruction to cause the program to wait until all
of the pending terminal IIO is complete. The format of the WAITT macro
instruction is: r , , (label] , WAITT, , L __________________________________________________ . _______ -J label is an optional statement label.
The macro instruction synchronizes input and output to the
terminal; it ensures that the console stack is cleared before the
program continues execution. Also, you can ensure that a read or write
operation is finished before you modify an 110 buffer.
WRTAPE Use the WR!APE macro instruction to write a record on the specified tape
drive. The format of the WRTAPE macro instruction is: r , (la bel] I L
device WRTAPE buffer,length (,device] (,KODE=mode] ( , ERROR=erradd r] ___________________ -J is an optional statement label.
specifies the address of the record to be written. It may be:
the symbolic address of the line.
a register containing the address of the time.
specifies the length of the line to be written. It may be
specified in either of two ways:
n (reg) a self-defining term indicating the length.
a register containing the length.
specifies the device to which the record is to be written. If
omitted, TAPl (virtual address 181) is assumed. It may be: TAPn cuu
indicates the symbolic tape number (TAPl through TAP4). indicates the virtual device address. MODE=mode specifies the number of tracks, density, and tape recording
technique. It must be in the following form:
([ track ],r density ],[trtch]) 340 VM/370 eMS Command and Macro Reference
Previous Page Next Page