DIV16F: ACALL DIV16L PUSH 7 PUSH 6 MOV R7,#0 MOV R6,#0 ACALL DIV16L MOV 3,R7 MOV 7,R6 POP 5 POP 6 MOV R4,#90H MOV R2,#32 DIV16L: MOV A,R5 JB ACC.7,NMLDN MOV A,R3 ADD A,R3 MOV R3,A LCALL H0 DEC R4 DJNZ R2,DIV16L MOV R4,#0 RET NMLDN: MOV A,R3 JNB ACC.7,DIVRT LCALL INC3 MOV A,R5 JNZ DIVRT INC R4 DIVRT: ANL 5,#7FH RET DIV24: CLR A MOV B,#24;计数器 LXP: LCALL SHIF XCH A,R4 RLC A XCH A,R4 RLC A JNC LXP1 ACALL SUB2Y SJMP DIV0 LXP1: ACALL SUB2Y JNC DIV0 XCH A,R4 ADD A,R3 XCH A,R4 ADDC A,R2 SJMP DIV1 DIV0: INC R7 DIV1: DJNZ B,LXP XCH A,R4 CLR C RLC A XCH A,R4 RLC A JC GIN ACALL SUB2Y JNC GIN RET3: MOV R4,#0 RET GINC: MOV R0,#7 INC3A: INC @R0 CJNE @R0,#0,RET3 DEC R0 SJMP INC3A SUB2Y: CLR C XCH A,R4 SUBB A,R3 XCH A,R4 SUBB A,R2 RET