I like to use the #define directive to assign pins.
For your example, it would be,
Code:
#define LED PORTB,0
#define RELAY PORTB,1
#define SW1 PORTA,0
#define SW2 PORTA,1
;turn on LED
bsf LED
;test SW1
btfss SW1
Personally, I like to indicate that the variable is a bit variable by preceding the name with b_ so, LED would become b_LED. In most projects I use bit variables quite a lot. In a recent project I had the following bit variables.
If you are using MPLAB, use Help -> Topics -> MSASM Assembler. #Define is but one of many assembler directives. No need for them to be mysterious anymore.
I was just checking out the easypic4 that gramo has been talking about on www.mikroe.com and found some great online books on the subject. PIC Microcontrollers seems to be pretty staight forward and easy to reference. And its FREE!! Thanks, guys!