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

  1. ;    /*\    $Author:   BCRANE  $
  2. ;    /*\    $Date:   31 Aug 1992 10:03:14  $
  3. ;    /*\    $Header:   X:/sccs/sdkapp/_i94f94.inv   1.0   31 Aug 1992 10:03:14   BCRANE  $
  4. ;    /*\    $Log:   X:/sccs/sdkapp/_i94f94.inv  $
  5. ;
  6. ;   Rev 1.0   31 Aug 1992 10:03:14   BCRANE
  7. ;Initial revision.
  8. ;    /*\    $Logfile:   X:/sccs/sdkapp/_i94f94.inv  $
  9. ;    /*\    $Modtimes$
  10. ;    /*\    $Revision:   1.0  $
  11. ;    /*\    $Workfile:   _i94f94.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 '_i94f94.inc: copyright Media Vision, Inc., 1992', 00h
  21.     endif
  22.  
  23. ;; i94f94() - fill i94f92buf for specified sound
  24. ;; ax returns 0 if successful, -1 if sound number out of range
  25.  
  26. _i94f94 proc near
  27.  
  28.     mov ax, es:[bx].f92snum    ; get requested sound number
  29.     cmp ax, MAXHANDLES    ; compare to max
  30.     jb @F            ; okay, continue
  31.  
  32.     xor ax, ax        ; error
  33.     dec ax            ; -1
  34.     ret
  35.  
  36. @@:    push cx
  37.     push di
  38.     push ds
  39.  
  40.     mov si, bx        ; si= passed in data area
  41.     mov cx, type i94f92buf    ; cx= size of structure
  42.     mul cl            ; ax= offset into structure array
  43.     add ax, offset f92buf    ; ax= beginning of internal table
  44.     mov di, ax        ; di= beginning of internal array
  45.  
  46.     xchg si, di        ; si= internal, es:di= passed in
  47.  
  48.     mov ax, cs
  49.     mov ds, ax        ; ds:si= internal
  50.  
  51.     rep movsb        ; copy internal to target
  52.  
  53.     pop ds
  54.     pop di
  55.     pop cx
  56.     
  57.     ret
  58. _i94f94 endp
  59.