Subversion Repositories Kolibri OS

Rev

Rev 548 | 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.         extrn   _cstart_         : near
  44.         extrn   __STACKLOW       : near
  45.         extrn   __STACKTOP       : near
  46.  
  47.  
  48. DGROUP group _NULL,_AFTERNULL,CONST,_DATA,DATA,TIB,TI,TIE,XIB,XI,XIE,YIB,YI,YIE,_IEND,_BSS,STACK,MEMSIZE
  49.  
  50. ; this guarantees that no function pointer will equal NULL
  51. ; (WLINK will keep segment 'BEGTEXT' in front)
  52. ; This segment must be at least 4 bytes in size to avoid confusing the
  53. ; signal function.
  54.  
  55. BEGTEXT segment use32 word public 'CODE'
  56.         assume  cs:BEGTEXT
  57. forever label   near
  58.  
  59.         db 'MENUET01'
  60.         dd 0x0001
  61.         dd offset _cstart_
  62.         dd offset ___iend
  63.         dd offset MEMSIZE
  64.         dd offset MEMSIZE
  65.         dd offset ___cmdline
  66.         dd offset ___pgmname
  67.        
  68.         int     3h
  69.         jmp     short forever
  70.         ; NOTE that __begtext needs to be at offset 3
  71.         ; don't move it.  i.e. don't change any code before here.
  72. ___begtext label byte
  73.         nop
  74.         nop
  75.         nop
  76.         nop
  77.         public ___begtext
  78.         assume  cs:nothing
  79. BEGTEXT ends
  80.  
  81.         assume  ds:DGROUP
  82.  
  83. _NULL   segment para public 'BEGDATA'
  84. __nullarea label word
  85.         db      01h,01h,01h,00h
  86.         public  __nullarea
  87. _NULL   ends
  88.  
  89. _AFTERNULL segment word public 'BEGDATA'
  90. _AFTERNULL ends
  91.  
  92. CONST   segment word public 'DATA'
  93. CONST   ends
  94.  
  95. if COMP_CFG_COFF eq 0
  96. TIB     segment byte public 'DATA'
  97. TIB     ends
  98. TI      segment byte public 'DATA'
  99. TI      ends
  100. TIE     segment byte public 'DATA'
  101. TIE     ends
  102.  
  103. XIB     segment word public 'DATA'
  104. _Start_XI label byte
  105.         public  "C",_Start_XI
  106. XIB     ends
  107. XI      segment word public 'DATA'
  108. XI      ends
  109. XIE     segment word public 'DATA'
  110. _End_XI label byte
  111.         public  "C",_End_XI
  112. XIE     ends
  113.  
  114. YIB     segment word public 'DATA'
  115. _Start_YI label byte
  116.         public  "C",_Start_YI
  117. YIB     ends
  118. YI      segment word public 'DATA'
  119. YI      ends
  120. YIE     segment word public 'DATA'
  121. _End_YI label byte
  122.         public  "C",_End_YI
  123. YIE     ends
  124. endif
  125.  
  126. _DATA    segment word public 'DATA'
  127. _DATA    ends
  128.  
  129. DATA    segment word public 'DATA'
  130. DATA    ends
  131.  
  132. _IEND   segment word public 'IEND'
  133. ___iend  label byte
  134. _IEND   ends
  135.  
  136. _BSS    segment word public 'BSS'
  137.  
  138.         public ___cmdline
  139.         public ___pgmname
  140.        
  141. ___cmdline   db 256 dup(?)          ; pointer to raw command line
  142. ___pgmname   db 1024 dup (?)        ; pointer to program name (for argv[0])
  143.  
  144. _BSS    ends
  145.  
  146. STACK   segment para stack 'STACK'
  147.  
  148. ___stack_low label byte
  149.         public ___stack_low
  150.  
  151. STACK   ends
  152.  
  153. MEMSIZE   segment para stack 'STACK'
  154. MEMSIZE   ends
  155.  
  156.  
  157. _TEXT   segment use32 word public 'CODE'
  158. _TEXT   ends
  159.  
  160.         end
  161.