home *** CD-ROM | disk | FTP | other *** search
/ Dave Lowe: Krustys SFX Ad Libs / Lowe_KrustysSFXAdLibs.img / DISKSENT / CONTROL.ASM < prev    next >
Encoding:
Assembly Source File  |  1980-01-01  |  1.4 KB  |  86 lines

  1.  
  2. ;********************************************************************
  3.  
  4.     ;;;    CODE USED FOR STAND ALONE TEST PURPOSE ONLY
  5.  
  6. ;********************************************************************
  7.  
  8.     DOSSEG
  9.     .MODEL TINY
  10. ;-----------------------------------------
  11.     extrn    _init_sound_isr:far              ;set up driver+timers
  12.     extrn    _terminate_sound_isr:far        ;reset timers for exit
  13.     extrn    _sendsnd:far                ;
  14.  
  15.  
  16.  
  17.     .stack    200h
  18.     .code
  19.  
  20. ;-----------------------------------------
  21. start:
  22.  
  23. ;  initiliase soundboard
  24.  
  25.     call far ptr _init_sound_isr
  26. ;________________________________________
  27.  
  28. ;   test wait for key loop
  29. ;-----------------------------
  30.     mov fx_test_number,0        ;reset space bar counter to 0
  31.  
  32. test_loop:
  33.  
  34.     call    getkey
  35.     cmp    al,'1'    ;return to dos
  36.     je    finish
  37.     cmp    al,' '    ;space bar for test fx
  38.     jne    music_key
  39.  
  40.     mov    ax,[fx_test_number]
  41.     add    ax,1
  42.     cmp    ax,50
  43.     jb    fx_ok
  44.     mov    ax,1
  45. fx_ok:    mov    [fx_test_number],ax
  46.     call    far ptr _sendsnd
  47.     jmp test_loop    
  48.  
  49. fx_test_number dw 0
  50.  
  51.  
  52.  
  53.  
  54. music_key:
  55.     sub    al,47        ;play tune 1 ie...number 50 in list
  56.     xor     ah,ah
  57.     ;push ax        ; value to stack    
  58.     call    far ptr _sendsnd
  59.     jmp test_loop
  60.  
  61. finish:
  62.  
  63.     call    far ptr _terminate_sound_isr
  64.     mov    ah,4ch
  65.     int    21h
  66.  
  67.  
  68. ;-----------------------------
  69.  
  70.  
  71.  
  72.  
  73. GetKey proc near
  74.     mov    ah,0    ;do DOS getkey
  75.     int    16h    ;ASCII in al
  76.     ret
  77. GetKey     endp
  78.  
  79. CheckKey proc near
  80.     mov    ah,1    ;do DOS checkkey
  81.     int    16h
  82.     ret
  83. CheckKey endp
  84.  
  85.     end Start
  86.     end