Since version 2.1
Syntax:
wait <byte or int address>, <byte or int mask> [, <byte or int trig>]
Identically to CBM BASIC, the WAIT
command waits for a bit pattern on a specified memory address.
Please read this comprehensive article from Compute! Magazine for more information.