home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c221 / 1.ddi / MWHC.001 / O < prev    next >
Encoding:
Text File  |  1992-12-09  |  5.6 KB  |  146 lines

  1. comment %
  2. **************************************************************************
  3. ***  (c) Copyright 1983 - 1992            MetaWare Incorporated.       ***
  4. **************************************************************************
  5. ***  You have the same rights to the object form of this program as    ***
  6. ***  you do to the object code of the library.  You may not distribute ***
  7. ***  this source, even if modified by you.                             ***
  8. **************************************************************************
  9. ***  The source to this module is provided for the convenience of      ***
  10. ***  MetaWare Pascal and High C users that need to tailor their        ***
  11. ***  execution environments.  The casual user should NOT play with the ***
  12. ***  code. This code is subject to change without notice in future     ***
  13. ***  releases of the compilers.                                        ***
  14. **************************************************************************
  15. ***  You must preserve the library copyright notice defined in this    ***
  16. ***  module if your program uses any portion at all of the run-time    ***
  17. ***  library (including this initializer or any other supplied run-    ***
  18. ***  time source).  The copyright notice is in the definition of       ***
  19. ***  the initial stack segment.  We recommend it be left right there.  ***
  20. ***  But you can move it to anywhere you want as long it appears in    ***
  21. ***  any linked program (.exe or ROM-burned program) using the library.***
  22. **************************************************************************
  23.  
  24.               MetaWare Pascal or High C Runtime 
  25.              Initialization Definitions Module - init.def
  26.  
  27. %
  28. ;---------------------------------------------------------------------------
  29. ; Debug status.
  30. ;---------------------------------------------------------------------------
  31. ; DEBUG         equ 1   ; Enable additional public definitions.
  32.  
  33. ;---------------------------------------------------------------------------
  34. ; Language definition.
  35. ;---------------------------------------------------------------------------
  36.   HC            equ 1   ; Initializer intended for High C.
  37.             ; Pascal assumed otherwise
  38. ;---------------------------------------------------------------------------
  39. ; Operating System definition.
  40. ;---------------------------------------------------------------------------
  41.   DOS    equ   1      ; Initializer intended for MS-DOS.
  42.  
  43.   ; If you are using masm386 (not masm) to assemble this, with the intent
  44.   ; to link with OS/2 2.0's link386, turn on USING_FLAT.  This avoids the use
  45.   ; of DGROUP and CGROUP which OS/2 2.0's linear executable loader cannot
  46.   ; support.
  47.  
  48. ; USING_MASM_51 equ    1
  49. ; USING_MASM_60 equ    1
  50. ; USING_FLAT    equ    1
  51.  
  52. ifdef XOS
  53.   no87 =        1   ; There can be no x87 processor.
  54.   NOWTK =       1   ; There can be no Weitek processor.
  55. else
  56. ifdef ACAD           ; AutoDesk 
  57.   PL_exists = 1
  58.   PL_weitek = 1
  59. else
  60.   PL_exists =   1    ; PharLap environment possible
  61.   D4G_exists =  1    ; Rational environment possible
  62.   AI_exists =   1    ; AI (eclipse) environment possible
  63.   SG_exists =   1    ; IGC environment possible
  64. endif ; ACAD
  65. endif ; XOS
  66.  
  67. ;---------------------------------------------------------------------------
  68. ; Heap status.
  69. ;---------------------------------------------------------------------------
  70.     ; As an option the run-time system will contract the data area back to
  71.     ; a minimum at start-up, and expand it dynamically.
  72.     ; This is principally useful if you wish to allocate memory separately
  73.     ; from the run-time system using the SETBLOCK (4a) command.
  74.     ; For enabling AIA's OS/386 to grow the heap dynamically,
  75.     ; uncomment the appropriate line.  Currently there are bugs in OS/386
  76.     ; that prevent this from working; contact AIA for the latest status.
  77.  
  78.   PHAR_LAP_CAN_GROW_HEAP equ 1
  79.   AIA_CAN_GROW_HEAP      equ 1
  80.  
  81. ;---------------------------------------------------------------------------
  82. ;  Declare stack margin
  83. ;---------------------------------------------------------------------------
  84.     ; Margin-big is used for small procedures -- it ensures a bigger margin.
  85.     ; Margin-small is used for large procedures, since we do more accurate
  86.     ; checking for them.
  87.  
  88.   Stack_margin_big    equ   512 ; Free stack bytes before overflow occurs
  89.   Stack_margin_small  equ   256
  90.   Stack_reserve       equ     4 ; At top, for the above two numbers(large model)
  91.  
  92. ;---------------------------------------------------------------------------
  93. ; Set expression-identifiers 
  94. ;---------------------------------------------------------------------------
  95.     ; So we can say "if this and not that".
  96.     ; E.g., "compute x" defines macro ex to be 1 ifdef x, 0 otherwise.
  97.  
  98.   compute    macro    id
  99.   ifdef    id
  100.       e&id = not 0
  101.   else
  102.       e&id = 0
  103.   endif
  104.       endm
  105.   
  106.   compute AI_exists
  107.   compute SG_exists
  108.   compute PL_exists
  109.   compute D4G_exists
  110.  
  111.   compute DEBUG
  112.   compute HC        ; HC instead of Professional Pascal
  113.   compute DOS
  114.   compute XOS
  115.   compute USING_FLAT
  116.   compute WINDOWS
  117.   compute ADS
  118.   compute PADI
  119.  
  120.   compute USING_MASM_51
  121.   compute USING_MASM_60
  122.   if eUSING_MASM_51 or eUSING_MASM_60
  123.       USING_MASM equ 1
  124.   endif
  125.   compute USING_MASM
  126.  
  127.   if eADS or ePADI
  128.       ACAD equ 1
  129.   endif
  130.   compute ACAD
  131.  
  132. if eWINDOWS
  133.   STACK_SIZE = 65536
  134. else
  135. if eACAD
  136.   STACK_SIZE = 4000h
  137. else
  138.   STACK_SIZE = 8192
  139. endif
  140. endif
  141.  
  142. ;---------------------------------------------------------------------------
  143. ; Include model definition file (which in turn includes macros file. 
  144. ;---------------------------------------------------------------------------
  145.   include    model
  146.