MOV AL,38H ;写显示命令 OUT DX,AL
CALL CLEAR_LED ;清除显示RAM,数码管熄灭
WORK:
CALL WORK1 JMP WORK
WORK1 PROC NEAR SHOW1:
MOV AL,11111001B ;1绿2红 MOV DX,D8255A OUT DX,AL
CALL WORK2 ;倒数50秒,并显示60~10
MOV DX,D8255A
MOV AL,11111101B ;1绿灭 OUT DX,AL
YELLOW1: MOV DX,D8255A
MOV AL,11101101B ;1黄2红 OUT DX,AL CALL WORK3
MOV DX,D8255A
MOV AL,11111101B ;1号黄灯灭 OUT DX,AL
;2号线(东西)通车
MOV AL,11110110B ;2绿1红 MOV DX,D8255A OUT DX,AL
CALL WORK2
MOV DX,D8255A
MOV AL,11111110B ;2绿灭 OUT DX,AL