I finally found a nice example here:
http://picbasic.com/resources/articles/brainart.htm


setb rp0 ;change to register page 1
mov trisb,#00001111b ;make the bottom 4 bits on PortB inputs and the top 4 outputs
clrb rp0 ;change back to register page 0
;
clrb portb.4 ;start with output low and LED off
;
loop jnb portb.0,loop ;jump to loop if switch on PortB.0 is low
jnb portb.1,loop ;jump to loop if switch on PortB.1 is low
;
; if we got here then both switches are high
;
setb portb.4 ;set output high to turn on LED


Robert