data segment
keyboard db 256,?,256 dup (?)
data ends
code segment
assume cs:code,ds:data
main proc far
mov ax,data
mov ds,ax
lea dx,keyboard
mov ah,0ah;输入字符串
int 21h
lea di,keyboard
mov cl,[di+1];取出实际输入字符的个数
mov ch,0
add di,2;指向第一个字符
next:mov dl,[di]
mov ah,2;循环输出字符
int 21h
inc di
loop next
mov ah,4ch
int 21h
main endp
code ends
end main
温馨提示:内容为网友见解,仅供参考