Вы находитесь на странице: 1из 2

Small, Medium, Compact, Large, and Huge Models

The traditional memory models recognized by many


languages are small, medium, compact, large, and huge.
o Small model supports one data segment and one
code segment.
All data and code are near by default.
o Large model supports multiple code and multiple
data segments.
All data and code are far by default.
o Medium and compact models are in-between.
o Medium model supports multiple code and single
data segments
o Compact model supports multiple data segments and
a single code segment.
o 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.

o Tiny-model programs run only under MSDOS. Tiny model places all data and code in
a singlesegment. 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
itemsfar in small model, or internal
procedures near in large model.

Вам также может понравиться