home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / DEVHELP / DHCALL7.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-04-14  |  3.0 KB  |  153 lines

  1. ;*DDK*************************************************************************/
  2. ;
  3. ; COPYRIGHT    Copyright (C) 1995 IBM Corporation
  4. ;
  5. ;    The following IBM OS/2 WARP source code is provided to you solely for
  6. ;    the purpose of assisting you in your development of OS/2 WARP device
  7. ;    drivers. You may use this code in accordance with the IBM License
  8. ;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
  9. ;    Copyright statement may not be removed.;
  10. ;*****************************************************************************/
  11. ; SCCSID = %w% %e%
  12. ;**************************************************************************
  13. ;*
  14. ;* SOURCE FILE NAME = DHCALL7.ASM
  15. ;*
  16. ;* DESCRIPTIVE NAME = C callable DevHelp Interface
  17. ;*                    Semaphore Management DevHelp Calls
  18. ;*
  19. ;*
  20. ;* VERSION = V2.0
  21. ;*
  22. ;* DATE
  23. ;*
  24. ;* DESCRIPTION :
  25. ;*
  26. ;* Purpose:
  27. ;*
  28. ;*
  29. ;*
  30. ;*
  31. ;* FUNCTIONS  :
  32. ;*
  33. ;*
  34. ;*
  35. ;*
  36. ;*
  37. ;*
  38. ;*
  39. ;* NOTES
  40. ;*
  41. ;*
  42. ;* STRUCTURES
  43. ;*
  44. ;* EXTERNAL REFERENCES
  45. ;*
  46. ;*
  47. ;*
  48. ;* EXTERNAL FUNCTIONS
  49. ;*
  50. ;* CHANGE ACTIVITY =
  51. ;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
  52. ;*   --------  ----------  -----  --------------------------------------
  53. ;*   10/22/93  @V74979     74979  Change return type to USHORT
  54. ;*
  55. ;*
  56. ;****************************************************************************
  57.  
  58.         .xlist
  59.         include dhmacs.inc
  60.         .list
  61.  
  62. ;*
  63. ;*  Semaphore Management
  64. ;*
  65.  
  66.  
  67.  
  68. Code    segment dword public 'CODE'
  69.         assume  CS:Code,DS:_DATA
  70.  
  71. ;*
  72. ;*
  73. ;*  USHORT APIENTRY DevHlp_SemHandle( ULONG SemKey, USHORT SemUseFlag,
  74. ;*                                    PULONG SemHandle );
  75. ;*
  76. ;*
  77.  
  78.         DHDef   SemHandle
  79.         DHArgs  ULONG,   SemKey
  80.         DHArgs  USHORT,  SemUseFlag
  81.         DHArgs  PULONG,  SemHandle
  82.  
  83.         mov     bx, Stk.SemKey[0]
  84.         mov     ax, Stk.SemKey[2]
  85.         mov     dh, Stk.SemUseFlag
  86.  
  87.         DHCall
  88.  
  89.         les     si, Stk.SemHandle
  90.         mov     es:[si][0], bx
  91.         mov     es:[si][2], ax
  92.  
  93.         DHRet1
  94.  
  95. ;*
  96. ;*
  97. ;*  USHORT APIENTRY DevHlp_SemClear( ULONG SemHandle );
  98. ;*
  99. ;*
  100.  
  101.         DHDef   SemClear
  102.         DHArgs  ULONG,   SemHandle
  103.  
  104.         mov     bx, Stk.SemKey[0]
  105.         mov     ax, Stk.SemKey[2]
  106.  
  107.         DHCall
  108.  
  109.         DHRet1
  110.  
  111. ;*
  112. ;*
  113. ;*  USHORT APIENTRY DevHlp_SemRequest( ULONG SemHandle, ULONG SemTimeout );
  114. ;*
  115. ;*
  116.  
  117.         DHDef   SemRequest
  118.         DHArgs  ULONG,   SemHandle
  119.         DHArgs  ULONG,   SemTimeout
  120.  
  121.         mov     bx, Stk.SemHandle[0]
  122.         mov     ax, Stk.SemHandle[2]
  123.         mov     cx, Stk.SemTimeout[0]
  124.         mov     di, Stk.SemTimeout[2]
  125.  
  126.         DHCall
  127.  
  128.         DHRet1
  129.  
  130. ;*
  131. ;*
  132. ;*  USHORT APIENTRY DevHlp_SendEvent( USHORT EventType, USHORT Parm );
  133. ;*
  134. ;*
  135.  
  136.  
  137.         DHDef   SendEvent
  138.         DHArgs  USHORT,  EventType
  139.         DHArgs  USHORT,  Parm
  140.  
  141.         mov     ah, Stk.EventType
  142.         mov     bx, Stk.Parm
  143.  
  144.         DHCall
  145.  
  146.         DHRet1
  147.  
  148.  
  149. Code    Ends
  150.  
  151.  
  152.         End
  153.