Is there a set of code instructions for THE PBP demo version?

I'm trying to get an understanding of GPIO and the register TRISIO. If you set a TRISIO bit low you make the corresponding GPIO pin an output (I think) Except GP3 which is always an INPUT.

I've got a very blurred picture of how this all fits together, one day the fog will lift.... I hope.

Dave