PIC Microcontroller Bit Math Methods

#define BIT(addr,bit) bit
#define ADDR(addr,bit) addr
#define MASK(addr,bit) 1<<(bit)

Then:

#define myflag somereg,5

	movlw BIT(myflag)	
	movf ADDR(myflag),w	
	andlw MASK(myflag)	

	etc...

see also: