Wait until a bit is set or reset.
BITWAIT x SET | RESET
Bit variable or internal register like P1.x , where x ranges form 0-7.
When using bit variables be sure that they are set/reset by software.
When you use internal registers that can be set/reset by hardware such as P1.0 this doesn't apply.
Dim A As Bit
Bitwait A , Set 'wait until bit a is set
Bitwait P1.7 , Reset 'wait until bit 7 of Port 1 is 0.
BITWAIT P1.0 , SET will generate :
BITWAIT P1.0 , RESET will generate :