home *** CD-ROM | disk | FTP | other *** search
- ;*DDK*************************************************************************/
- ;
- ; COPYRIGHT Copyright (C) 1995 IBM Corporation
- ;
- ; The following IBM OS/2 WARP source code is provided to you solely for
- ; the purpose of assisting you in your development of OS/2 WARP device
- ; drivers. You may use this code in accordance with the IBM License
- ; Agreement provided in the IBM Device Driver Source Kit for OS/2. This
- ; Copyright statement may not be removed.;
- ;*****************************************************************************/
- ;/*****************************************************************************
- ;*
- ;* SOURCE FILE NAME = CS_HELP.ASM
- ;*
- ;* DESCRIPTIVE NAME =
- ;*
- ;*
- ;* VERSION
- ;*
- ;* DATE
- ;*
- ;* DESCRIPTION
- ;*
- ;* FUNCTIONS
- ;*
- ;*
- ;* NOTES NONE
- ;*
- ;* STRUCTURES NONE
- ;*
- ;* EXTERNAL REFERENCES
- ;*
- ;* NONE
- ;*
- ;* EXTERNAL FUNCTIONS
- ;*
- ;* NONE
- ;*
- ;* CHANGE ACTIVITY =
- ;* DATE FLAG APAR CHANGE DESCRIPTION
- ;* -------- ---------- ----- --------------------------------------
- ;* mm/dd/yy @Vr.mpppxx xxxxx xxxxxxx
- ;*****************************************************************************/
-
- .286
- .287
-
- ;*
- ;* constant definitions
- ;*
-
- ATTACHDD equ 42
-
-
- _DATA SEGMENT WORD PUBLIC 'DATA'
- _DATA ENDS
-
- _BSS SEGMENT WORD PUBLIC 'BSS'
- _BSS ENDS
-
- CONST SEGMENT WORD PUBLIC 'CONST'
- CONST ENDS
-
- _TEXT SEGMENT WORD PUBLIC 'CODE'
- _TEXT ENDS
-
- DGROUP GROUP _DATA, CONST, _BSS
- CGRP GROUP _TEXT
-
-
- _TEXT SEGMENT WORD PUBLIC 'CODE'
- ASSUME cs:CGRP, ds:DGROUP, es:NOTHING, ss:NOTHING
-
-
- extrn _service_callback:near
-
-
- ;/***************************************************************************
- ;*
- ;* FUNCTION NAME = _callback_handler
- ;*
- ;* DESCRIPTION =
- ;*
- ;* INPUT =
- ;*
- ;* OUTPUT =
- ;*
- ;* RETURN-NORMAL =
- ;*
- ;* RETURN-ERROR =
- ;*
- ;**************************************************************************/
-
- public _callback_handler
- _callback_handler proc far ; void callback_handler(void)
-
- pushf ; save registers
- push ax
- push bx
- push cx
- push dx
- push si
- push di
- push bp
- push ds
- push es
-
-
-
-
-
- and ax,00ffh ;
- push ax ; set up event number,
- push cx ; socket number and data segment
- mov ax,DGROUP ; - service the call back
- mov ds,ax ;
- call _service_callback
- add sp,4
-
- pop es ; restore registers
- pop ds
- pop bp
- pop di
- pop si
- pop dx
- pop cx
- pop bx
- pop ax
- popf
-
- ret ; return
-
- _callback_handler endp
-
- _TEXT ENDS
-
- END
-