Hey, thanks for the reply and for showing the progression from functional to elegant. But would you mind verifying my logic?

Since I'm an unsophisticated person, I want to make sure I understand what's going on in the following snippet. Variables get declared, TRIS set and then LED1= !LED1 sets a 1, because its prior value was 0, turning on LED1. LED2= ! LED1 turns off LED2 because it's value is set to 1 in the previouse line. Then it loops and the !LED1 keeps toggling the state of LED1 and LED2.

Is that close? Is it necessary to set the gpio.0 or gpio.6 to 0 to make sure they turn off at start up?


.. again in a more sophisticated way:

Code:
LED1 VAR GPIO.0
LED2 VAR GPIO.6

TRISIO = %00011110

main:
LED1 = !LED1
LED2 = !LED1
PAUSE 500
GOTO MAIN

END
Cheers

Al.[/QUOTE]