;R1R0 / R2 --> R3
ORG 0000H
MOV R1, #12H
MOV R0, #34H
MOV R2, #78H
CALL R10_DIV_R2_TO_R3
;R3 = 26H
NOP
SJMP $
R10_DIV_R2_TO_R3:
MOV R3, #0
_D1:
CLR C
MOV A, R0
SUBB A, R2
MOV R0, A
MOV A, R1
SUBB A, #0
MOV R1, A
JC _D2
INC R3
SJMP _D1
_D2:
RET
END
;R1R0 / R2 --> R3
ORG 0000H
MOV R1, #12H
MOV R0, #34H
MOV R2, #78H
CALL R10_DIV_R2_TO_R3
;R3 = 26H
NOP
SJMP $
R10_DIV_R2_TO_R3:
MOV R3, #0
_D1:
CLR C
MOV A, R0
SUBB A, R2
MOV R0, A
MOV A, R1
SUBB A, #0
MOV R1, A
JC _D2
INC R3
SJMP _D1
_D2:
RET
END