-
MBTEG:
MOV R2,#00H
LOOP0:
INC @R0
DEC R0
MOV A,R7
MOV R6,A
MOV A,@R0
MOV C,ACC. 7
LOOP1:
RRC A
MOV @R0,A
DEC R0
MOV A,@R0
DJNZ R6,LOOP1
MOV A,R2
RR
http://www.codebf.com/read/4755/39608
-
FLTSUB:
SETB F0
AS:
LCALL MVR1
MOV C,F0
RRC A
XRL A,@R1
MOV C,ACC.7
ASN:
MOV 1EH,C
XRL A,@R0
RLC A
MOV F0,C
LCALL MVR0
LCALL AS1
http://www.codebf.com/read/4755/39609
-
;1定点数规格化
FXDN:
LD 2CH,#40A0H
LOOP:
JBS 2BH,7,LOOP1
SHLL 24H,#1
ADDC 28H,28H
ADDC 2AH,2AH
DECB 2CH
DJNZ 2DH,LOOP
CLR 2CH;0
LOOP1:
RET
2定点数规格化实例
FLTRLN:
MOV A,R3
OR
http://www.codebf.com/read/4755/39610
-
MOV A,R7
MOV B,#08H
MUL AB
DEC A
INC R0
MOV @R0,A
NOM0:
DEC R0
MOV A,@R0
JNB ACC.7,LOOP1
JB ACC.6,LOOP4
LOOP0:
INC R0
RET
LOOP1:
JB ACC.6,LOOP0
INC R0
ACALL LOOP7
AC
http://www.codebf.com/read/4755/39611
-
NGLP1:
MOV A,#99H
SUBB A,@R0
MOV @R0,A
DEC R0
DJNZ R1,NGLP1
INC R0
INC R0
INC R0
MOV R1,#3
SETB C
NGLP2:
CLR A
ADDC A,@R0
DA A
MOV @R0,A
D
http://www.codebf.com/read/4755/39612
-
BCDRL10:
MOV A,R7
MOV R2,A
ADD A,R0
MOV R0,A
MOV R3,#0
BCDRL1:
DEC R0
MOV A,@R0
SWAP A
MOV @R0,A
MOV A,R3
XCHD A,@R0
MOV R3,A
http://www.codebf.com/read/4755/39613
-
FXDTOFLT:
MOV R2,A
MOV A,@R0
MOV R3,A
INC R0
MOV A,@R0
MOV R4,A
DEC R0
FLTRLN:
MOV A,R3
ORL A,R4
JNZ RLN1
MOV R2,#0C1H
RET
RLN1:
MOV A,R3
JB A
http://www.codebf.com/read/4755/39614
-
FLTRRN:
MOV A,R3
ORL A,R4
JNZ RLN1
MOV R2,#0C1H
RET
RLN1:
MOV A,R3
JB ACC.7,RLN2
CLR C
LCALL RL1
SJMP RLN
RLN2:
CLR OV
RET
MOV A,R3
RRC A
http://www.codebf.com/read/4755/39615
-
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
http://www.codebf.com/read/4755/39616
-
FRCL:
CLR C
MOV A,R7
RLC A
MOV R7,A
MOV A,R6
RLC A
MOV R6,A
MOV A,R3
RLC A
MOV R3,A
MOV A,R2
RLC A
MOV R2,A
RET
http://www.codebf.com/read/4755/39617