主题:哪个高手帮我改改错误啊!!
编写程序段,把以’$’结为的字符串string中的“&”字符用空格替换。
data segment
String db 'The&date&is&FE','$'
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
mov bx,00h
done: cmp [bx],'$'
je next
cmp [bx],'&'
jne next1
mov [dx],20h
inc bx
jmp done
next1: inc bx
jmp done
next: mov bx,offset string
mov ah,09h
int 21h
mov ah,4ch
int 21h
code ends
end start
用td软件运行时,总说程序没找到!!
data segment
String db 'The&date&is&FE','$'
data ends
code segment
assume cs:code,ds:data
start: mov ax,data
mov ds,ax
mov bx,00h
done: cmp [bx],'$'
je next
cmp [bx],'&'
jne next1
mov [dx],20h
inc bx
jmp done
next1: inc bx
jmp done
next: mov bx,offset string
mov ah,09h
int 21h
mov ah,4ch
int 21h
code ends
end start
用td软件运行时,总说程序没找到!!