home *** CD-ROM | disk | FTP | other *** search
/ Audio 4.94 - Over 11,000 Files / audio-11000.iso / msdos / sndbords / proaudio / pcmtlsrc / pcm.arj / MVSTATE.ASM < prev    next >
Assembly Source File  |  1992-09-01  |  3KB  |  113 lines

  1. ;$Author:   BCRANE  $
  2. ;$Date:   01 Sep 1992 13:33:54  $
  3. ;$Header:   X:/sccs/sdkapp/mvstate.asv   1.1   01 Sep 1992 13:33:54   BCRANE  $
  4. ;$Log:   X:/sccs/sdkapp/mvstate.asv  $
  5. ;  
  6. ;     Rev 1.1   01 Sep 1992 13:33:54   BCRANE
  7. ;  moved data to mvsound.asm, code to end of program to be jettisoned on exit
  8. ;  
  9. ;     Rev 1.0   31 Aug 1992 09:46:18   BCRANE
  10. ;  Initial revision.
  11. ;  
  12. ;     Rev 1.4   24 Jul 1992 15:41:14   DCODY
  13. ;  The function now will search for the board in 4 locations if the
  14. ;  user passes in a 0 as the base address.
  15. ;  
  16. ;     Rev 1.3   20 Jul 1992 11:46:18   DCODY
  17. ;  Makes up to 4 passes to find the hardware at up to 4 I/O addresses.
  18. ;  
  19. ;     Rev 1.2   17 Jul 1992 14:02:32   DCODY
  20. ;  moved TheDMAChannel and TheIRQChannel into gethw. Also declared a copy
  21. ;  of mvtranslatecode in the code segment.
  22. ;  
  23. ;     Rev 1.1   23 Jun 1992 16:32:50   DCODY
  24. ;  PAS2 update
  25. ;  
  26. ;     Rev 1.0   15 Jun 1992 09:39:50   BCRANE
  27. ;  Initial revision.
  28. ;$Logfile:   X:/sccs/sdkapp/mvstate.asv  $
  29. ;$Modtimes$
  30. ;$Revision:   1.1  $
  31.  
  32.  
  33.         page    64,131
  34.     subttl    MVSTATE --  Audio Spectrum Sound Support Code
  35.  
  36. ;   /*\
  37. ;   |*|----====< MVSTATE >====----
  38. ;   |*|
  39. ;   |*|  This module maintains the state table and pointer
  40. ;   |*|
  41. ;   |*|  Media Vision, Inc. Copyright (c) 1991,1992. All Rights Reserved.
  42. ;   |*|
  43. ;   \*/
  44.  
  45.     .xlist
  46. ;    include model.inc
  47. ;        include masm.inc
  48. ;    include state.inc
  49. ;    include common.inc
  50.     .list
  51. ;    .code
  52. ;
  53. ;   /*\
  54. ;---|*|---------------====< MVInitStatePtr() >====---------------
  55. ;---|*|
  56. ;---|*| Initializes the state table pointer.
  57. ;---|*|
  58. ;---|*| Entry Conditions:
  59. ;---|*|     None
  60. ;---|*|
  61. ;---|*| Exit Conditions:
  62. ;---|*|     DX:AX point to the state table
  63. ;   \*/
  64.  
  65.     public    MVInitStatePtr
  66. MVInitStatePtr    proc
  67. ;
  68. ; this code can only be processed once per loading
  69. ;
  70.     cmp    wptr [mvhwShadowPointer+2],0    ; have we been here?
  71.     jnz    imvsp_done            ; yes, don't do this again
  72. ;
  73. ; setup a pointer to our local hardware state table
  74. ;
  75.     lea    bx,HardwareShadowTable
  76.     mov    wptr [mvhwShadowPointer+0],bx
  77.     mov    wptr [mvhwShadowPointer+2],ds
  78.  
  79.     mov    [bx._audiomixr],31h    ; lowest filter setting
  80.     mov    [bx._crosschannel],09h    ; cross channel l-2-l, r-2-r
  81. ;
  82. ; find the int 2F interface and if found, use it's state table pointer
  83. ;
  84.     mov    ax,0BC00h        ; MVSOUND.SYS ID check
  85.     mov    bx,'??'
  86.     sub    cx,cx
  87.     sub    dx,dx
  88.  
  89.     int    2fh            ; will return something if loaded
  90.  
  91.     xor    bx,cx
  92.     xor    bx,dx
  93.     cmp    bx,'MV'                 ; is the int 2F interface here?
  94.     jnz    imvsp_done        ; no, exit home
  95.  
  96.     mov    ax,0BC02H        ; get the pointer
  97.         int     2fh
  98.     cmp    ax,'MV'                 ; busy or intercepted
  99.     jnz    imvsp_done
  100.  
  101.     mov    wptr [mvhwShadowPointer+0],bx
  102.     mov    wptr [mvhwShadowPointer+2],dx
  103. ;
  104. imvsp_done:
  105.     mov    ax,wptr [mvhwShadowPointer+0]
  106.     mov    dx,wptr [mvhwShadowPointer+2]
  107.  
  108.         ret
  109.  
  110. MVInitStatePtr    endp
  111.  
  112.  
  113.