SDADD:
MOV R4,#00H
MOV R5,#40H
MOV R6,#60H
MOV R7,#01H
MOV 20H,R4
MOV 21H,R5
ACALL COMP
MOV R4,20H
MOV R5,21H
MOV 20H,R6
MOV 21H,R7
ACALL COMP
CLR C
MOV A,R4
ADD A,20H
JB D2,LOOP
ACALL COMP
MOV R4,20H
MOV R5,21H
RET
LOOP:
MOV R4,#0FFH
MOV R5, #0FFH
RET
COMP:
CLR C
MOV A,20H
RLC A
MOV 20H,A
MOV A,21H
RLC A
MOV 21H,A
JNC C,LOOP1
ACALL NEGNVM
LOOP1:
MOV A,21H
RRC A
MOV 20H,A
RET
NEGNVM:
MOV R0,20H
MOV R1,21H
CLR C
CLR A
MOV 20H,A
MOV 21H,A
MOV A,20H
SUBB A,R0
MOV 20H,A
MOV A,21H
NOP
SUBB A,R1
MOV 21H,A
RET