FLN: 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 JB 1FH,LNOV MOV A,R3 ORL A,R4 JNZ LN0 LNOV: SETB OV RET LN0: CLR C LCALL RL1 CLR A XCH A,R2 PUSH ACC ;规格化 RLNORM: MOV A,R3 ORL A,R4 JNZ RLNORM1 MOV R2,#0C1H RET RLNORM1: MOV A,R3 JB ACC.7,RLNORM2 CLR C LCALL RL1 SJMP RLNORM RLNORM2: CLR OV RET RL1: MOV A,R4 RLC A MOV R4,A MOV A,R3 RLC A MOV R3,A DEC R2 CJNE R2,#0C0H,RL1E CLR A MOV R3,A MOV R4,A MOV R2,#0C1H RL1E: 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 CLR A INC DPTR FPLN: POP DPH POP DPL XCH A,R0 XCH A,R1 XCH A,R0 CLR A MOV R2,A MOV R3,A MOV R4,A CLR 1FH PLN1: CLR A MOVC A,@A+DPTR MOV C,ACC.7 MOV 1EH,C MOV C,ACC.6 MOV ACC.7,C MOV R5,A INC DPTR CLR A MOVC A,@A+DPTR MOV R6,A INC DPTR CLR A MOVC A,@A+DPTR MOV R7,A INC DPTR MOV C,1EH RRC A XRL A,23H RLC A MOV F0,C AS1: MOV A,R6 ORL A,R7 JZ MOV0 MOV A,R3 ORL A,R4 JNZ EQ1 MOV A,R6 MOV R3,A MOV A,R7 MOV R4,A MOV A,R5 MOV R2,A MOV C,1EH MOV 1FH,C CLR A MOVC A,@A+DPTR CJNE A,#40H,PLN2 XCH A,R0 XCH A,R1 XCH A,R0 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 CLR A INC DPTR PLN2: MOV A,@R1 XRL A,23H RLC A MOV 1FH,C LCALL MUL0 SJMP PLN1 FLOG: 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 JB 1FH,LNOV MOV A,R3 ORL A,R4 JNZ LN0 LNOV: SETB OV JNB OV,LOG RET MUL0: LCALL MVR1 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 DB 7BH,0F4H,30H DB 0FEH,85H,13H DB 7FH,91H,51H DB 0FFH,0FAH,0BAH DB 0,0FFH,0CAH DB 70H,0C0H,0 DB 40H POP ACC JNZ LN1 RET LN1: CLR 1EH MOV C,ACC.7 MOV F0,C JNC LN2 CPL A INC A LN2: MOV R2,A MOV B,#72H MUL AB XCH A,R2 MOV R7,B MOV B,#0B1H MUL AB ADD A,R7 MOV R7,A CLR A ADDC A,B MOV R6,A MOV R5,#8 LN3: JB ACC.7,LN4 MOV A,R2 RLC A MOV R2,A MOV A,R7 RLC A MOV R7,A MOV A,R6 RLC A MOV R6,A DEC R5 SJMP LN3 LN4: MOV C,F0 MOV ACC.7,C LJMP ASN JNB OV,LOG RET FPLN: POP DPH POP DPL XCH A,R0 XCH A,R1 XCH A,R0 CLR A MOV R2,A MOV R3,A MOV R4,A CLR 1FH PLN1: CLR A MOVC A,@A+DPTR MOV C,ACC.7 MOV 1EH,C MOV C,ACC.6 MOV ACC.7,C MOV R5,A INC DPTR CLR A MOVC A,@A+DPTR MOV R6,A INC DPTR CLR A MOVC A,@A+DPTR MOV R7,A INC DPTR MOV C,1EH RRC A XRL A,23H RLC A MOV F0,C AS1: MOV A,R6 ORL A,R7 JZ MOV0 MOV A,R3 ORL A,R4 JNZ EQ1 MOV A,R6 MOV R3,A MOV A,R7 MOV R4,A MOV A,R5 MOV R2,A MOV C,1EH MOV 1FH,C CLR A MOVC A,@A+DPTR CJNE A,#40H,PLN2 XCH A,R0 XCH A,R1 XCH A,R0 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 CLR A INC DPTR JMP @A+DPTR PLN2: MOV A,@R1 XRL A,23H RLC A MOV 1FH,C LCALL MUL0 SJMP PLN1 FLOG: 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 JB 1FH,LNOV MOV A,R3 ORL A,R4 JNZ LN0 LNOV: SETB OV JNB OV,LOG RET MUL0: LCALL MVR1 ML1: MOV A,R3 ORL A,R4 JZ ML6 MOV A,R6 ORL A,R7 JZ ML5 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,ML2 MOV A,R7 RLC A MOV R7,A LCALL RL1 MUL2: MOV A,R7 JNB ACC.7,ML3 INC R4 MOV A,R4 JNZ ML3 INC R3 MOV A,R3 JNZ ML3 MOV R3,#80H INC R2 ML3: MOV A,R2 ADD A,R5 MD: MOV R2,A JB ACC.7,ML4 JNB ACC.6,ML6 MOV R2,#3FH SETB OV RET MUL4: JB ACC.6,ML6 ML5: CLR A MOV R3,A MOV R4,A MOV R2,#41H ML6: CLR OV RET