QB64.com

QB64 is a modern extended BASIC programming language that retains QBasic/QuickBASIC 4.5 compatibility and compiles native binaries for Windows, Linux, and macOS.

The WAIT statement waits until the value read from an I/O port has certain bits set.

Syntax

WAIT port%, andMask%[, xorMask%]

Description

Example(s)

Waiting for vertical retrace


' Either statement can be used to try to reduce screen flickering.
' If both statements are used, try changing the order.

WAIT &H3DA, 8 ' finishes whenever the screen isn't being written to
WAIT &H3DA, 8, 8 ' finishes whenever the screen is being written to

See Also