home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / PEN / PENTKT / PENBASE / BUTNUL.ASM next >
Assembly Source File  |  1995-04-14  |  6KB  |  138 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. ;      /*****************************************************************/
  12. ;      /*                                                               */
  13. ;      /*                                                               */
  14. ;      /*****************************************************************/
  15. ;      /******************* START OF SPECIFICATIONS *********************/
  16. ;      /*                                                               */
  17. ;      /*  SOURCE FILE NAME: BUTNUL.ASM                                 */
  18. ;      /*                                                               */
  19. ;      /*  DESCRIPTIVE NAME: Null button handler                        */
  20. ;      /*                                                               */
  21. ;      /*                                                               */
  22. ;      /*  STATUS:  Version 1.0                                         */
  23. ;      /*                                                               */
  24. ;      /*  NOTES: Link this module instead of BUTTON.ASM if the         */
  25. ;      /*         driver does not have any buttons. This module         */
  26. ;      /*         supplies all the BUTTON.ASM entry point and takes     */
  27. ;      /*         up minimum space and overhead.                        */
  28. ;      /*                                                               */
  29. ;      /*  ENTRY POINTS:                                                */
  30. ;      /*      See public statements                                    */
  31. ;      /*  EXTERNAL REFERENCES:                                         */
  32. ;      /*      See extrn statements                                     */
  33. ;      /*                                                               */
  34. ;      /******************* END  OF  SPECIFICATIONS *********************/
  35. .xlist
  36.   include pensegs.inc
  37.   include penei.inc
  38. .list
  39.  
  40. .286p
  41.  
  42. ;------------------------------------------------------------------------------
  43. ; external data references
  44. ;------------------------------------------------------------------------------
  45.  
  46. ;------------------------------------------------------------------------------
  47. ; external routines
  48. ;------------------------------------------------------------------------------
  49.  
  50. ;------------------------------------------------------------------------------
  51. ; local equates
  52. ;------------------------------------------------------------------------------
  53.  
  54. ;------------------------------------------------------------------------------
  55. ; local data declarations
  56. ;------------------------------------------------------------------------------
  57.  
  58. DSEG   segment
  59. public buttons
  60. buttons   dw 0           ; state of buttons, 1=activated, 0=released
  61.  
  62. DSEG   ends
  63.  
  64.  
  65. CSEG SEGMENT
  66.      ASSUME    CS:CGROUP, SS:nothing, ES:nothing, DS:DGROUP
  67.  
  68. ;---- ROUTINES TO HANDLE EVENTS -----------------------------------------------
  69. ;
  70. ;------------------------------------------------------------------------------
  71.  
  72. ;------------------------------------------------------------------------------
  73. ; process an event for a device dependent locator device
  74. ;  dl = 0 released -1=activated
  75. ;  bx = button dcb
  76. ;  cx = button index (0 to 15)
  77. ;
  78. ;------------------------------------------------------------------------------
  79. public But_Engine
  80. But_Engine    proc
  81.   stc
  82.   ret
  83. But_Engine endp
  84.  
  85. ;------------------------------------------------------------------------------
  86. ; return button emulation
  87. ; returns
  88. ;  al=emulated mouse buttons
  89. ;  dx=bits for loc_cntl
  90. ;
  91. ; This routine is called at the start of a stroke by the locator engine to
  92. ; latch mouse emulated buttons for the duration of the stroke. One Time shifts
  93. ; can be cleared now.
  94. ;------------------------------------------------------------------------------
  95. public But_GetButtonShift
  96. But_GetButtonShift proc
  97.   mov al, EV_BUTTON1
  98.   xor dx,dx
  99.   ret
  100. But_GetButtonShift endp
  101.  
  102. ;------------------------------------------------------------------------------
  103. ; returns
  104. ;  ax=current button state
  105. ;------------------------------------------------------------------------------
  106. public But_GetButtons
  107. But_GetButtons proc
  108.   mov  ax, buttons
  109.   ret
  110. But_GetButtons endp
  111.  
  112. ;---- MISCELLANEOUS ROUTINES --------------------------------------------------
  113. ; bx = dcb
  114. ;------------------------------------------------------------------------------
  115. public But_CalcCaps
  116. But_CalcCaps proc
  117.   ret
  118. But_CalcCaps endp
  119.  
  120. CSEG ends
  121. ;---- INITIALIZATION ROUTINES -------------------------------------------------
  122. ;
  123. ; note: this code is truncated from the driver after the INIT command returns
  124. ;       to OS/2
  125. ;------------------------------------------------------------------------------
  126.  
  127. ;------------------------------------------------------------------------------
  128. ; Initialize engine
  129. ;  bx = dcb
  130. ;------------------------------------------------------------------------------
  131. CSEGI segment
  132. public But_Init
  133. But_Init proc
  134.   ret
  135. But_Init endp
  136. CSEGI ends
  137. end
  138.