About PIC programming
The compiler doesn't know what the variables TRISABITS etc are, which means you didn't tell the compiler about them. This is usually done by including the appropriate file given by Microchip. For example, in my header files I have:

#include &lt;p18f47j13.h&gt;  // For a PIC18F47J13


It might be easier to use MPLAB X from Microchip and use their project wizard to start your project. MPLAB X will make sure that the mentioned include file is there.