Có pro nào hiểu giải thích giúp e đoạn mã code này với
Sơ đồ 1 kiểu kí hiệu lable code 1 kiểu nên e không biết tên chỗ nào vào chỗ nào nữa
;================================================= =============================
ORG 00120H
L0120:
CLR A
MOV 00AH,A
MOV 00BH,A
L0125:
CLR C
MOV A,00BH
SUBB A,R7
MOV A,R6
XRL A,#080H
MOV R0,A
MOV A,00AH
XRL A,#080H
SUBB A,R0
JNC L013E
INC 00BH
MOV A,00BH
JNZ L0125
INC 00AH
SJMP L0125
L013E:
RET
;================================================= =============================
ORG 00158H
L0158:
JB P1.4,L0164
L015B:
JNB P1.4,L015B
MOV 008H,#000H
MOV 009H,#001H
L0164:
RET
L0165:
JB P1.5,L0171
L0168:
JNB P1.5,L0168
MOV 008H,#000H
MOV 009H,#002H
L0171:
RET
;================================================= =============================
ORG 00096H
L0096:
MOV A,009H
XRL A,#002H
ORL A,008H
JNZ L00A0
MOV P0,A
L00A0:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L00C0
MOV A,00DH
XRL A,#003H
ORL A,00CH
JNZ L00C0
MOV P0,#0AAH
MOV R7,#0F4H
MOV R6,#001H
LCALL L0120
MOV P0,#055H
LCALL L0120
L00C0:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L00DF
MOV A,00DH
XRL A,#004H
ORL A,00CH
JNZ L00DF
MOV P0,A
MOV R7,#0A0H
MOV R6,#00FH
LCALL L0120
MOV P0,#0FFH
LCALL L0120
L00DF:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L00FF
MOV A,00DH
XRL A,#005H
ORL A,00CH
JNZ L00FF
MOV P0,#0F0H
MOV R7,#070H
MOV R6,#017H
LCALL L0120
MOV P0,#00FH
LCALL L0120
L00FF:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L011F
MOV A,00DH
XRL A,#006H
ORL A,00CH
JNZ L011F
MOV P0,#068H
MOV R7,#020H
MOV R6,#04EH
LCALL L0120
MOV P0,#097H
LCALL L0120
L011F:
RET
;================================================= =============================
ORG 0013FH
L013F:
CLR A
MOV P0,A
MOV IE,#089H
SETB IT0
MOV IP,#001H
L014A:
JB P1.4,L014A
L014D:
LCALL L0158
LCALL L0165
LCALL L0096
SJMP L014D
;================================================= =============================
ORG 00003H
LJMP L0006
L0006:
PUSH ACC
PUSH PSW
MOV PSW,#000H
PUSH 006H
PUSH 007H
JB P1.0,L0030
JB P1.2,L001B
MOV R7,#001H
SJMP L001D
L001B:
MOV R7,#000H
L001D:
JB P1.1,L0024
MOV R6,#001H
SJMP L0026
L0024:
MOV R6,#000H
L0026:
MOV A,R6
ANL A,R7
JZ L0030
MOV 00CH,#000H
MOV 00DH,#003H
L0030:
JNB P1.0,L004F
JB P1.2,L003A
MOV R7,#001H
SJMP L003C
L003A:
MOV R7,#000H
L003C:
JB P1.1,L0043
MOV R6,#001H
SJMP L0045
L0043:
MOV R6,#000H
L0045:
MOV A,R6
ANL A,R7
JZ L004F
MOV 00CH,#000H
MOV 00DH,#004H
L004F:
JB P1.0,L006E
JB P1.2,L0059
MOV R7,#001H
SJMP L005B
L0059:
MOV R7,#000H
L005B:
JNB P1.1,L0062
MOV R6,#001H
SJMP L0064
L0062:
MOV R6,#000H
L0064:
MOV A,R6
ANL A,R7
JZ L006E
MOV 00CH,#000H
MOV 00DH,#005H
L006E:
JNB P1.0,L008D
JB P1.2,L0078
MOV R7,#001H
SJMP L007A
L0078:
MOV R7,#000H
L007A:
JNB P1.1,L0081
MOV R6,#001H
SJMP L0083
L0081:
MOV R6,#000H
L0083:
MOV A,R6
ANL A,R7
JZ L008D
MOV 00CH,#000H
MOV 00DH,#006H
L008D:
POP 007H
POP 006H
POP PSW
POP ACC
RETI
;================================================= =============================
ORG 00000H
LJMP L0172
ORG 00172H
L0172:
MOV R0,#07FH
CLR A
L0175:
MOV @R0,A
DJNZ R0,L0175
MOV SP,#00DH
LJMP L013F
END
;================================================= =============================
Sơ đồ 1 kiểu kí hiệu lable code 1 kiểu nên e không biết tên chỗ nào vào chỗ nào nữa
;================================================= =============================
ORG 00120H
L0120:
CLR A
MOV 00AH,A
MOV 00BH,A
L0125:
CLR C
MOV A,00BH
SUBB A,R7
MOV A,R6
XRL A,#080H
MOV R0,A
MOV A,00AH
XRL A,#080H
SUBB A,R0
JNC L013E
INC 00BH
MOV A,00BH
JNZ L0125
INC 00AH
SJMP L0125
L013E:
RET
;================================================= =============================
ORG 00158H
L0158:
JB P1.4,L0164
L015B:
JNB P1.4,L015B
MOV 008H,#000H
MOV 009H,#001H
L0164:
RET
L0165:
JB P1.5,L0171
L0168:
JNB P1.5,L0168
MOV 008H,#000H
MOV 009H,#002H
L0171:
RET
;================================================= =============================
ORG 00096H
L0096:
MOV A,009H
XRL A,#002H
ORL A,008H
JNZ L00A0
MOV P0,A
L00A0:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L00C0
MOV A,00DH
XRL A,#003H
ORL A,00CH
JNZ L00C0
MOV P0,#0AAH
MOV R7,#0F4H
MOV R6,#001H
LCALL L0120
MOV P0,#055H
LCALL L0120
L00C0:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L00DF
MOV A,00DH
XRL A,#004H
ORL A,00CH
JNZ L00DF
MOV P0,A
MOV R7,#0A0H
MOV R6,#00FH
LCALL L0120
MOV P0,#0FFH
LCALL L0120
L00DF:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L00FF
MOV A,00DH
XRL A,#005H
ORL A,00CH
JNZ L00FF
MOV P0,#0F0H
MOV R7,#070H
MOV R6,#017H
LCALL L0120
MOV P0,#00FH
LCALL L0120
L00FF:
MOV A,009H
XRL A,#001H
ORL A,008H
JNZ L011F
MOV A,00DH
XRL A,#006H
ORL A,00CH
JNZ L011F
MOV P0,#068H
MOV R7,#020H
MOV R6,#04EH
LCALL L0120
MOV P0,#097H
LCALL L0120
L011F:
RET
;================================================= =============================
ORG 0013FH
L013F:
CLR A
MOV P0,A
MOV IE,#089H
SETB IT0
MOV IP,#001H
L014A:
JB P1.4,L014A
L014D:
LCALL L0158
LCALL L0165
LCALL L0096
SJMP L014D
;================================================= =============================
ORG 00003H
LJMP L0006
L0006:
PUSH ACC
PUSH PSW
MOV PSW,#000H
PUSH 006H
PUSH 007H
JB P1.0,L0030
JB P1.2,L001B
MOV R7,#001H
SJMP L001D
L001B:
MOV R7,#000H
L001D:
JB P1.1,L0024
MOV R6,#001H
SJMP L0026
L0024:
MOV R6,#000H
L0026:
MOV A,R6
ANL A,R7
JZ L0030
MOV 00CH,#000H
MOV 00DH,#003H
L0030:
JNB P1.0,L004F
JB P1.2,L003A
MOV R7,#001H
SJMP L003C
L003A:
MOV R7,#000H
L003C:
JB P1.1,L0043
MOV R6,#001H
SJMP L0045
L0043:
MOV R6,#000H
L0045:
MOV A,R6
ANL A,R7
JZ L004F
MOV 00CH,#000H
MOV 00DH,#004H
L004F:
JB P1.0,L006E
JB P1.2,L0059
MOV R7,#001H
SJMP L005B
L0059:
MOV R7,#000H
L005B:
JNB P1.1,L0062
MOV R6,#001H
SJMP L0064
L0062:
MOV R6,#000H
L0064:
MOV A,R6
ANL A,R7
JZ L006E
MOV 00CH,#000H
MOV 00DH,#005H
L006E:
JNB P1.0,L008D
JB P1.2,L0078
MOV R7,#001H
SJMP L007A
L0078:
MOV R7,#000H
L007A:
JNB P1.1,L0081
MOV R6,#001H
SJMP L0083
L0081:
MOV R6,#000H
L0083:
MOV A,R6
ANL A,R7
JZ L008D
MOV 00CH,#000H
MOV 00DH,#006H
L008D:
POP 007H
POP 006H
POP PSW
POP ACC
RETI
;================================================= =============================
ORG 00000H
LJMP L0172
ORG 00172H
L0172:
MOV R0,#07FH
CLR A
L0175:
MOV @R0,A
DJNZ R0,L0175
MOV SP,#00DH
LJMP L013F
END
;================================================= =============================
Comment