I have it working. The solution was to replace PORTB abd PORTA with LATB and LATA.

This is a major omission from the compiler docs.

-Sterling