On Mar 16, 9:02 am, Frank Kotler <spamt...@[EMAIL PROTECTED]
> wrote:
....
.. (there are no "segments" in a .com file, it's all just laid out
> flat ...
Frank was clearly limiting his note to the use of NASM in a 32-bit
environment.
But the above quote could mislead the average beginner who might not
intend to use NASM, but instead ASM or TASM and other simple
assemblers.
Any x86 code that is to be assembled to produce a .COM file, WILL have
all the usual segments, UNLESS assembled for a flat memory model with
a 32-bit (and up) assembler (which puts the CPU in a diffeent mode),
and which will produce an object file that can be used to make
either .COM or .EXE files as needed.
Of course, .COM files must start execution at 100H, because that is
where the loader branches to to start the .COM program.


|