汇编作业10-1
assume cs:code,ds:datadata segment
db 'Welcome to masn!',0
data ends
codesegment
ho: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:push cx
push si
dec dh;获取8行3列的位置
mov al,0a0h
mul dh
mov bx,ax
mov al,2
mul dl
sub ax,2
add bx,ax
mov ax,0b800h
mov es,ax;偏移设置完成
mov ch,0
mov di,0
mov al,cl;保存颜色
set:mov cl,
jcxz ok
mov es:,cl
mov es:,al
inc si
add di,2
jmp short set
ok:pop cx
pop si
ret
code ends
end ho
页:
[1]