;程序功能:字符串输入并回显
data segment
x2 dw 20,?, 20 dup(?)
data ends
stack segment stack
he dw 10 dup(0)
stack ends
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax, data
mov ds, ax
mov ax,stack
mov ss, ax
lea dx,x2;事先开辟字符区
mov ah,10
int 21h;输入字符串中断
lea dx,x2
add dx,2 ;请跳过前两个说明字符
mov ah,9
int 21h;输入的字符串显示出来
mov ax, 4c00h ; exit to operating system.
int 21h
code ends
end start ; set entry point and stop the assembler
——2020.08.09——