Chris, what about semplifying your code in this way:

Code:
AA0  var Byte  ' new variable to add.

If Percent < 95 then
AA0 = (Percent / 10) - 1
PortB = (2^AA0)-1
else
PORTB = %11111111
FreqOut bz, 250, 4000
pause 250
PORTB = %01111111
Low bz
pause 250
endif
will eliminate from comp1 up to label continue.

Al.