[net.micro.pc] .OBJ/.COM File Query

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

From:  jose rodriguez <jrodrig at mitre-gateway>

Recently I have been programming in 8088 assembly and after looking at
things I got a couple of questions which have stumped me somewhat.

First, what is the order of segments when the obj file is created?  It
seems to me it is first by alphabetical order of class and then by
alphabetical order of the segment name.

Second, has anyone looked at .com files (created with exe2bin) with
debug?  After loading in some simple pieces of code it seems to me
that all the contents of the .exe file are moved 100H bytes up, no
matter that your code already begins at 100H. (I have my org 100H but
this seems wrong -- my code in the .com file begins at 200H !). I
don't care about the org 100h but the problem is that the data
segments are also shifted by 100h bytes.  (While my pointers to data
in those segments (obviouly) points to the old location).  Am I doing
something wrong with the segment declarations or has anyone seen this
before?  (This has gotten me very confused).  (By the way, when loading
the .com files with debug the DS reg was the same as the CS register
so I don't think I was misinterpreting the addr's I was seeing).

If anyone wants to know why assembly, well I am trying to write device
drivers with CI's C86 and this morning I had a greatly massaged
$main.asm which allowed making .com files.  I tested it with a "hello
world" type of program and it didn't work.  So I went to debug and ...

Your help will be deeply appreciated,

Jose
jrodrig@mitre-gw