I found this code which makes accessing port pins simple and clear.
I have read many times that you cannot use bit pointers in XC8, but this code seems to do just that. How does this code work?
Code:
// n = name to be used, x = Port name, y = Pin number
#define PIN(n,x,y) static volatile bit n @ (unsigned)&x*8+y
PIN(LED1, PORTC, 6);
LED1 = 1;