编译环境:masm
运行结果:正确
assume cs:codesg,ds:datasg
datasg segment
db 'weclome to masm!'
datasg ends
codesg segment
start:mov ax,datasg
mov ds,ax
mov ax,0B800h
mov es,ax
mov ax,0
mov bx,0
mov cx,16
mov si,0
s: mov al,byte ptr ds:[si]
mov byte ptr es:[11*160+32*2+bx],al
mov byte ptr es:[12*160+32*2+bx],al
mov byte ptr es:[13*160+32*2+bx],al
inc bx
mov byte ptr es:[11*160+32*2+bx],00000010b
mov byte ptr es:[12*160+32*2+bx],00100100b
mov byte ptr es:[13*160+32*2+bx],01110001b
inc bx
inc si
loop s
mov ax,4c00h
int 21h
codesg ends
end start