响铃
输入1到9 响铃相应的次数data segment
array db 1,2,3,4,5,6,7,8,9
data ends
code segment
main proc far
assume cs:code,ds:data
start:
push ds
sub bx,bx
push bx
mov ah,01
int 21h
sub al,30h
cmp al,0
je exit
mov si,0
l:
cmp al,array[si]
jne m
jmp n
m:
inc si
jmp l
n:
mov dl,07h
mov ah,02
int 21h
dec si
jnz n
exit:
ret
main endp
code ends
end start
(不知为什么总是响一次,各位帮帮忙,先谢谢喽)