From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Hans" Subject: ld86 link sequence Date: Fri, 2 Sep 2005 16:57:15 +0100 Message-ID: <00a701c5afd7$049f5ef0$6402a8c0@dionysus> Reply-To: "Hans" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: Sender: linux-8086-owner@vger.kernel.org List-Id: Content-Type: text/plain; format="flowed"; charset="us-ascii"; reply-type="original" To: linux-8086@vger.kernel.org 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.