Hi Gert,

I think this is what you may be after:
Code:
' ---------- [ I/O Definition ] ----------
TRISC = %00000001       ' Set PORTC (0-2 input) rest Outputs
PORTB = 0

' ---------- [ System Inputs ] ----------
Switch      Var PORTC.0         ' Momentary Switch on PORTC.0


' ---------- [ System Outputs ] ----------
RedLED      VAR PORTB.1     ' All LEDs connected
                            ' between RC pins and
                            ' ground via resistor

Main:
    If Switch=1 Then                      ' If button is pressed:
        Toggle RedLED                     ' Toggle the LED
        loop: If Switch=1 Then Goto loop  ' Wait until the button is released
    Endif
Goto Main
Regards,

Steve