M2 Flashcards
specifies the memory size assigned to each of the different parts or segments of a program
memory model
there exist different memory models for the
8086 processor
this specifies the size of the memory the program needs
.MODEL Directive
memory model directive
Based on this directive, the assembler assigns the required amount of memory to data and code.
.MODEL Directive
memory model directive
what are the segments
each one of the segments. in a program, is called a
stack, data, and code
logical segment
depending on the model used, segments may be
one or in different physical segments
here, segments are declared using the .MODEL directive
MASM 6.X
This directive is placed at the very beginning of the program, or after the optional title directive
.MODEL Directive
memory model directive
in this model, both code and data occupy one physical segment
TINY Model
In the TINY model both code and data occupy one physical segment. Therefore, all procedures and variables are by default addressed as X, by pointing at their offsets in the segment.
NEAR
On assembling and linking a source file, the tiny model automatically generates a X file, which is smaller in size than an Y file.
com
exe
In this model, all code is placed in one physical segment and all data in another physical segment.
SMALL
In this model, all procedures and variables are addressed as NEAR by pointing to their offsets only.
SMALL
In this model, all elements of code are placed into one physical segment. However, each element of data can be placed by default into its own physical segment.
COMPACT
In the compact model, all code elements (procedures) are addressed as X and data elements (variables) are addressed as Y
NEAR
FAR