|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code
data segment
db 'hello world',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 bx,0b800h
mov ax,0a0h
mul dh
add ax,bx
mov es,ax
mov dh,0
mov bx,dx
mov ah,0
mov al,cl
s:
mov ah,[si]
mov byte ptr es:[di+bx],ah
mov byte ptr es:[di+bx+1],al
mov cx,[si]
add di,2
inc si
jcxz qwer
jmp s
qwer:
ret
code ends
end start
assume cs:code
data segment
db 'hello world',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 bx,0b800h
mov es,bx
mov ax,0a0h
mul dh
mov bx,ax
mov ax,2
mul dl
add bx,ax
mov al,cl
mov cl,0
mov di,0
s:
mov ch,[si]
jcxz qwer
mov ah,[si]
mov byte ptr es:[di+bx],ah
mov byte ptr es:[di+bx+1],al
add di,2
inc si
jmp s
qwer:
ret
code ends
end start
|
|