一、字符串定义
二、dup指令
三、调用Writestring过程
四、代码以及效果
TITLE String Copy INCLUDE Irvine32.inc includelib Irvine32.lib includelib kernel32.lib includelib user32.lib .data source BYTE "this is source string",0 target BYTE SIZEOF source dup(0),0 .code main PROC mov esi,0 mov ecx,SIZEOF source L1: mov al,source[esi] mov target[esi],al inc esi loop L1 mov edx,OFFSET target call WriteString ret main endp END main
效果: