再余数/5
MOV R0, #DATA_GROUP(0) MOV MSB_DATA, #0 MOV LSB_DATA, #0 MOV R2, #5 DIV-LOOP: CLR C MOV A, @R0 MOV B, #5 DIV AB ADD A, MSB_DATA MOV MSB_DATA, A MOV A, B ADD A, LSB_DATA MOV LSB_DATA, A INC R0 DJNZ R2, DIV-LOOP MOV A, LSB_DATA MOV B, #5 DIV AB ADD A, MSB_DATA MOV MSB, A RET
|