问题7.2 用si和di实现将字符串‘welcome to masm!’复制到它后面的数据区中
作者:互联网
方法一:
assume cs:codesg,ds:datasg datasg segment db 'welcome to masm!' db '................' datasg ends codesg segment start: mov ax,datasg mov ds,ax mov si,0 mov cx,8 s: mov ax,0[si] mov 16[si],ax add si,2 loop s mov ax,4c00h int 21h codesg ends end start
方法二:
assume cs:codesg,ds:datasg datasg segment db 'welcome to masm!' db '................' datasg ends codesg segment start: mov ax,datasg mov ds,ax mov si,0 mov di,16 mov cx,8 s: mov ax,[si] mov [di],ax add si,2 add di,2 loop s mov ax,4c00h int 21h codesg ends end start
标签:复制到,datasg,di,mov,7.2,start,si,codesg,ax 来源: https://www.cnblogs.com/jianqiao123/p/12247796.html