判断字符是否为数字符的子程序,并删除数字字符。0 为结束
dseg segment
string db 'AB=c950=asd',0
dseg ends
;
cseg segment
assume cs:cseg, ds:dseg
isdecm proc
cmp al,'0'
jb isdecm1
cmp al,'9'+1
cmc
isdecm1:ret
isdecm endp
start: mov ax,dseg
mov ds,ax
mov si,offset string
mov di,si
next: mov al,[si]
inc si
or al,al
jz ok
call isdecm
jnc next
mov [di],al
inc di
jmp next
ok: mov [di],al
mov ah,4ch
int 21h
cseg ends
end start
碰到字符串 'AB=c950=asd'里面这个0,那这个程序不就进行不下去了吗?