'{$STAMP BS2}
'{$PBASIC 2.0}
'Program 1
Cnt VAR BYTE
PB1 VAR IN1
LED1  CON 4

INPUT 1
OUTPUT 4

LOW LED1

Start:
  IF PB1 = 0 THEN Start
  GOSUB Blink_LED1
GOTO Start

Blink_LED1:
  FOR Cnt = 1 TO 5
    HIGH LED1
    PAUSE 1000
    LOW LED1
    PAUSE 1000
  NEXT

RETURN