PIC的BINTOBCD子程序;**********二进制转换成BCD码子程序,入口W*****;********出口为R2,R1,R0寄存器BINTOB     movwf   buf_read      ;W->buf_read           clrf    R0           clrf    R1           clrf    R2           movlw   08h           movwf   counter_publoopc      bcf     STATUS,C           rlf     buf_read,1           rlf     R0           rlf     R1           decfsz  counter_pub,1           goto    adjdec           movlw   0fh           andwf   R1,0           movwf   R2           swapf   R0,0           movwf   R1           movlw   0fh           andwf   R0,1           andwf   R1,1           returnadjdec     movlw   03h           addwf   R0,1           btfsc   R0,3           goto    next_r0           subwf   R0,1next_r0    movlw   030h           addwf   R0,1           btfsc   R0,7           goto