you have this
WHILE PORTA.1 = 0 PAUSE 1 'WHY DOES THIS NOT WORK?
WEND
how about this?
WHILE PORTA.1 = 0
PAUSE 1 ' moved to its own line
WEND