RTOD:
MOV R5,#6
MOV R6,#0E5H
MOV R7,#2FH
DR:
MOV A,@R0
MOV C,ACC.7
MOV 1FH,C
MOV C,ACC.6
MOV ACC.7,C
MOV R2,A
INC R0
MOV A,@R0
MOV R3,A
INC R0
MOV A,@R0
MOV R4,A
DEC R0
DEC R0
CLR 1EH
;通过乘法进行转换
MUL1:
MOV A,R3
ORL A,R4
JZ MUL6
MOV A,R6
ORL A,R7
JZ MUL5
MOV A,R7
MOV B,R4
MUL AB
MOV A,B
XCH A,R7
MOV B,R3
MUL AB
ADD A,R7
MOV R7,A
CLR A
ADDC A,B
XCH A,R4
MOV B,R6
MUL AB
ADD A,R7
MOV R7,A
MOV A,B
ADDC A,R4
MOV R4,A
CLR A
RLC A
XCH A,R3
MOV B,R6
MUL AB
ADD A,R4
MOV R4,A
MOV A,B
ADDC A,R3
MOV R3,A
JB ACC.7,MUL2
MOV A,R7
RLC A
MOV R7,A
LCALL RL1
MUL2:
MOV A,R7
JNB ACC.7,MUL3
INC R4
MOV A,R4
JNZ MUL3
INC R3
MOV A,R3
JNZ MUL3
MOV R3,#80H
INC R2
MUL3:
MOV A,R2
ADD A,R5
MD:
MOV R2,A
JB ACC.7,MUL4
JNB ACC.6,MUL6
MOV R2,#3FH
SETB OV
RET
MUL4:
JB ACC.6,MUL6
MUL5:
CLR A
MOV R3,A
MOV R4,A
MOV R2,#41H
MUL6:
CLR OV
RET
MOV0:
INC R0
INC R0
MOV A,R4
MOV @R0,A
DEC R0
MOV A,R3
MOV @R0,A
DEC R0
MOV A,R2
MOV C,1FH
MOV ACC.7,C
MOV @R0,A
CLR ACC.7
CLR OV
CJNE A,#3FH,MV01
SETB OV
MV01:
MOV A,@R0
END