Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Compare with Previous | 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. ;
  34. ; segment definitions for WATCOM C/C++32
  35. ;
  36. include langenv.inc
  37.  
  38.         name    segdefns
  39. .386p
  40.  
  41.         assume  nothing
  42.  
  43.  
  44. if COMP_CFG_COFF
  45. DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,_BSS,STACK
  46. else
  47. ifdef __LINUX__
  48. DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,TIB,TI,TIE,XIB,XI,XIE,YIB,YI,YIE,_BSS
  49. else
  50. DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,_BSS,STACK,TIB,TI,TIE,XIB,XI,XIE,YIB,YI,YIE
  51. endif
  52. endif
  53.  
  54. ; this guarantees that no function pointer will equal NULL
  55. ; (WLINK will keep segment 'BEGTEXT' in front)
  56. ; This segment must be at least 4 bytes in size to avoid confusing the
  57. ; signal function.
  58.  
  59. BEGTEXT segment use32 word public 'CODE'
  60.         assume  cs:BEGTEXT
  61. forever label   near
  62.         int     3h
  63.         jmp     short forever
  64.         ; NOTE that __begtext needs to be at offset 3
  65.         ; don't move it.  i.e. don't change any code before here.
  66. ___begtext label byte
  67.         nop
  68.         nop
  69.         nop
  70.         nop
  71.         public ___begtext
  72.         assume  cs:nothing
  73. BEGTEXT ends
  74.  
  75.         assume  ds:DGROUP
  76.  
  77. _NULL   segment para public 'BEGDATA'
  78. __nullarea label word
  79.         db      01h,01h,01h,00h
  80.         public  __nullarea
  81. _NULL   ends
  82.  
  83. _AFTERNULL segment word public 'BEGDATA'
  84. _AFTERNULL ends
  85.  
  86. CONST   segment word public 'DATA'
  87. CONST   ends
  88.  
  89. if COMP_CFG_COFF eq 0
  90. TIB     segment byte public 'DATA'
  91. TIB     ends
  92. TI      segment byte public 'DATA'
  93. TI      ends
  94. TIE     segment byte public 'DATA'
  95. TIE     ends
  96.  
  97. XIB     segment word public 'DATA'
  98. _Start_XI label byte
  99.         public  "C",_Start_XI
  100. XIB     ends
  101. XI      segment word public 'DATA'
  102. XI      ends
  103. XIE     segment word public 'DATA'
  104. _End_XI label byte
  105.         public  "C",_End_XI
  106. XIE     ends
  107.  
  108. YIB     segment word public 'DATA'
  109. _Start_YI label byte
  110.         public  "C",_Start_YI
  111. YIB     ends
  112. YI      segment word public 'DATA'
  113. YI      ends
  114. YIE     segment word public 'DATA'
  115. _End_YI label byte
  116.         public  "C",_End_YI
  117. YIE     ends
  118. endif
  119.  
  120. _DATA    segment word public 'DATA'
  121. _DATA    ends
  122.  
  123. DATA    segment word public 'DATA'
  124. DATA    ends
  125.  
  126. _BSS    segment word public 'BSS'
  127. _BSS    ends
  128.  
  129. ifndef __LINUX__
  130. STACK_SIZE      equ     4096h
  131.  
  132. STACK   segment para stack 'STACK'
  133.         db      (STACK_SIZE) dup(?)
  134. STACK   ends
  135. endif
  136.  
  137. _TEXT   segment use32 word public 'CODE'
  138. _TEXT   ends
  139.  
  140.         end
  141.