[net.micro.pc] .OBJ/.COM files

waters%viking.DEC@decwrl.ARPA (08/06/84)

From:  waters%viking.DEC@decwrl.ARPA  (Lester Waters)


The relocatable object modules under MS-DOS are quite complex in nature.
As far as I can tell, segments are not necessarily contiguous. Instead,
there are link lists of pointers to the various parts of a segment. The
code that is actually generated is placed in the object module in the
same relative order in which it is defined. It is up to the LINKer to
concatonate segments of the same class together. Microsoft followed
Intel's object module format. For those of you who would like to read
further, obtain the "8086 RELOCATABLE OBJECT MODULE FORMATS" manual
(order number: 121748-001) from Intel. I found the manual to be difficult
reading, but seems to be the only info on the subject.

As for creating .COM files which are beginning at 0200h instead of 0100h,
try removing the ORG statement. CI's C86 assembler may be adding 0100h
to the base address. I have not heard of anyone else having this problem.
Do you have anything defined BEFORE your ORG statement?

					- Lester Waters

jrodrig%mitre-gateway@sri-unix.UUCP (08/07/84)

From:  jose rodriguez <jrodrig at mitre-gateway>


Well, the problem with the ORG 100h is that I am not including the 
"END <main entry point>" statement in my code. I am not including this 
statement because with it exe2bin would not convert the file. In the
other hand I have seen many pieces of code that use this statement and
their writters say their code can be com'ified without any problem.

What's going on? I don't know but I suspect that it is something to do
with having data segments separate from the code segment.  
I have noted that all these examples include the data allocation 
pseudo-ops with the code (the first instruction is a jump over
these data sections).

Ihave been thinking of doing some tests with code that can be com'ified.
I would add data segments to them. Anyway, I am afraid to say that it all
sounds quite bogus. Whenever I have more info I will post it.

Jose
jrodrig@mitre-gw