字符串的复制srcmsg---dstmsg

中午练习:

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

字符串的复制srcmsg---dstmsg_第1张图片

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
字符串的复制srcmsg---dstmsg_第2张图片






你可能感兴趣的:(字符串的复制srcmsg---dstmsg)