Appendix
G
BASIC
Statements
369
The WAIT statement executes as follows:
1.
The contents
of
the addressed memory location are fetched.
2.
The value obtained in step 1
is
Exclusive-ORed with xor, if present.
If
xor
is
not specified, it defaults
to
0. When
xor
is
0, this step has no
effect.
3.
The value obtained in step 2
is
ANDed with the specified mask
value.
4.
If
the result
is
0, WAIT returns to step
1,
remaining in a loop that
halts program execution
at
the WAIT.
5.
If
the result
is
not 0, program execution continues with the statement
following the WAIT statement.
The STOP key will not interrupt WAIT statement execution.