HEXTOBCDD: CLR A MOV R3,A MOV R4,A MOV R5,A MOV R2,#10H HB3: MOV A,R7 RLC A MOV R7,A MOV A,R6 RLC A MOV R6,A MOV A,R5 ADDC A,R5 DA A MOV R5,A MOV A,R4 ADDC A,R4 DA A MOV R4,A MOV A,R3 ADDC A,R3 MOV R3,A DJNZ R2,HB3 RET