21,459
社区成员
发帖
与我相关
我的任务
分享
dseg segment
string db 'A3B=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
;显示未处理数据
call disp
;换行
call crlf
;
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
;显示数据
call disp
;
mov ah,4ch
int 21h
;---------------------------
crlf proc
mov dl,0dh
mov ah,2
int 21h
mov dl,0ah
mov ah,2
int 21h
ret
crlf endp
disp proc
mov bx,offset string
p: mov dl,[bx]
cmp dl,0
jz ol
mov ah,2
int 21h
inc bx
jmp p
ol: ret
disp endp
;-----------------------------
cseg ends
end start