Well, if you've got a 0-5v swing on the correct pin, then you know your external environment is OK. My blinky LED code will check if the PIC is working and you've not got a blown pin.

The 648 is basically a 4K version of the 628. There's nothing mysterious about it. CMCON and TRISA are the controlling factors for PORTA.

Strip your code down to the basics, you could have something setting the ports to output without even realising... Example... Instead of MyVar=PortA, putting PortA=MyVar can really ruin your day and you end up looking for phantom bugs for the next week because you can't see what you've done.