Skip to contentSkip to conversation

ld86 link sequence

DISCUSSION Hans 1 participant 1 message Sep 2, 2005

lore
Share & tools
lore

Hans

author
#0 lore raw

Hi All,

If I use:

bcc -0 -ansi -Md -o test.com test.c

then all is OK and I can run test.com in a DOS box. However, I would like to split the process into a separate compile and link stage which gives me a better control over what will be linked in. I use the following command syntax:

bcc -0 -ansi -c -Md -o test.o test.c
ld86 -d -s -L/lib/ -Olibdos.a -o test.com crt0.o test.o

The test.com file consist of the test.o code followed by msdos.o followed by crt0.o. For some reason the first instruction in the file is not a jump to crt0.o.

I tried different permutations of the above ld86 command arguments but they all produce the same results. Can anybody spot what I am doing wrong?

Thanks,
Hans.