home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / DEVHELP / DHCALL11.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-04-14  |  3.3 KB  |  159 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 = DHCALL11.ASM
  15. ;*
  16. ;* DESCRIPTIVE NAME = C callable DevHelp interface
  17. ;*              32-Bit 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      : These DevHelps are unique to OS/2 2.x.
  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. ;*   07/26/93  @V72103       72103  Fix DevHlp_LinToGDTSelector
  54. ;*   10/22/93  @V74979       74979  Change return type to USHORT.
  55. ;*   10/22/93  @V74979       74979  Add DevHlp_VMSetMem
  56. ;*                      DevHlp_Beep
  57. ;*                      DevHlp_RegisterBeep
  58. ;*    2/ 5/94           78794  File broken apart
  59. ;*
  60. ;****************************************************************************
  61.  
  62.     .xlist
  63.     include dhmacs.inc
  64.     .list
  65.  
  66. ;*
  67. ;*  32-Bit DevHelps
  68. ;*
  69.  
  70.  
  71. Code    segment dword public 'CODE'
  72.     assume    CS:Code,DS:_DATA
  73.  
  74.  
  75. ;*
  76. ;*
  77. ;* USHORT APIENTRY DevHlp_RegisterPDD( NPSZ PhysDevName, PFN HandlerRoutine );
  78. ;*
  79. ;*
  80.  
  81.     DHDef    RegisterPDD
  82.     DHArgs    NPSZ,  PhysDevName
  83.     DHArgs    PFN,   HandlerRoutine
  84.  
  85.     mov    si, Stk.PhysDevName
  86.     les    di, Stk.HandlerRoutine
  87.  
  88.     DHCall
  89.  
  90.     DHRet1
  91.  
  92.  
  93. ;*
  94. ;*
  95. ;* USHORT APIENTRY DevHelp_RegisterBeep( PFN BeepHandler );
  96. ;*
  97. ;*
  98.     DHDef    RegisterBeep                        ;@V74979
  99.     DHArgs    PFN,    BeepHandler                    ;@V74979
  100.                                     ;@V74979
  101.     mov    cx, Stk.BeepHandler[2]                    ;@V74979
  102.     mov    di, Stk.BeepHandler[0]                    ;@V74979
  103.                                     ;@V74979
  104.     DHCall                                ;@V74979
  105.                                     ;@V74979
  106.     DHRet1                                ;@V74979
  107.  
  108.  
  109. ;*
  110. ;*
  111. ;* USHORT APIENTRY DevHelp_Beep( USHORT Frequency, USHORT DurationMS );
  112. ;*
  113. ;*                                    ;@V74979
  114.     DHDef    Beep                            ;@V74979
  115.     DHArgs    USHORT, Frequency                    ;@V74979
  116.     DHArgs    USHORT, DurationMS                    ;@V74979
  117.                                     ;@V74979
  118.     mov    bx, Stk.Frequency                    ;@V74979
  119.     mov    cx, Stk.DurationMS                    ;@V74979
  120.                                     ;@V74979
  121.     DHCall                                ;@V74979
  122.                                     ;@V74979
  123.     DHRet1                                ;@V74979
  124.  
  125.  
  126. ;*
  127. ;*
  128. ;* USHORT APIENTRY DevHlp_RegisterDeviceClass( NPSZ    DeviceString,
  129. ;*                           PFN     DriverEP,                           ;
  130. ;*                           USHORT  DeviceFlags,
  131. ;*                           USHORT  DeviceClass,
  132. ;*                           PUSHORT DeviceHandle);
  133. ;*
  134.  
  135.     DHDef    RegisterDeviceClass
  136.     DHArgs    NPSZ,     DeviceString
  137.     DHArgs    PFN,     DriverEP
  138.     DHArgs    USHORT,  DeviceFlags
  139.     DHArgs    USHORT,  DeviceClass
  140.     DHARGS    PUSHORT, DeviceHandle
  141.  
  142.     mov    si, Stk.DeviceString
  143.     mov    bx, word ptr Stk.DriverEP
  144.     mov    ax, word ptr Stk.DriverEP+2
  145.     mov    di, Stk.DeviceFlags
  146.     mov    cx, Stk.DeviceClass
  147.  
  148.     DHCall
  149.  
  150.     les    si, Stk.DeviceHandle
  151.     mov    es:[si], ax
  152.  
  153.     DHRet1
  154.  
  155.  
  156.  
  157. Code    Ends
  158.     End
  159.