王爽老师汇编3实验9
;在屏幕中间分别显示绿色、绿底红色、白底蓝色的字符串'welcome to masm!'assume cs:codesg,ds:datasg
datasg segment
db 'welcome to masm!'
datasg ends
codesg segment
start:
mov ax,datasg
mov ds,ax
mov ax,0B800H
mov es,ax
mov bx,0
mov si,7BCH ;行0CH,列A5H。字符串开始位置(偏移地址)=行*列
mov cx,10H ;要显示的字数
s: mov al,ds:
mov es:,al
mov byte ptr es:,71H ;绿色字02H;绿底红色24H;白底蓝色71H
inc bx
add si,2
loop s
mov ax,4c00h
int 21h
codesg ends
end start
页:
[1]