assume cs:codesg,ds:datasg,ss:stacksg
datasg segment
db 'welcome to masm!'
db 02h,24h,71h
datasg ends
stacksg segment
db 16 dup (0)
stacksg ends
codesg segment
start: mov ax,datasg
mov ds,ax
mov ax,0b800h
mov es,ax
mov bx,640h
mov ax,stacksg
mov ss,ax
mov sp,10h
mov ax,0
mov dx,0
mov cx,3
s0: push cx
mov di,0
mov si,0
mov cx,10h
s: mov al,ds:[di]
mov es:[bx+64h+si],al ;字符串依次送入
mov al,ds:[10h+dx]
mov es:[bx+65h+si],al ;字体属性送入
inc di
add si,2
loop s
add bx,140h ;字符串送入下二行(实行隔行显示)
inc dx ;字体属性的修改
pop cx
loop s0
mov ax,4c00h
int 21h
codesg ends
end start |