home *** CD-ROM | disk | FTP | other *** search
/ Sound, Music & MIDI Collection 2 / SMMVOL2.bin / MIDI_PAT / MTOOLS.ZIP / PLAYRDEV.EXE / PLAYREXT.ASM < prev    next >
Encoding:
Assembly Source File  |  1992-11-07  |  792 b   |  55 lines

  1. ; Play/R interface routines - ASM example
  2. ;
  3.         dosseg
  4.         .model  medium
  5.  
  6.         .data
  7.  
  8.         public _param
  9.  
  10. _param          db     64 dup (0)
  11. playrid         db     "Play/R  "
  12. idnum           dw     0ffffh
  13.  
  14.         .const
  15.  
  16. tessmpx         equ    5453h
  17. mpxint          equ    2fh
  18.  
  19.         .code
  20.  
  21.         public  _checkres,_callplayr
  22.  
  23. _checkres       proc
  24.         push ds
  25.         mov ax,@data
  26.         mov ds,ax
  27.         mov si,offset playrid
  28.         mov ax,tessmpx
  29.         xor bx,bx
  30.         xor cx,cx
  31.         int mpxint
  32.         pop ds
  33.         cmp ax,0ffffh
  34.         jne @@1
  35.         mov ax,cx
  36.         jmp @@2
  37. @@1:            mov ax,0ffffh
  38. @@2:
  39.         mov idnum,ax
  40.         ret
  41. _checkres       endp
  42.  
  43. _callplayr      proc
  44.         mov ax,@data
  45.         mov es,ax
  46.         mov di,offset _param
  47.         mov ax,tessmpx
  48.         mov bx,20h
  49.         mov cx,idnum
  50.         int mpxint
  51.         ret
  52. _callplayr      endp
  53.  
  54.         end
  55.