home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / PCMCIA / CLDFM / CS_HELP.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-04-14  |  3.0 KB  |  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. ;* SOURCE FILE NAME = CS_HELP.ASM
  14. ;*
  15. ;* DESCRIPTIVE NAME =
  16. ;*
  17. ;*
  18. ;* VERSION
  19. ;*
  20. ;* DATE
  21. ;*
  22. ;* DESCRIPTION
  23. ;*
  24. ;* FUNCTIONS
  25. ;*
  26. ;*
  27. ;* NOTES        NONE
  28. ;*
  29. ;* STRUCTURES   NONE
  30. ;*
  31. ;* EXTERNAL REFERENCES
  32. ;*
  33. ;*              NONE
  34. ;*
  35. ;* EXTERNAL FUNCTIONS
  36. ;*
  37. ;*              NONE
  38. ;*
  39. ;* CHANGE ACTIVITY =
  40. ;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
  41. ;*   --------  ----------  -----  --------------------------------------
  42. ;*   mm/dd/yy  @Vr.mpppxx  xxxxx  xxxxxxx
  43. ;*****************************************************************************/
  44.  
  45. .286
  46. .287
  47.  
  48. ;*
  49. ;* constant definitions
  50. ;*
  51.  
  52. ATTACHDD equ 42
  53.  
  54.  
  55. _DATA   SEGMENT WORD PUBLIC 'DATA'
  56. _DATA   ENDS
  57.  
  58. _BSS    SEGMENT WORD PUBLIC 'BSS'
  59. _BSS    ENDS
  60.  
  61. CONST   SEGMENT WORD PUBLIC 'CONST'
  62. CONST   ENDS
  63.  
  64. _TEXT   SEGMENT WORD PUBLIC 'CODE'
  65. _TEXT   ENDS
  66.  
  67. DGROUP  GROUP   _DATA, CONST, _BSS
  68. CGRP    GROUP   _TEXT
  69.  
  70.  
  71. _TEXT   SEGMENT WORD PUBLIC 'CODE'
  72.         ASSUME cs:CGRP, ds:DGROUP, es:NOTHING, ss:NOTHING
  73.  
  74.  
  75. extrn _service_callback:near
  76.  
  77.  
  78. ;/***************************************************************************
  79. ;*
  80. ;* FUNCTION NAME = _callback_handler
  81. ;*
  82. ;* DESCRIPTION   =
  83. ;*
  84. ;* INPUT         =
  85. ;*
  86. ;* OUTPUT        =
  87. ;*
  88. ;* RETURN-NORMAL =
  89. ;*
  90. ;* RETURN-ERROR  =
  91. ;*
  92. ;**************************************************************************/
  93.  
  94. public _callback_handler
  95. _callback_handler proc far             ; void callback_handler(void)
  96.  
  97.             pushf                      ; save registers
  98.             push ax
  99.             push bx
  100.             push cx
  101.             push dx
  102.             push si
  103.             push di
  104.             push bp
  105.             push ds
  106.             push es
  107.  
  108.  
  109.  
  110.  
  111.  
  112.             and ax,00ffh               ; 
  113.             push ax                    ; set up event number,
  114.             push cx                    ; socket number and data segment
  115.             mov ax,DGROUP              ; - service the call back
  116.             mov ds,ax                  ; 
  117.             call _service_callback
  118.             add sp,4
  119.  
  120.             pop es                     ; restore registers
  121.             pop ds
  122.             pop bp
  123.             pop di
  124.             pop si
  125.             pop dx
  126.             pop cx
  127.             pop bx
  128.             pop ax
  129.             popf
  130.  
  131.             ret                        ; return
  132.  
  133. _callback_handler endp
  134.  
  135. _TEXT ENDS
  136.  
  137.         END
  138.