Assemb
Assemb
Differing from earlier 16 bit code that used combined segment and offset addressing with a
64k segment limit, FLAT memory model works only in offsets and has a range of 4 gigabytes.
This makes assembler easier to write and the code is generally a lot faster.
All segment registers are automatically set to the same value with this memory model and this
means that segment / offset addressing must NOT be used in 32 bit programs that run in 32 bit
Windows.
For programmers who have written code in DOS, a 32 bit Windows PE executable file is
similar in some respects to a dos COM file, they have a single segment that can contain both
code and data and they both work directly in offsets, neither use Segment / Offset addressing.
The defaults in flat-model programs are NEAR code addressing and NEAR data addressing
within the range of 4 gigabytes.
The FS and GS segment registers are not normally used in application programs but are used
in some instances by the operating system.
file:///C:/Users/abdou/AppData/Local/Temp/~hh78EE.htm 2017-03-17