ORG 0000H
LJMP MAIN
ORG 0040H
MAIN:
MOV P1,#0FFH
MOV A,P1
CJNE A,#11111110b,S1
LCALL K1
S1: CJNE A,#11111101b,S2
LCALL K2
S2: CJNE A,#11111011b,S3
LCALL K3
S3: CJNE A,#11110111b,S4
LCALL K4
S4: CJNE A,#11101111b,MAIN
LCALL K5
LJMP MAIN
K1: MOV A,#01111111b
C1: RL A
MOV P2,A
LCALL Delay
JNB P1.1,K2
JNB P1.2,K3
JNB P1.3,K4
JNB P1.4,Z
LJMP C1
K2: MOV P2,#0FEH
LCALL Delay
MOV P2,#0FCH
LCALL Delay
MOV P2,#0F8H
LCALL Delay
MOV P2,#0F0H
LCALL Delay
MOV P2,#0E0H
LCALL Delay
MOV P2,#0C0H
LCALL Delay
MOV P2,#80H
LCALL Delay
MOV P2,#00H
LCALL Delay
MOV P2,#80H
LCALL Delay
MOV P2,#0C0H
LCALL Delay
MOV P2,#0E0H
LCALL Delay
MOV P2,#0F0H
LCALL Delay
MOV P2,#0F8H
LCALL Delay
MOV P2,#0FCH
LCALL Delay
MOV P2,#0FEH
LCALL Delay
MOV P2,#0FFH
LCALL Delay
LJMP MAIN
Z: LJMP K5
K3: MOV P2,#55H
LCALL Delay
MOV P2,#0AAH
LCALL Delay
MOV P2,#0FFH
LJMP MAIN
K4: MOV P2,#01111110B
LCALL Delay
MOV P2,#00111100B
LCALL Delay
MOV P2,#00011000B
LCALL Delay
MOV P2,#00000000B
LCALL Delay
MOV P2,#10000001B
LCALL Delay
MOV P2,#11000011B
LCALL Delay
MOV P2,#11100111B
LCALL Delay
MOV P2,#11111111B
LCALL Delay
LJMP MAIN
K5: MOV P2,#01111110B
LCALL Delay
MOV P2,#10111111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10011111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10001111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10000111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10000011B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10000001B
LCALL Delay
MOV P2,#00H
LCALL Delay
MOV P2,#0FFH
LCALL Delay
MOV P2,#00H
LCALL Delay
MOV P2,#0FFH
LCALL Delay
LJMP MAIN
Delay: JNB P3.0,D1
mov r5,#01h
LJMP D5
D1: MOV r5,#04h
我是新手,不知道上面这程序是什么意思,求助大神帮我解释下!!!!!(づ ̄ 3 ̄)づ
LJMP MAIN
ORG 0040H
MAIN:
MOV P1,#0FFH
MOV A,P1
CJNE A,#11111110b,S1
LCALL K1
S1: CJNE A,#11111101b,S2
LCALL K2
S2: CJNE A,#11111011b,S3
LCALL K3
S3: CJNE A,#11110111b,S4
LCALL K4
S4: CJNE A,#11101111b,MAIN
LCALL K5
LJMP MAIN
K1: MOV A,#01111111b
C1: RL A
MOV P2,A
LCALL Delay
JNB P1.1,K2
JNB P1.2,K3
JNB P1.3,K4
JNB P1.4,Z
LJMP C1
K2: MOV P2,#0FEH
LCALL Delay
MOV P2,#0FCH
LCALL Delay
MOV P2,#0F8H
LCALL Delay
MOV P2,#0F0H
LCALL Delay
MOV P2,#0E0H
LCALL Delay
MOV P2,#0C0H
LCALL Delay
MOV P2,#80H
LCALL Delay
MOV P2,#00H
LCALL Delay
MOV P2,#80H
LCALL Delay
MOV P2,#0C0H
LCALL Delay
MOV P2,#0E0H
LCALL Delay
MOV P2,#0F0H
LCALL Delay
MOV P2,#0F8H
LCALL Delay
MOV P2,#0FCH
LCALL Delay
MOV P2,#0FEH
LCALL Delay
MOV P2,#0FFH
LCALL Delay
LJMP MAIN
Z: LJMP K5
K3: MOV P2,#55H
LCALL Delay
MOV P2,#0AAH
LCALL Delay
MOV P2,#0FFH
LJMP MAIN
K4: MOV P2,#01111110B
LCALL Delay
MOV P2,#00111100B
LCALL Delay
MOV P2,#00011000B
LCALL Delay
MOV P2,#00000000B
LCALL Delay
MOV P2,#10000001B
LCALL Delay
MOV P2,#11000011B
LCALL Delay
MOV P2,#11100111B
LCALL Delay
MOV P2,#11111111B
LCALL Delay
LJMP MAIN
K5: MOV P2,#01111110B
LCALL Delay
MOV P2,#10111111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10011111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10001111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10000111B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10000011B
LCALL Delay
MOV P2,#01111110B
LCALL Delay
MOV P2,#10000001B
LCALL Delay
MOV P2,#00H
LCALL Delay
MOV P2,#0FFH
LCALL Delay
MOV P2,#00H
LCALL Delay
MOV P2,#0FFH
LCALL Delay
LJMP MAIN
Delay: JNB P3.0,D1
mov r5,#01h
LJMP D5
D1: MOV r5,#04h
我是新手,不知道上面这程序是什么意思,求助大神帮我解释下!!!!!(づ ̄ 3 ̄)づ