8086 :: Simplified Segment Directives

.model (memory model)

Memory model
Description
Tiny
Code and data together may not be greater than 64K
Small
Neither code nor data may be greater than 64K
Medium
Only the code may be greater than 64K
Compact
Only the data may be greater than 64K
Large
Both code and data may be greater than 64K
Huge
All available memory may be used for code and data

.stack
The .stack directive sets the size of the program stack, which may be any size up to 64K. This segment is addressed by SS and SP registers.

.code
The .code directive identifies the part of the program that contains instructions. This segment is addressed by CS and IP registers.

.data
All variables are defined in this segment area.

No comments:

Post a Comment