Hi,
Another aproach is to use the interrupt mechanism as a way to "latch" the buttonpress but then not actually enable the interrupt itself but instead poll the interrupt flag to determine if the button was pressed.
Code:
State VAR BYTE
Main:
If INTCON.1 = 1 THEN ' GP2 input interrupt
INTCON.1 = 0 ' Clear flag
State = State + 1
If State = 3 THEN State = 0
ENDIF
SELECT CASE State
Case 0
HIGH LED
PAUSE 50
LOW LED
PAUSE 50
CASE 1
HIGH LED
PAUSE 100
LOW LED
PAUSE 100
CASE 2
HIGH LED
PAUSE 150
LOW LED
PAUSE 150
GOTO MAIN
Bookmarks