Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. ;*****************************************************************************
  2. ;*
  3. ;*                            Open Watcom Project
  4. ;*
  5. ;*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
  6. ;*
  7. ;*  ========================================================================
  8. ;*
  9. ;*    This file contains Original Code and/or Modifications of Original
  10. ;*    Code as defined in and that are subject to the Sybase Open Watcom
  11. ;*    Public License version 1.0 (the 'License'). You may not use this file
  12. ;*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
  13. ;*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
  14. ;*    provided with the Original Code and Modifications, and is also
  15. ;*    available at www.sybase.com/developer/opensource.
  16. ;*
  17. ;*    The Original Code and all software distributed under the License are
  18. ;*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  19. ;*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
  20. ;*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
  21. ;*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
  22. ;*    NON-INFRINGEMENT. Please see the License for the specific language
  23. ;*    governing rights and limitations under the License.
  24. ;*
  25. ;*  ========================================================================
  26. ;*
  27. ;* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
  28. ;*               DESCRIBE IT HERE!
  29. ;*
  30. ;*****************************************************************************
  31.  
  32.  
  33. include langenv.inc
  34.  
  35. PNEAR   equ     0
  36. PFAR    equ     1
  37.  
  38. xinit   macro   rtn,priority
  39. XI  segment word public 'DATA'
  40. if _MODEL and _BIG_CODE
  41.         db      PFAR
  42.         db      priority
  43.         dd      rtn
  44. else
  45. if _MODEL and _USE_32_SEGS
  46.         db      PNEAR
  47.         db      priority
  48.         dd      rtn
  49. if COMP_CFG_COFF EQ 1
  50.         dw      0
  51. endif
  52. else
  53.         db      PNEAR
  54.         db      priority
  55.         dw      rtn
  56.         dw      0
  57. endif
  58. endif
  59. XI      ends
  60.         endm
  61.  
  62. xfini   macro   rtn,priority
  63. YI      segment word public 'DATA'
  64. if _MODEL and _BIG_CODE
  65.         db      PFAR
  66.         db      priority
  67.         dd      rtn
  68. else
  69. if _MODEL and _USE_32_SEGS
  70.         db      PNEAR
  71.         db      priority
  72.         dd      rtn
  73. if COMP_CFG_COFF EQ 1
  74.         dw      0
  75. endif
  76. else
  77.         db      PNEAR
  78.         db      priority
  79.         dw      rtn
  80.         dw      0
  81. endif
  82. endif
  83. YI      ends
  84.         endm
  85.  
  86. INIT_PRIORITY_THREAD   equ 1    ; priority for thread data init
  87. INIT_PRIORITY_FPU      equ 2    ; priority for FPU/EMU init
  88. INIT_PRIORITY_RUNTIME  equ 10   ; priority for run-time initialization
  89. INIT_PRIORITY_IOSTREAM equ 20   ; priority for IOSTREAM
  90. INIT_PRIORITY_LIBRARY  equ 32   ; default library-initialization priority
  91. DEF_PRIORITY           equ 32   ; ...
  92. INIT_PRIORITY_PROGRAM  equ 64   ; default program-initialization priority
  93. DTOR_PRIORITY          equ 40   ; priority for module DTOR
  94.  
  95. DGROUP  group   XIB,XI,XIE,YIB,YI,YIE
  96.  
  97. XIB segment word public 'DATA'
  98. XIB ends
  99. XI  segment word public 'DATA'
  100. XI  ends
  101. XIE segment word public 'DATA'
  102. XIE ends
  103.  
  104. YIB segment word public 'DATA'
  105. YIB ends
  106. YI  segment word public 'DATA'
  107. YI  ends
  108. YIE segment word public 'DATA'
  109. YIE ends
  110.