MUL(unsigned char L_MUL)
{
#asm
MOVF _dute,W
CLRF _H_MUL
CLRF _P_COUNT
BSF _P_COUNT,3
RRF _L_MUL,F
COUNT:
BTFSC _STATUS,0
ADDWF _H_MUL,F
RRF _H_MUL,F
RRF _L_MUL,F
DECFSZ _P_COUNT,F
GOTO COUNT
MOVF _H_MUL,W
BTFSC _L_MUL,7
ADDLW 1
MOVWF _H_MUL
// MOVWF _L_MUL
#endasm
return H_MUL ;
}
求大虾解释一下上面程序,用C51 怎么写, 如 L_MUL =100, 返回值H_MUL 是怎么计算得出。求大虾指教一下。谢谢 |