assume cs:code,ds:data
data segment
db 'welcome to masm!'
data ends
code segment
start:
mov bx,0h
mov si,0h
mov ax,0b820h ;修改了显示位置以免被刷屏刷掉
mov ds,ax
mov ax,data
mov es,ax
mov cx,10h
s:mov ax,es:[bx]
mov [bx][si],ax
inc bx
inc si
loop s
mov bx,1h
mov cx,7h
s0:mov byte ptr [bx],02h
add bx,2h
loop s0
add bx,2h
mov cx,2h
s1:mov byte ptr [bx],24h
add bx,2h
loop s1
add bx,2h
mov cx,5h
s2:mov byte ptr [bx],71h
add bx,2h
loop s2
mov ax,4c00h
int 21h
code ends
end start
已经成功运行 |