assume cs: code,ss:stack
data segment
db 'welcome to masm',0
data ends
stack segment
db 16 dup (0)
stack ends
code segment
start:
mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
mov di,0
mov bx,0
call show_str
MOV AH,1 ;调用1号中断,用户任意按键
INT 21H
MOV AH,0AH ;调用0A号中断,读入键盘输入的字符串.
INT 21H
mov ax,4c00h
int 21h
show_str:
mov bp,cx
mov cx,0
mov ax,0b800h
mov es,ax
mov cl,dh
s1:
add bx,00a0h
loop s1
mov cl,dl
s2:
add si,2
loop s2
mov cx,0
j1:
mov cx,0
mov ah,0
mov al,ds:[di]
mov cl,al
jcxz over1
mov ah,2h
mov word ptr es:[bx+si],ax
inc di
add si,2h
jmp short j1
over1:
mov cx,bp
ret
code ends
end start
闲着……学学写写汇编(只贴代码)(4)
最新推荐文章于 2024-08-29 20:38:50 发布