INITMDLL.A 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. (* Release 3.10 *)
  2. (*-------------------------------------------------------------------------*
  3. * *
  4. * INITMDLL.A - Modula & Pascal library DLL startup code *
  5. * *
  6. * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
  7. * All Rights Reserved *
  8. * *
  9. *--------------------------------------------------------------------------*)
  10. module initmdll
  11. segment INITCODE(CODE,28H)
  12. segment _INIT(INIT_CODE,28H)
  13. segment INIT_DATA(FAR_DATA,28H)
  14. segment C_ORDER(FCODE,28H)
  15. segment D_ORDER(BSS,68H)
  16. segment EMU_STATE(DATA,28H)
  17. segment _CONST(DATA,28H)
  18. segment _DATA(DATA,28H)
  19. segment BSS_START(BSS,28H)
  20. segment _BSS(BSS,28H)
  21. segment BSS_END(BSS,28H)
  22. group DGROUP(EMU_STATE,_CONST,_DATA,BSS_START,_BSS,BSS_END)
  23. select INIT_DATA
  24. InitRec: dw 0, 0, 0, _INIT
  25. select BSS_START
  26. public __bss_start:
  27. public _edata:
  28. select BSS_END
  29. public __bss_end:
  30. public _end:
  31. select D_ORDER
  32. buffer: org 8
  33. extrn __set_PMDbody_vector
  34. extrn __set_exit1_vector
  35. (*%T _PMD *)
  36. extrn __PMDbody
  37. (*%E *)
  38. select _DATA
  39. (*%T _PMD *)
  40. PMDbody_ptr: dd __PMDbody
  41. (*%E *)
  42. extrn __InitLink
  43. select INITCODE
  44. push ds
  45. mov ax, _BSS
  46. mov ds, ax
  47. (*%T _PMD *)
  48. mov bx, [__PMDbody_ptr][2]
  49. mov ax, [__PMDbody_ptr]
  50. call far __set_PMDbody_vector
  51. (*%E *)
  52. pop ds
  53. mov bx, InitRec
  54. mov ax, INIT_DATA
  55. call far __InitLink
  56. mov ax, -1
  57. ret far 0
  58. dw EMU_STATE
  59. dw _CONST
  60. dw _DATA
  61. dw BSS_START
  62. dw _BSS
  63. dw BSS_END (* establishs order ! *)
  64. dw 0
  65. end *
  66.