Thanks,for help,but can you give me one more answer!

I write this code:

ButtonPressCounter var byte

SWITCHLOOP:
IF PORTA.2 = 0 THEN
IF ButtonPressCounter = 3 THEN ButtonPressCounter = 0
ButtonPressCounter = ButtonPressCounter + 1
IF ButtonPressCounter = 1 THEN GOSUB Program1
IF ButtonPressCounter = 2 THEN GOSUB Program2
IF ButtonPressCounter = 3 THEN GOSUB Program3
ENDIF
GOTO SWITCHLOOP:

Program1:
high portb.1
PAUSE 500
LOW PORTB.1
PAUSE 500

RETURN

Program2:
high portb.2
PAUSE 500
LOW PORTB.2
PAUSE 500
RETURN

Program3:
high portb.3
PAUSE 500
LOW PORTB.3
PAUSE 500
RETURN

is Ok,code working,
but how I do it,when I switch button,to change program,and stay work in this some of this program?