;输入一个数N,要求响铃N次,调用延迟函数
data segment
data ends
stack segment stack
buff db 100 dup(?)
stack ends
code segment
assume cs:code,ds:data
;---------------------------------
main proc far
start:
push ds
sub ax,ax
push ax
mov ax,data
mov ds,ax
mov ah,01h
int 21h
mov cl,al
rotate:
mov dl,07
mov ah,02h
int 21h
call delay
loop rotate
ret
delay:
mov cx,0100h
d:
dec cx
cmp cx,0h
jae d
ret
main endp
;-----------------------------------
code ends
end start
------解决方案--------------------------------------------------------