MBCDB:
LCALL NEG1
LCALL MBCDADD
CPL C
MOV F0,C
LCALL NEG1
MOV C,F0
RET
NEG1:
MOV A,R0
XCH A,R1
XCH A,R0
LCALL NEG
MOV A,R0
XCH A,R1
XCH A,R0
RET
BCDSB:
CLR F0
MOV R0,#7
ACALL NEG3
JC BSBRT
MOV A,R4
ADD A,R7
DA A
MOV R4,A
MOV A,R3
ADDC A,R6
DA A
MOV R3,A
MOV A,R2
ADDC A,R5
DA A
MOV R2,A
JC BSBRT
MOV R0,#4
SETB F0
NEG3:
MOV R1,#3
CLR C
NGLP0:
MOV A,#99H
SUBB A,@R0
MOV @R0,A
DEC R0
DJNZ R1,NGLP0
INC R0
INC R0
INC R0
MOV R1,#3
SETB C
NGLP1:
CLR A
ADDC A,@R0
DA A
MOV @R0,A
DEC R0
DJNZ R1,NGLP1
BSBRT:
RET