...
ORG 00H
SJMP START
ORG 30H
START
       CLR A                           ;clear the acc.
       MOV P2,#00000000B               ;clear port 2
       MOV P1,#00000000B               ;clear port 1
       SETB P1.0                       ;send 1 on the load shift pin 
       CLR P1.1                        ;set clock to low level
       CLR P1.3                        ;clear datain pin               
       MOV B,#8                        ;start 8 bit counter
       CLR 1.0                         ;send low bit to load shift
       SETB 1.0                        ;sed hi bit to load shift
       SETB 1.1                        ;set clock bit to hi(first bit is on data pin now)
READ                                   ;start reading routin
       MOV C,P1.3                      ;mov data to carry reg.
       SETB P1.1                       ;start seconed clock
       CLR P1.1                        ;finish the seconed clock
       RRC A                           ;rotate the acc with carry to right
       DJNZ B,READ                     ;decremint the 8 bit counter
       MOV P2,A                        ;send the data parallel to port 2
SJMP READ                              ;go back to read again.
END                                    ;   END 
