Code:
MyInput  var Byte   
TestLoop var byte

Start:
    MyInput = PORTA
    For testloop = 0 to 7
        PORTB.0[testloop]=Myinput.0[TestLoop] ' send the state of the bit to
                                              ' the according PORTB bit
    next
    goto start