This would probably waste too much port space but you could reverse the 'w' register in two instructions if you wired two ports together like this: RA0->RB7 RA1->RB6 RA2->RB5 RA3->RB4 RA4->RB3 RA5->RB2 RA6->RB1 RA7->RB0 and executed the code sequence mov RA,W mov w,RB