在屏幕中间分别显示绿色,绿底红色,白底蓝色的字符串'welcome to masm!'
报错显示一个错误
assume cs:code
data segment
db 'welcome to masm!'
data ends
code segment
start:mov ax,data
mov ds,ax
mov ax,0b800h
mov ex,ax
mov si,0
mov di,1680
mov cx,16
s1:mov al,ds:[si]
mov ah,00000010B
mov es:[di],ax
inc si
inc di
inc di
loop s1
mov di,1840
mov si,0
mov cx,16
s2:mov al,ds:[si]
mov ah,00100100B
mov es:[di],ax
inc si
inc di
inc di
loop s2
mov di,2000
mov cx,16
mov si,0
s3:mov al,ds:[si]
mov ah,01110001B
mov es:[di],ax
inc si
inc di
inc di
loop s3
mov ax,4c00h
int 21h
code ends
end start
报错显示一个错误
assume cs:code
data segment
db 'welcome to masm!'
data ends
code segment
start:mov ax,data
mov ds,ax
mov ax,0b800h
mov ex,ax
mov si,0
mov di,1680
mov cx,16
s1:mov al,ds:[si]
mov ah,00000010B
mov es:[di],ax
inc si
inc di
inc di
loop s1
mov di,1840
mov si,0
mov cx,16
s2:mov al,ds:[si]
mov ah,00100100B
mov es:[di],ax
inc si
inc di
inc di
loop s2
mov di,2000
mov cx,16
mov si,0
s3:mov al,ds:[si]
mov ah,01110001B
mov es:[di],ax
inc si
inc di
inc di
loop s3
mov ax,4c00h
int 21h
code ends
end start