中午练习:
include io32.inc .data srcmsg byte 'This is a loop copy.',0 dstmsg byte sizeof srcmsg dup(?) .code start: mov ecx,lengthof srcmsg mov esi,offset srcmsg mov edi,offset dstmsg again: mov al,[esi] mov [edi],al inc esi inc edi loop again mov eax,offset dstmsg call dispmsg exit 0 end start
include io32.inc .data srcmsg byte 'This is a loop copy.',0 dstmsg byte sizeof srcmsg dup(?) .code start: mov ecx,lengthof srcmsg mov ebx,0 again: mov al,srcmsg[ebx] mov dstmsg[ebx],al inc ebx loop again mov eax,offset dstmsg call dispmsg exit 0 end start