向大师们求教!一个99秒表计时器,可是我在ISIS仿真软件中不能实现其功能。
ORG 00HSTART:
MOV P0,#00H
JB P1.0,$
CALL FILTER
JNB P1.0,$
MOV R0,#00H
PRESS_1:
MOV A,R0
MOV P0,A
MOV R5,#10
ADD_1:
MOV R6,#200
CALL DELAY
DJNZ R5,ADD_1
MOV A,R0
ADD A,#01H
DA A
MOV R0,A
JMP PRESS_1
PRESS_2:
CALL FILTER
JB P1.0,PRESS_3
JMP PRESS_2
PRESS_3:
JB P1.0,$
CALL FILTER
RELEASE:
JB P1.0,START
JMP RELEASE
DELAY:
MOV R7,#248
JNB P1.0,PRESS_2
DJNZ R7,$
DJNZ R6,DELAY
RET
FILTER:
MOV R6,#60
F1:
MOV R7,#248
DJNZ R7,$
DJNZ R6,F1
RET
END