SDSUB:
MOV R4,#20H
MOV R5,#80H
MOV R6,#0FDH
MOV R7,#71H
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
SUBB A,20H
MOV A,R5
SUBB A,21H
MOV 21H,A
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