data segment
buf1 db 'qwer1234$'
data ends
ext segment
buf2 db 9 dup(?)
ext ends
code segment
assume cs:code,ds:data,es:ext
start:
mov ax,data
mov ds,ax;源址
mov ax,ext
mov es,ax;目标段址
cld
lea si,buf1
lea di,buf2
mov cx,9
rep movsb;拷贝
lea dx,buf2;显示
mov ah,9
int 21h
mov ah,0
int 16h
mov ah,4ch
int 21h
code ends
end start