I think this is what you are looking for. In the manual under "Ports and other Registers".

Code:
anyvar = PORTB & $0f   'Isolate lower 4 bits of PORTB and place result into anyvar
$0f = 00001111
$00ff = 11111111

Now you can check "anyvar" for changes.