rg 000000
MOV P0,#0FFH
MOV P1,#0FFH
MOV P2,#00H
setb p2.4
setb p2.5
setb p3.0
setb p3.1
clr p3.2
clr p3.3
clr p3.4
clr p3.5
clr p3.6
clr p3.7
RET
MAIN:
JNB P1.0,ct1
JNB P1.1,ct2
JNB P1.2,ct3
JNB P1.3,ct4
JNB P1.4,ct5
JNB P1.5,ct6
JNB P1.6,ct7
JNB P1.7,ct8
JNB P3.0,ct9
JNB P3.1,ct10
JNB P0.0,ct11
JNB P0.1,ct12
JNB P0.2,ct13
JNB P0.3,ct14
JNB P0.4,ct15
JNB P0.5,ct16
JNB P0.6,ct17
JNB P0.7,ct18
JNB P2.4,ct19
JNB P2.5,ct20
RET
LJMP MAIN
jmp ct1
jmp ct2
jmp ct3
jmp ct4
jmp ct5
jmp ct6
jmp ct7
jmp ct8
jmp ct9
jmp ct10
jmp ct11
jmp ct12
jmp ct13
jmp ct14
jmp ct15
jmp ct16
jmp ct17
jmp ct18
jmp ct19
jmp ct20
RET
ct14:
clr P3.5
LJMP MAIN
ct15:
clr P3.6
LJMP MAIN
ct16:
clr P3.7
LJMP MAIN
ct17:
clr P2.0
LJMP MAIN
ct18:
clr P2.1
LJMP MAIN
ct19:
clr P2.2
LJMP MAIN
ct20:
clr P2.3
LJMP MAIN
ct13:
clr P3.4
LJMP MAIN
ct12:
clr P3.3
LJMP MAIN
ct11:
clr P3.2
LJMP MAIN
clr P2.3
LJMP MAIN
ct1:
setb P3.2
LJMP MAIN
ct2:
setb P3.3
LJMP MAIN
ct3:
setb P3.4
LJMP MAIN
ct4:
setb P3.5
LJMP MAIN
ct5:
setb P3.6
LJMP MAIN
ct6:
setb P3.7
LJMP MAIN
ct7:
setb P2.0
LJMP MAIN
ct8:
setb P2.1
LJMP MAIN
ct9:
setb P2.2
LJMP MAIN
ct10:
setb P2.3
LJMP MAIN
END
khi bấm chạy thì nó hiện ra lỗi này
MOV P0,#0FFH
MOV P1,#0FFH
MOV P2,#00H
setb p2.4
setb p2.5
setb p3.0
setb p3.1
clr p3.2
clr p3.3
clr p3.4
clr p3.5
clr p3.6
clr p3.7
RET
MAIN:
JNB P1.0,ct1
JNB P1.1,ct2
JNB P1.2,ct3
JNB P1.3,ct4
JNB P1.4,ct5
JNB P1.5,ct6
JNB P1.6,ct7
JNB P1.7,ct8
JNB P3.0,ct9
JNB P3.1,ct10
JNB P0.0,ct11
JNB P0.1,ct12
JNB P0.2,ct13
JNB P0.3,ct14
JNB P0.4,ct15
JNB P0.5,ct16
JNB P0.6,ct17
JNB P0.7,ct18
JNB P2.4,ct19
JNB P2.5,ct20
RET
LJMP MAIN
jmp ct1
jmp ct2
jmp ct3
jmp ct4
jmp ct5
jmp ct6
jmp ct7
jmp ct8
jmp ct9
jmp ct10
jmp ct11
jmp ct12
jmp ct13
jmp ct14
jmp ct15
jmp ct16
jmp ct17
jmp ct18
jmp ct19
jmp ct20
RET
ct14:
clr P3.5
LJMP MAIN
ct15:
clr P3.6
LJMP MAIN
ct16:
clr P3.7
LJMP MAIN
ct17:
clr P2.0
LJMP MAIN
ct18:
clr P2.1
LJMP MAIN
ct19:
clr P2.2
LJMP MAIN
ct20:
clr P2.3
LJMP MAIN
ct13:
clr P3.4
LJMP MAIN
ct12:
clr P3.3
LJMP MAIN
ct11:
clr P3.2
LJMP MAIN
clr P2.3
LJMP MAIN
ct1:
setb P3.2
LJMP MAIN
ct2:
setb P3.3
LJMP MAIN
ct3:
setb P3.4
LJMP MAIN
ct4:
setb P3.5
LJMP MAIN
ct5:
setb P3.6
LJMP MAIN
ct6:
setb P3.7
LJMP MAIN
ct7:
setb P2.0
LJMP MAIN
ct8:
setb P2.1
LJMP MAIN
ct9:
setb P2.2
LJMP MAIN
ct10:
setb P2.3
LJMP MAIN
END
khi bấm chạy thì nó hiện ra lỗi này