求解救啊,我交通灯的控制系统程序怎么改正啊?
DATA SEGMENT; 设置数据段,以及端口地址分配PORTA EQU 218H
PORTB EQU 219H
PORTC EQU 21AH
PTCON8255 EQU 21BH
PORT0 EQU 238H
PORT1 EQU 239H
PORT2 EQU 240H
PTCON8253 EQU 241H
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
INIT: MOV AX,DATA
MOV DS,AX
MOV DX, PTCON8253
MOV AL,36H
OUT DX,AL
MOV DX,PORT0
MOV AX,2710H
OUT DX,AL
MOV AL,AH
OUT DX,AL;通道0工作方式3 周期0.01s
MOV DX, PTCON8253
MOV AL,71H
OUT DX,AL;通道1工作方式1
MOV DX, PTCON8253
MOV AL,96H
OUT DX,AL
MOV DX,PORT2
MOV AL,64H
OUT DX,AL;通道2工作方式3 周期1s 8253初始化完成
MOV DX, PTCON8255
MOV AL,80H
OUT DX,AL;8255初始化 A,B,C口均工作在方式0
MOV DX,PORTA
MOV AL,0
OUT DX,AL
MOV DX,PORTB
MOV AL,0FH
OUT DX,AL
MOV DX,PORTC
MOV AL,0FH
OUT DX,AL;灯初始化完成
STA: MOV DX,PORTA
MOV AL,0A0H
OUT DX,AL
MOV DX,PORTB
MOV AL,0F0H
OUT DX,AL
MOV DX,PORTC
MOV AL,50H
OUT DX,AL;1,3绿灯亮,2,4红灯亮
MOV DX,PORT1
MOV AX,0BB8H
OUT DX,AL
MOV AL,AH
OUT DX,AL;8253通道1赋值 开始计时
SCAN1: MOV AL,0
MOV DX,PTCON8255
MOV AL,90H
OUT DX,AL
MOV DX,PORTA
IN AL,DX
AND AL,0FH
CMP AL,1
JNZ SCAN1;扫描PA7口
FLA1: MOV DX, PTCON8255
MOV AL,80H
OUT DX,AL
MOV DX,PORTC
MOV AL,0F0H
OUT DX,AL
MOV DX,PORTB
MOV AL,50H
OUT DX,AL
MOV CX,0
TEST1: MOV DX,PTCON8255;检测PB7
MOV AL,82H
OUT DX,AL
MOV DX,PORTB
IN AL,DX
AND AL,0FH
MOV AH,AL
MOV DX,PTCON8255
MOV AL,82H
OUT DX,AL
MOV DX,PORTB
IN AL,DX
AND AL,0FH
XOR AL,AH
ADD CL,AL
CMP CL,9
JNZ TEST1;闪烁5次
MOV DX, PTCON8255
MOV AL,80H
OUT DX,AL
MOV DX,PORTA
MOV AL,50H
OUT DX,AL
MOV DX,PORTB
MOV AL,0F0H
OUT DX,AL
MOV DX,PORTC
MOV AL,0A0H;1,3红灯亮,2,4绿灯亮
MOV DX,PORT1
MOV AX,0BB8H
OUT DX,AL
MOV AL,AH
OUT DX,AL;8253通道1赋值 开始计时
SCAN2: MOV AL,0
MOV DX,PTCON8255
MOV AL,90H
OUT DX,AL
MOV DX,PORTA
IN AL,DX
AND AL,0FH
CMP AL,1
JNZ SCAN2
FLA2: MOV DX, PTCON8255
MOV AL,80H
OUT DX,AL
MOV DX,PORTC
MOV AL,0F0H
OUT DX,AL
MOV DX,PORTB
MOV AL,0A0H
OUT DX,AL
TEST2: MOV DX,PTCON8255
MOV AL,88H
OUT DX,AL
MOV DX,PORTC
IN AL,DX
AND AL,0FH
MOV AH,AL
MOV DX,PTCON8255
MOV AL,88H
OUT DX,AL
MOV DX,PORTC
IN AL,DX
AND AL,0FH
XOR AL,AH
ADD CL,AL
CMP CL,9
JNZ TEST2;闪烁5次
CODE ENDS
END STA
编译的时候系统提示JNZ SCAN1;扫描PA7口
错了求帮忙