WAIT
Statement
WAIT
port, integer1 [,integer2]
Suspends program execution until a machine input port develops a
specified bit pattern. (A port is
an
input/output location.)
The data read at the port is exclusive OR'ed with
integer2, then
AND'ed with
integer1.
If
the result is zero, BASIC loops back and
reads the data at the port again.
If
the result is nonzero, execution
continues with the next statement. If
integer2 is omitted, it
is
assumed
to be zero.
It
is possible
to
enter
an
infinite loop with the WAIT statement.
In
this
case, you will have
to
manually restart the machine. To avoid this,
WAIT must have the specified value at port number during some point
in
program execution.
For information
on
assigned ports, refer to the Technical Reference
Manual.
Example
100
WAIT
3212
2-177