home *** CD-ROM | disk | FTP | other *** search
-
- ;********************************************************************
-
- ;;; CODE USED FOR STAND ALONE TEST PURPOSE ONLY
-
- ;********************************************************************
-
- DOSSEG
- .MODEL TINY
- ;-----------------------------------------
- extrn _init_sound_isr:far ;set up driver+timers
- extrn _terminate_sound_isr:far ;reset timers for exit
- extrn _sendsnd:far ;
-
-
-
- .stack 200h
- .code
-
- ;-----------------------------------------
- start:
-
- ; initiliase soundboard
-
- call far ptr _init_sound_isr
- ;________________________________________
-
- ; test wait for key loop
- ;-----------------------------
- mov fx_test_number,0 ;reset space bar counter to 0
-
- test_loop:
-
- call getkey
- cmp al,'1' ;return to dos
- je finish
- cmp al,' ' ;space bar for test fx
- jne music_key
-
- mov ax,[fx_test_number]
- add ax,1
- cmp ax,50
- jb fx_ok
- mov ax,1
- fx_ok: mov [fx_test_number],ax
- call far ptr _sendsnd
- jmp test_loop
-
- fx_test_number dw 0
-
-
-
-
- music_key:
- sub al,47 ;play tune 1 ie...number 50 in list
- xor ah,ah
- ;push ax ; value to stack
- call far ptr _sendsnd
- jmp test_loop
-
- finish:
-
- call far ptr _terminate_sound_isr
- mov ah,4ch
- int 21h
-
-
- ;-----------------------------
-
-
-
-
- GetKey proc near
- mov ah,0 ;do DOS getkey
- int 16h ;ASCII in al
- ret
- GetKey endp
-
- CheckKey proc near
- mov ah,1 ;do DOS checkkey
- int 16h
- ret
- CheckKey endp
-
- end Start
- end