jg yes
inc si ;使SI指向下一字符, jmp again yes:
inc si
inc bl ;用BL記錄非數字字符的個數 jmp again exit:
mov ah,9
mov dx,offset info2
int 21h ;提示信息
mov cl,100 ;以下為把BL中非數字字符的個數轉換成為十進制,並在屏幕上顯示的過程 call div_dis mov cl,10 call div_dis mov cl,1 call div_dis ret
main endp
div_dis proc near
mov al,bl cbw div cl mov bl,ah mov dl,al
add dl,30h ;把二進制轉換成字符 mov ah,2 int 21h ret
div_dis endp end start