求助~分类计数问题~
;从键盘输入一系列字符(以回车结束),并按字母,数字及其他字符分类计数,最后显示这三类的计数结果~DATAS SEGMENT
ARY DB ?
X DB 0DH
OTH DB 0
NU DB 0
LET DB 0
DATAS ENDS
STACKS SEGMENT
STACKS ENDS
CODES SEGMENT
ASSUME CS:CODES,DS:DATAS,SS:STACKS
START:
MOV AX,DATAS
MOV DS,AX
MOV BX,0
MOV SI,BX
IMPORT:
MOV AH,1
INT 21H
MOV ARY[SI],AL
CMP AL,X
JE TRIM
MOV DL,20H
MOV AH,2
INT 21H
ADD SI,2
JMP IMPORT
TRIM:
CMP ARY[SI],30H
JB OTHER
CMP ARY[SI],3AH
JB NUM
CMP ARY[SI],41H
JB OTHER
CMP ARY[SI],5BH
JB LETTER
CMP ARY[SI],61H
JB OTHER
CMP ARY[SI],7BH
JB LETTER
JMP OTHER
A:
CMP SI,0
JLE B
SUB SI,2
JMP TRIM
OTHER: INC OTH
JMP A
NUM: INC NU
JMP A
LETTER: INC LET
JMP A
B:
MOV DL,0AH
MOV AH,2
INT 21H
MOV AL,OTH
MOV DL,AL
MOV AH,2
INT 21H
MOV AL,NU
MOV DL,AL
MOV AH,2
INT 21H
MOV AL,LET
MOV DL,AL
MOV AH,2
INT 21H
MOV AH,4CH
INT 21H
CODES ENDS
END START
;请问各位我的程序哪里出乱子啦?谢谢大家~