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 / _I94F95.INC < prev    next >
Text File  |  1992-08-31  |  1KB  |  85 lines

  1. ;    /*\    $Author:   BCRANE  $
  2. ;    /*\    $Date:   31 Aug 1992 10:03:16  $
  3. ;    /*\    $Header:   X:/sccs/sdkapp/_i94f95.inv   1.0   31 Aug 1992 10:03:16   BCRANE  $
  4. ;    /*\    $Log:   X:/sccs/sdkapp/_i94f95.inv  $
  5. ;
  6. ;   Rev 1.0   31 Aug 1992 10:03:16   BCRANE
  7. ;Initial revision.
  8. ;    /*\    $Logfile:   X:/sccs/sdkapp/_i94f95.inv  $
  9. ;    /*\    $Modtimes$
  10. ;    /*\    $Revision:   1.0  $
  11. ;    /*\    $Workfile:   _i94f95.inc  $ 
  12.  
  13. ;; shark functions
  14. ;; dx:ax can be used to return values
  15. ;; si can be trashed
  16. ;; no other precautions taken
  17.  
  18.     if VERBOSE
  19.     align 256
  20.     db '_i94f93.inc: copyright Media Vision, Inc., 1992', 00h
  21.     endif
  22.  
  23. ;; i94f95() - set/unset internal dma buffer
  24. ;; es:bx points to the following data structure
  25. ;; dmaoff    dw
  26. ;; dmaseg    dw
  27. ;; dmasize    dw
  28. ;; dmadivs    dw
  29.  
  30. _i94f95 proc near
  31.  
  32.     push ds
  33.     push cs
  34.     pop ds
  35.  
  36.     mov ax, es:[bx][0]
  37.     cmp ax, -1        ; -1 == return current
  38.     jz f95get
  39.  
  40.     mov ourdmaoff, ax
  41.  
  42.     mov ax, es:[bx][2]
  43.     mov ourdmaseg, ax
  44.  
  45.     mov ax, es:[bx][4]
  46.     mov ourdmasize, ax
  47.     mov dx, ax
  48.  
  49.     mov ax, es:[bx][6]
  50.     mov ourdmadivs, ax
  51.  
  52.     xchg dx, ax
  53.     or dx, dx
  54.     jnz @F
  55.     mov dx, 2
  56.     mov ourdmadivs, dx
  57.  
  58. @@:    push bx
  59.     mov bx, dx
  60.     xor dx, dx
  61.     div bx
  62.     pop bx
  63.     shl ax, 1
  64.     shl ax, 1
  65.     shl ax, 1
  66.     shl ax, 1
  67.     mov ourdivsize, ax
  68.  
  69.     pop ds
  70.     ret
  71.  
  72. f95get:
  73.     mov ax, ourdmaoff
  74.     mov es:[bx][0], ax
  75.     mov ax, ourdmaseg
  76.     mov es:[bx][2], ax
  77.     mov ax, ourdmasize
  78.     mov es:[bx][4], ax
  79.     mov ax, ourdmadivs
  80.     mov es:[bx][6], ax
  81.     pop ds
  82.     ret
  83.  
  84. _i94f95 endp
  85.