loop clrb clk
mov temp,rb ;read the 0831
setb clk
rl temp
rr data ;shift data to the right (rb.7 is
the input)
djnz trk,loop ;is loop over if not loop again
mov flash,data ;save data
ret ;return to the main program