现在的位置: 首页 > 综合 > 正文

内存内容的互换

2017年10月06日 ⁄ 综合 ⁄ 共 232字 ⁄ 字号 评论关闭
将内存ffff:0--ffff:b单元中的数据复制到0:200--0:20b单元中.



assume cs:codesg
codesg segment
	mov ax,0ffffh
	mov ds,ax		;ds保存来源的段地址
	mov ax,20h
	mov es,ax		;es保存去路的段地址
	
	mov cx,0ch		;cx保存循环次数
	mov bx,0h		;bx保存循环变量
	
s:	mov dl,ds:[bx]
	mov es:[bx],dl
	inc bx
	loop s
	
	mov ax,4c00h
	int 21h
codesg ends
end

抱歉!评论已关闭.