home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / source / wpshidl / samples / wpcar / dllstub.asm < prev    next >
Encoding:
Assembly Source File  |  1994-03-03  |  1.7 KB  |  55 lines

  1. ;       SCCSID = @(#)dllstub.asm    6.1 91/10/08
  2. ;       SCCSID = @(#)dllstub.asm    6.2 91/08/24
  3. ;  SCCSID = @(#)dllstub.asm    6.2 91/08/24
  4. ;************************************************************************
  5. ;*                                                                      *
  6. ;*                                                                      *
  7. ;*               Copyright (c) IBM Corporation  1987, 1990              *
  8. ;*               Copyright (c) Microsoft Corp.  1987, 1990              *
  9. ;*                         All Rights Reserved                          *
  10. ;*                                                                      *
  11. ;************************************************************************
  12. ;
  13. ; DLL Initialization module for 32-bit PMWP.DLL - this was ripped word for
  14. ; word from the application design guide, so if it doesn't work, shoot the
  15. ; information developers !                                      - ChrisA
  16. ;
  17.  
  18. .386
  19. .MODEL SMALL
  20.  
  21. EXTRN  _DLLInit : NEAR
  22. EXTRN  _DLLUninit : NEAR
  23.  
  24. .CODE
  25.  
  26. ASSUME CS: FLAT, DS: FLAT, SS: FLAT, ES: FLAT
  27.  
  28. ENTRYPOINT PROC
  29. ;int 3
  30.     push ebp                      ; create a stack frame
  31.     mov  ebp,esp
  32.  
  33.     cmp DWORD PTR [ebp+8], 1
  34.     je  Uninit
  35.  
  36.     mov  eax,0                    ; argc == 0
  37.     push eax
  38.  
  39.  
  40.     call _DLLInit                 ; Jump to our init routine...
  41.     jmp Done
  42.  
  43. Uninit:
  44.     call _DLLUninit               ; Jump to our uninit routine...
  45.  
  46. Done:
  47.     mov  esp,ebp
  48.     pop  ebp                      ; recover bp
  49. ;   mov  eax,1                    ; Successful
  50.     ret                           ; return to loader
  51.  
  52. ENTRYPOINT ENDP
  53.  
  54. END ENTRYPOINT
  55.