直接看源码吧:(25行)
assume cs:codesg
data segment
db 'welcome to masm!'
data ends
codesg segment
start: mov ax,data
mov es,ax
mov bx,0
mov ax,47104
mov ds,ax
mov cx,16
s1: mov al,es:[si]
mov ah,2h
mov ds:[bx+1984+si],ax
mov ah,42h
mov ds:[bx+2144+si],ax
mov ah,71h
mov ds:[bx+2304+si],ax
inc bx
inc si
loop s1
mov ax,4c00h
int 21h
codesg ends
end start
下面是 (30多行的--理解错了题目意思,还以为在显示区只有那三行英文呢!)
assume cs:codesg
data segment
db 'welcome to masm!'
db ' '
data ends
codesg segment
start:
mov ax,data
mov es,ax
mov bx,0
mov ax,47104
mov ds,ax
mov cx,2000
mov si,0
s: mov al,es:[16]
mov ah,2h
mov ds:[bx],ax
add bx,2
loop s
mov cx,16
mov bx,0
s1: mov al,es:[si]
mov ah,2h
mov ds:[bx+1984+si],ax
mov ah,42h
mov ds:[bx+2144+si],ax
mov ah,71h
mov ds:[bx+2304+si],ax
inc bx
inc si
loop s1
mov ax,4c00h
int 21h
codesg ends
end start |