<<< The .MODEL directive | Index | Flat Model >>> |
The traditional memory models recognized by many languages are small, medium, compact, large, and huge.
Small model supports one data segment and one code segment.
All data and code are near by default.
Large model supports multiple code and multiple data segments.
All data and code are far by default.
Medium and compact models are in-between.
Medium model supports multiple code and single data segments
Compact model supports multiple data segments and a single code segment.
Huge model implies that individual data items are larger than a single segment, but the implementation of huge data items must be coded by the programmer.
Tiny-model programs run only under MS-DOS. Tiny model places all data and code in a single segment. Therefore, the total program file size can occupy no more than 64K.
Since the assembler provides no direct support for this feature, huge model is essentially the same as large model.
In each of the models, you can override the default. For example, you can make large data items far in small model, or internal procedures near in large model.
<<< The .MODEL directive | Index | Flat Model >>> |