Specifications

System Macros Invoked by Drivers
TIMEDWAIT
[ublbl]
Label placed at the instruction that performs the processor-specific delay after
each execution of the loop of embedded instructions; embedded instructions can
pass control here in order to skip the execution of the rest of the embedded
instructions in a given execution of the embedded loop.
Description
The TIMEDWAIT macro waits for a period of time for an event or condition to
occur. You can specify up to six instructions for this macro to execute in a loop to
determine whether the event has occurred.
The TIMEDWAIT macro does not read the processors clock. The interval of time
it waits is approximate and depends on the processor and the set of instructions
you choose for testing to see if the condition exists.
TIMEDWAIT returns a status code (success or failure) in R0, destroys the
contents of R1, and preserves all other registers.
Example
TIMEDWAIT TIME=#600*1000,- ;6-second wait loop
INS1=<TSTB RL_CS(R4)>,- ;Is controller ready?
INS2=<BLSS 15$>,- ;If LSS - yes
DONELBL=15$ ;Label to exit wait loop
BLBC R0,25$ ;Time expired - exit
The unit initialization routine of DLDRIVER issues the TIMEDWAIT macro to
wait a maximum of six seconds if another unit is busy on the controller’s channel.
2–99