ORG 0000H
CLR C
MOV R1, #00H
MOV DPTR, #0030H
MOVX A, @DPTR
MOV R0, A
INC DPTR
MOVX A, @DPTR
SUBB A, R0
JNC OVER1
INC R1
CPL A
ADD A, #01H
MOV DPTR, #0090H
MOVX @DPTR, A
MOV A, R1
MOV R7, A
OVER1: MOV DPTR, #0090H
MOVX @DPTR, A
MOV A, R1
MOV R7, A
MOV DPTR, #0032H
MOVX A, @DPTR
MOV R2, A
INC DPTR
MOVX A, @DPTR
MOV R3, A
MOV A, R2
ADD A, R7
MOV R2, A
MOV A, R3
SUBB A, R2
JNC OVER2
INC R4
CPL A
MOV A, #01H
MOV DPTR, #0091H
MOVX @DPTR, A
MOV A, R4
INC DPTR
MOVX @DPTR, A
OVER2: MOV DPTR, #0091H
MOVX @DPTR, A
MOV A, R4
INC DPTR
MOVX @DPTR, A
MOV PCON, #02H
No comments:
Post a Comment