WAIT() Causes Execution to Continue If Any Bit Is Set (62891)
The information in this article applies to:
- Microsoft QuickBASIC 4.0
- Microsoft QuickBASIC 4.0b
- Microsoft QuickBASIC 4.5
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0
- Microsoft BASIC Compiler for MS-DOS and OS/2 6.0b
- Microsoft Basic Professional Development System for MS-DOS 7.0
- Microsoft Basic Professional Development System for MS-DOS 7.1
This article was previously published under Q62891 SUMMARY
The WAIT() statement stops monitoring the input port and resumes
execution as soon as any bit changes at the input port.
The WAIT() statement cannot be used to suspend program execution until
only a certain bit pattern is read from a designated input port.
However, this can be done using the INP() function as shown in the
program below, which loops until the byte read from port 1 is 13.
Code Example
DO
x% = INP(1)
LOOP UNTIL x% = 13
Modification Type: | Minor | Last Reviewed: | 8/16/2005 |
---|
Keywords: | KB62891 |
---|
|