WAIT


Reads from a hardware port with a mask.

Syntax:
declare function Wait ( byval port as ushort, byval and_mask as long, byval xor_mask as long = 0 ) as long

Usage:
Wait port, and_value [, xor_value]

Parameters:
port
Port to read.
and_mask
Mask value to And the port value with.
xor_mask
Mask value to Xor the port value with.

Return Value:
0 if successful, -1 on failure.

Description:
Wait keeps reading port until the reading ANDed with and_mask and optionally XORed with xor_mask gives a non-zero result.

Examples:
Wait &h3da, &h8 'Old Qbasic way of waiting for the monitor's vsync
ScreenSync 'FreeBASIC way of accomplishing the same thing


Platform Differences:


See also:
Back to Miscellaneous


Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode