cobol2.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MODEL Details (↑ Object Code)
 Key Summary                             Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
     This directive only affects .OBJ files.
 
     The possible values of type are:
 
      SMALL       (small data, small code)
      COMPACT     (small data, large code)
      MEDIUM      (large data, small code)
      LARGE       (large data, large code)
      HUGE        (large data, large code, data items may cross
                   segment boundaries)
 
     where small means less than 64K and large means greater than 64K.
 
     You need to depart from the default MODEL setting only for certain
     cases of inter-language working where the other language uses a
     model other than large. See the manuals of your other languages for
     information relating to the correct settings to use. This directive
     should not be changed when you link with the shared run-time system,
     COBLIB.
 
     If you specify a model of SMALL, MEDIUM or COMPACT, then the LITLINK
     directive is set automatically, requiring you to resolve all external
     references to the linker.
 
     Local-Storage Section is only supported for LARGE and HUGE models.
 
     Programs with a Data Division less than 64K are treated as
     MODEL "LARGE".
 
     Specifying MODEL "SMALL" sets LITLINK.
 
     When linking a program compiled with MODEL "SMALL" or MODEL "MEDIUM"
     for use on OS/2, you must use the linker directive /DOSSEG.
 
     Dynamic calling is supported only in LARGE or HUGE model, as by its
     nature dynamic calling gives large code and large data.
                                    -♦-