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

📄 two tigers.txt

📁 汇编音乐程序 两只老虎
💻 TXT
字号:
;1 2 3 1 1 2 3 1       3 4 5= 3 4 5=       56 54 3 1 56 54 3 1      1 -6 1= 1 -6 1=


TITLE MUSIC --A music of'Two tigers'


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

dseg segment para'data'
mus_freq dw 2 dup(262,294,330,262)
         dw 2 dup(330,349,392)
         dw 2 dup(392,422,392,349,330,262)             ;donot know 6
         dw 2 dup(262,220,262),-1
mus_time dw 8 dup(25)
         dw 2 dup(25),50,2 dup(25),50
         dw 4 dup(12),2 dup(25),4 dup(12),2 dup(25)
         dw 2 dup(25,25,50)
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

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,2800
delay:loop delay
      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 + -