续 字符输出显示
d segment db11 db 'welcome ',10 dup(?),'$'
db00 db 'enter your name: ','$'
db33 db 10
db ?
db 10 dup(?)
d ends
c segment
assume cs:c,ds:d
bg: mov ax,d
mov ds,ax
lea dx,db00
mov ah,9
int 21h
ag: lea dx,db33
mov ah,0ah
int 21h
lea si,db33+2
lea di,db11+8
mov cx,[si-3]
re: mov al,[si] 将输入内容一个一个存入db11
je last
mov [di],al
inc di
inc si
loop re
last: mov ah,8
int 21h //按任意键继续
lea dx,db11
mov ah,9
int 21h
mov ah,4ch
int 21h
c ends
end bg
input: abc
output: welcome abc
input: lily
output: welcome lily
thanks.........
[此贴子已经被作者于2006-12-17 18:02:30编辑过]