求助师傅们,这个程序有没有问题啊?
ORG 00HSTART:
MOV P0,#00H
MOV R0,#2
CLR P2.7
SETTING:
CHK_0:
JB P1.0,CHK_1
CALL FILTER
JNB P1.0,$
MOV R1,#0
JMP TIMERSET
CHK_1:
JB P1.1,CHK_2
CALL FILTER
JNB P1.1,$
MOV R1,#1
JMP TIMERSET
CHK_2:
JB P1.2,CHK_3
CALL FILTER
JNB P1.2,$
MOV R1,#2
JMP TIMERSET
CHK_3:
JB P1.3,CHK_4
CALL FILTER
JNB P1.3,$
MOV R1,#3
JMP TIMERSET
CHK_4:
JB P1.4,CHK_5
CALL FILTER
JNB P1.4,$
MOV R1,#4
JMP TIMERSET
CHK_5:
JB P1.5,CHK_6
CALL FILTER
JNB P1.5,$
MOV R1,#5
JMP TIMERSET
CHK_6:
JB P1.6,CHK_7
CALL FILTER
JNB P1.6,$
MOV R1,#6
JMP TIMERSET
CHK_7:
JB P1.7,CHK_8
CALL FILTER
JNB P1.7,$
MOV R1,#7
JMP TIMERSET
CHK_8:
JB P2.1,CHK_9
CALL FILTER
JNB P2.1,$
MOV R1,#8
JMP TIMERSET
CHK_9:
JB P2.2,CHK_AGAIN
CALL FILTER
JNB P2.2,$
MOV R1,#9
JMP TIMERSET
CHK_AGAIN:
JMP CHK_0
TIMERSET:
DJNZ R0,LSB
JMP MSB
LSB:
MOV 30H,R1
JMP SETTING
MSB:
MOV A,R1
SWAP A
ADD A,30H
MOV 31H,A
MOV P0,A
CONFIRM:
OK:
JB P2.3,CANCEL
CALL FILTER
JNB P2.3,$
MOV A,#00H
JMP TIMING
CANCEL:
JB P2.4,OK
CALL FILTER
JNB P2.4,$
RESTART:
JMP START
TIMING:
MOV P0,A
MIN:
MOV R0,#60
SEC:
MOV R1,#10
SEC_10:
MOV R2,#200
CALL DELAY
DJNZ R1,SEC_10
DJNZ R0,SEC
ADD A,#1
DA A
CJNE A,31H,TIMING
BEEP:
MOV R2,#5
REPEAT:
SETB P2.7
CALL LONGDELAY
CLR P2.7
CALL LONGDELAY
DJNZ R2,REPEAT
JMP START
DELAY:
MOV R3,#248
JNB P2.4,RESTART
DJNZ R3,$
DJNZ R2,DELAY
RET
FILTER:
MOV R6,#60
F1:
MOV R7,248
DJNZ R7,$
DJNZ R6,F1
RET
LONGDELAY:
MOV R3,#50
DL1:
MOV R4,#20
DL2:
MOV R5,#248
DJNZ R5,$
DJNZ R4,DL2
DJNZ R3,DL1
RET
END