DQRT:
MOV R2,#10H
MOV R3,#00H
CLR A
MOV R0,A
MOV R1,A
MOV R4,#01H
LOOP:
MOV A,R4
MOV R1,A
ADD A,R1
DA A
MOV R1,A
MOV A,#9AH
SUBB A,#01H
ADD A,R1
DA A
CPL C
MOV R1,A
JNC C,LOOP0
INC R0
LOOP0:
CLR C
MOV A,#9AH
SUBB A,R1
ADD A,R3
DA A
CPL C
MOV R3,A
MOV A,#9AH
SUBB A,R0
ADD A,R2
DA A
CPL C
MOV R2,A
JC A,LOOP1
MOV A,R4
ADD A,#01H
DA A
MOV R4,A
SJMP LOOP
LOOP1:
CLR C
MOV A,#9AH
SUBB A,#01H
ADD A,R4
DA A
CPL C
MOV R4,A
RET