用汇编语言编程 功能是将缓冲区buf1中的字节数据块传送至缓冲区buf2
1个回答
展开全部
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
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
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询