home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / msdos / sndbords / proaudio / pcmtlsrc / pcmtlsrc.arj / PCM.ARJ / INT10.INC < prev    next >
Text File  |  1992-09-18  |  2KB  |  134 lines

  1. ;    /*\
  2. ;    |*| int21.inc - intercept certain calls and output sound
  3. ;    |*|
  4. ;    |*|
  5. ;    |*|
  6. ;    |*|
  7. ;    |*|
  8. ;    \*/
  9.  
  10. intr10 proc far
  11.     sti
  12.     pushf
  13.  
  14.     inc word ptr cs:id10.cnt
  15.     test word ptr cs:id10.vold[2], 0FFFFh
  16.     jnz @F
  17.  
  18.     popf
  19.     iret
  20.  
  21. @@:    cmp ah, 0Eh            ; console i/o
  22.     jnz @F                ; no, skip to old routine
  23.     cmp al, 7            ; output a bell?
  24.     jnz doold10            ; no, skip to old routine
  25.     jmp short doour10
  26.  
  27. @@:    jmp short doold10
  28.     
  29. doour10:
  30.     push ax
  31.     push dx
  32.     push si
  33.     mov al, 1
  34.     mov si, 8016h
  35.     int 94h
  36.     pop si
  37.     pop dx
  38.     pop ax
  39.  
  40.     popf
  41.     iret
  42.     
  43. doold10:
  44.     popf
  45.     jmp dword ptr cs:id10.vold
  46.  
  47.     iret
  48. intr10 endp
  49.  
  50. intr29 proc far
  51.     sti
  52.     pushf
  53.  
  54.     inc word ptr cs:id29.cnt
  55.     test word ptr cs:id29.vold[2], 0FFFFh
  56.     jnz @F
  57.  
  58.     popf
  59.     iret
  60.  
  61. @@:    cmp al, 7            ; output a bell?
  62.     jnz @F                ; no, next check
  63.     jmp short doour29        ; got a match, output a sound
  64.  
  65. @@:    jmp short doold29
  66.     
  67. doour29:
  68.     push ax
  69.     push dx
  70.     push si
  71.     mov al, 1
  72.     mov si, 8016h
  73.     int 94h
  74.     pop si
  75.     pop dx
  76.     pop ax
  77.  
  78.     popf
  79.     iret
  80.     
  81. doold29:
  82.     popf
  83.     jmp dword ptr cs:id29.vold
  84.  
  85.     iret
  86. intr29 endp
  87.  
  88. if DODISKIO
  89. ;    /*\
  90. ;    |*| intr24 - critical error handler
  91. ;    |*|
  92. ;    |*|
  93. ;    |*|
  94. ;    |*|
  95. ;    |*|
  96.  
  97. intr24 proc far
  98.     sti
  99.     pushf
  100.  
  101.     inc word ptr cs:id24.cnt
  102.     test word ptr cs:id24.vold[2], 0FFFFh
  103.     jnz @F
  104.  
  105.     popf
  106.     iret
  107.  
  108. @@:
  109. doour24:
  110.     push ax
  111.     push si
  112.     mov al, 1
  113.     mov si, 8016h
  114.     int 94h
  115.     pop si
  116.     pop ax
  117.  
  118. doold24:
  119.     popf
  120.     jmp dword ptr cs:id24.vold
  121.  
  122.     iret
  123. intr24 endp
  124.  
  125. init24 proc near
  126.  
  127.     mov cs:[12h][0], offset intr24    ; set intr24 into our PSP
  128.     mov cs:[12h][2], cs
  129.  
  130.     ret
  131. init24 endp
  132.  
  133. endif
  134.