org 00h
loop:
mov a,p1
mov b,p1
anl a,#00000010b
anl b,#00000001b
rr a
mov r0,b
xrl a,r0
jnz bits
bits:
setb p2.0
sjmp loop