C/C++ Compiler (cl.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.
Medium Memory Model: Details
                                             Up Contents Index Back
─────C/C++ Compiler─────────────────────────────────────────────────────────
 
     Syntax:  /AM
 
     The medium-model option allows a single segment for program data
     and multiple segments for program code. Each source module is
     given its own code segment.
 
     Medium-model programs can have more than 64K of code but less than
     64K of data. Program code can occupy any amount of space and is
     given as many segments as needed. Total program data cannot be
     greater than 64K.
 
     The defaults in medium-memory programs are far code addressing
     and near data addressing. You can override the defaults with the
     __near keyword for code and the __far or __huge keyword for data.
     See: Overriding Default Addressing
 
     Using the /AM option causes CL to emit both the _M_I86 and the
     _M_I86MM preprocessor identifiers.
                                    -♦-