统计字符串中数字,大写,小写,英文字和非英文字怎么做
datarea segment tips db 'Please input a string:',13,10,'$' errstr db 'length is too long!',13,10,'$' exitstr db 'exit','$'datarea endsprognam segment main proc far assume cs: prognam,ds:datarea,es:datareastart: push ds sub ax,ax push ax mov ax,datarea mov ds,ax mov ax,datarea mov es,ax ;+++++++++++++++++++++++++++++++++++++ lea dx,tips mov ah,9 int 21h mov bx,0 mov cx,0 mov dx,0 mov di,0AGAIN: mov ax,0 mov ax,bx add ax,cx add ax,dx add ax,di cmp ax,1eh ;如果ax的值大于30就跳转到ERR打印错误信息 ja ERR mov ax,0 mov ah,01h int 21h cmp ah,'$' je EXIT cmp ah,'0' jb L1 cmp ah,'9' jbe L2 cmp ah,'A' jb L1 cmp ah,'Z' jbe L3 cmp ah,'a' jb L1 cmp ah,'z' jbe L4 inc bx jmp AGAIN ERR: lea dx,errstr mov ah,9h int 21h jmp EXITL1: inc bx jmp GOBL2: inc cx jmp GOB L3: inc dx jmp GOBL4: inc di jmp GOBGOB: cmp ah,'$' jnz AGAINEXIT: lea dx,exitstr mov ah,9 int 21h ;++++++++++++++++++++++++++++++ main endpprognam ends end start