Plus ça change, plus c'est pareil...

KeyWord: Datasheet

Not ALL PORTA pins are true output... and on PORTB there's this PGM pin who could do nasty thingy if your CONFIG FUSES aren't set properly...

About them (Config fuses) Where are they?!?

Are we talking about a 877 or 877A ?

And finnally... you want to manually assign value to your PORT BEFORE doing anything else... say BEFORE the PAUSE 1000. Usually

PORTA=0
PORTB=0
...
TRISA=0
TRISB=0
....
Variable and all other code here.

Bonne chance