Here is the entire code with the WHILE WEND example I was trying to use for a debounce.

Please ignore what should be upper case because when I copy and paste it changes back to lower case.

INCLUDE "MODEDEFS.BAS"
@ DEVICE PIC16F628a,XT_OSC
@ DEVICE pic16F628a, WDT_OFF
@ DEVICE pic16F628a, PWRT_ON
@ DEVICE pic16F628a, MCLR_ON
@ DEVICE pic16F628a, BOD_ON
@ DEVICE pic16F628a, LVP_OFF
@ DEVICE pic16F628a, CPD_OFF
@ DEVICE pic16F628a, PROTECT_OFF
DEFINE OSC 4
CMCON=%00000111
PORTA = 0
PORTB = 0
trisa = %00000010
trisb = %10000000
mydata1 VAR byte
mydata2 var byte
address1 var byte
address2 var byte
checksum var byte
chk_sum var byte
serpin VAR porta.1
PAUSE 50

loop:
gosub loop1
CheckSum = (address1 + address2)
CheckSum = CheckSum + (mydata1 + mydata2)
IF checksum != chk_sum THEN loop
IF (mydata1) != (mydata2) THEN loop
IF (address1) != (address2) THEN loop

if mydata1=%01010110 then toggle 0
pause 50

if mydata1=%01011001 then
while mydata1=%01011001 ' trying this example for debounce
pause 50
wend
high 1
else
low 1
endif

if mydata1=%01011010 then
while mydata1=%01011010
pause 50
wend
high 2
else
low 2
endif

if mydata1=%01100101 then
while mydata1=%01100101
pause 50
wend
high 3
else
low 3
endif

if mydata1=%01100101 then
while mydata1=%01100101
pause 50
wend
high 4
else
low 4
endif

if mydata1=%01101001 then toggle 5

if mydata1=%01101010 then toggle 6

goto loop

loop1:
SERIN serpin,N9600,[254],address1,address2,mydata1,mydata2,chk_sum
Return