Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

73 lines
1.7 KiB

  1. ;----------------------------------------------------------------------------
  2. ; start.asm -- Start Code for loading the DLGS dll
  3. ;
  4. ; Copyright (c) Microsoft Corporation, 1990
  5. ;----------------------------------------------------------------------------
  6. ;----------------------------------------------------------------------------
  7. ; This module contains the code initially executed to load and
  8. ; initialize the DLL
  9. ;----------------------------------------------------------------------------
  10. ;-----Includes, Definitions, Externs, Etc.-----------------------------------
  11. .xlist
  12. include cmacros.inc
  13. include windows.inc
  14. .list
  15. ExternFP <LibMain>
  16. createSeg INIT_TEXT, INIT_TEXT, BYTE, PUBLIC, CODE
  17. sBegin INIT_TEXT
  18. assumes cs,INIT_TEXT
  19. ?PLM=0
  20. ExternA <_acrtused>
  21. ?PLM=1
  22. ExternFP <LocalInit>
  23. ;-------- Entry Points ---------------------------------------------------
  24. cProc LibEntry, <FAR,PUBLIC>
  25. ;
  26. ; CX = size of heap
  27. ; DI = module handle
  28. ; DS = automatic data segment
  29. ; ES:SI = address of command line (not used)
  30. ;
  31. include convdll.inc
  32. cBegin
  33. push di
  34. push ds
  35. push cx
  36. push es
  37. push si
  38. jcxz callc
  39. xor ax,ax
  40. cCall LocalInit <ds, ax, cx>
  41. or ax,ax
  42. jz error
  43. ;LibMain(HANDLE, WORD, WORD, LPSTR)
  44. callc:
  45. call LibMain ; Main C routine
  46. jmp short exit
  47. error:
  48. pop si
  49. pop es
  50. pop cx
  51. pop ds
  52. pop di
  53. exit:
  54. cEnd
  55. sEnd INIT_TEXT
  56. end LibEntry