Not sure exactly what result you are looking for by combining the ports? Something like this might work.

Code:
variable var byte
variable.bit2 = porta.1 : variable.bit1 = portb.1 : variable.bit0 = portb.3