[原创]当数大于等于10的时候怎么输入?
data segment
str db 'a b c d e f g $'
count=$-str
data ends
stack segment stack
db 200 dup(0)
stack ends
code segment
assume cs:code,es:data,ds:data,ss:stack
begin: mov ax,data
mov ds,ax
mov es,ax
lea di,str
mov cx,count
mov al,20h
next: repnz scasb
je find
jmp exit
find: inc bx
jmp next
exit: add bx,30h
mov dl,bl
mov ah,2
int 21h
mov ah,4ch
int 21h
code ends
end begin
上面的程序是用空格数来判断字符数,数放入BX中,当BX<=9时可正常输入,但当BX>=10的时候显示的就是数的ASCII码,请问如何把它转换为对应的十进制数呢?请高手指点下.先谢谢了!