请问这个程序错在哪了?为什么输入2位时会不对
DB 20 DUP(?)Y DB 20
DB ?
DB 20 DUP(?)
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,ES:DATA
START: MOV AX,DATA
MOV DS,AX
MOV ES,AX
LEA DX,STR1
MOV AH,9
INT 21H
LEA DX,X
MOV AH,0AH
INT 21H
MOV BX,DX
LEA DX,STR2
MOV AH,9
INT 21H
LEA DX,Y
MOV AH,0AH
INT 21H
MOV SI,DX
MOV DX,0
CMP BYTE PTR [BX+2],'-'
JZ K23
CMP BYTE PTR [BX+2],'0'
JZ K0
K14: CMP BYTE PTR [SI+2],'-'
JZ K4
CMP BYTE PTR [SI+2],'0'
JZ K0
MOV AH,2
MOV DL,'1'
INT 21H
JMP EXIT
K23: CMP BYTE PTR [SI+2],'-'
JZ K3
CMP BYTE PTR [SI+2],'0'
JZ K0
MOV AH,2
MOV DL,'2'
JMP EXIT
K0:
MOV AH,2
MOV DL,'0'
INT 21H
JMP EXIT
K3:
MOV AH,2
MOV DL,'3'
INT 21H
JMP EXIT
K4:
MOV AH,2
MOV DL,'4'
INT 21H
EXIT: MOV AH,4CH
INT 21H
CODE ENDS
END START