assume cs:code
data segment
db'Welcome to masm!',0
data ends
code segment
start: mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str:
mov bx,0
mov ax,0B800H
mov es,ax
mov al,160
mov ah,0
mov bl,dh
mov bh,0
mul bx
mov di,ax
mov al,2
mov ah,0
mov dh,0
mul dx
add di,dx
mov al,cl
mov cx,14
mov bx,di
mov di,0
s:
mov byte ptr es:[bx+di],[si] ;这里
mov es:[bx+di+1],al
add di,2
inc si
loop s
ret
code ends
end start
------解决方案--------------------
mov byte ptr es:[bx+di],[si] ;这里
mov al,byte ptr [si]
mov byte ptr es:[bx+di],al