⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tiger.asm

📁 这是一个电话号码程序
💻 ASM
字号:

stack segment para stack 'stack'
db 64 dup('stack...')
stack ends

dseg segment para 'data'
mus_freq dw 2 dup(262,294,330,262),2 dup(330,349,392)
		dw 2 dup(392,440,392,349,330,262),2 dup(294,196,262),-1
mus_time dw 10 dup(50),100,50,50,100,4 dup(25),50,50,4 dup(25),50,50
		dw 50,50,100,50,50,100
dseg ends
cseg segment para 'code'
assume cs:cseg,ss:stack,ds:dseg
music proc far
mov ax,dseg
mov ds,ax
lea si,mus_freq
lea bp,ds:mus_time
freq:
mov di,[si]
cmp di,-1
je end_mus
mov bx,ds:[bp]
call soundf
add si,2
add bp,2
jmp freq
end_mus:
mov ax,4c00h
int 21h
music endp

waitf proc near
	push ax
waitf1:
	in al,61h
	and al,10h
	cmp al,ah
	je waitf1
	mov ah,al
	loop waitf1
	pop ax
	ret
waitf endp

soundf proc near
	push ax
	push bx
	push cx
	push dx
	push di
	mov al,0b6h
	out 43h,al
	mov dx,12h
	mov ax,348ch
	div di
	out 42h,al
	mov al,ah
	out 42h,al
	in al,61h
	mov ah,al
	or al,3
	out 61h,al	
wait1:mov cx,0a3dh
	call waitf
	dec bx	
	jnz wait1
	mov al,ah
	out 61h,al
	pop di
	pop dx
	pop cx
	pop bx
	pop ax
	ret 
soundf endp

cseg ends
end music

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -