实验十 1 显示字符串 我回来了
assume cs:codedata segment
db 'Welcome to masm!',0
data ends
code segment
start: mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str: mov ax,0b800h
mov es,ax
mov ax,0
mov al,dh
mov bx,0
mov bl,160
mul bl
mov bx,0
add bx,ax
mov ax,0
mov al,dl
mul cl
add bx,ax ;bx为首字偏移值
mov al,cl ;颜色放al中保存
mov di,0
s0:mov cl,
mov ch,0
jcxz s1 ;cx为零时 跳到s1
mov es:,cl
mov es:,al
inc si
add di,2
jmp short s0
s1:ret
code ends
end start
页:
[1]