statement/WAIT                                                 statement/WAIT
 
 NAME
     WAIT -- Waits for a change of memory address
 
 ABBREVIATION
     w <shift> A

 SYNOPSIS
     WAIT <address>,<ctrl_value1>[,<ctrl_value2>]

 FUNCTION
     The WAIT statement is used to halt the program until the contents of a 
     location in memory changes in a specific way. The address (<address>) 
     must be in the range from 0 to 65535. Value 1 (<ctrl_value1>) and value 
     2 (<ctrl_value2>) must be in the range from 0 to 255.
     The content of the memory location is first exclusive-ORed (XOR) with 
     value 2 (if present), and then logically ANDed (AND) with value 1. If 
     the result is zero, the program checks the memory location again. When 
     the result is not zero, the program continues with the next statement.
 
 INPUTS
     <address>     - memory location to be monitored (0-65535)
     <ctrl_value1> - first control value (0-255)
     <ctrl_value2> - second control value (0-255)
 
 RESULT
     Halts program execution until the contents of a given memory address 
     changes.

 EXAMPLES
     None
 
 NOTES
     None
 
 BUGS
     None
 
 SEE ALSO
     END
     STOP