[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
WAIT Wait for Port Status
WAIT port, n[,m]
Suspends program execution until a specified bit pattern appears at a
specified port address.
port A numeric expression in the range 0 to 65535; specifies
the I/O port to test.
n,m Integer expressions in the range 0 to 255; they supply the
test. m defaults to 0.
----------------------------------------------------------------------
Notes: QuickBASIC gets the value at port, XORs it with m, then
ANDs it with n. If the result is zero, the process is
repeated. If the result is nonzero, program execution
continues with the next statement.
To test for a 1 at a particular bit position in port, m
should be omitted and n should have a 1 at the position in
question. To test for a 0 in port, both n and m should
have a 1 in the position in question.
Note that the test is considered positive if any nonzero
value is returned. Therefore, to test for multiple bit
positions, use multiple WAIT statements.
Warning: If port never develops a nonzero value, WAIT can
put your system into an infinite loop.
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson