Date: 04 Aug 2003 08:08:25 +0200 Message-Id: From: Eli Zaretskii To: =?iso-8859-1?q?Martin=20Iraizoz?= CC: djgpp AT delorie DOT com In-reply-to: <20030804024038.97385.qmail@web14612.mail.yahoo.com> (message from =?iso-8859-1?q?Martin=20Iraizoz?= on Sun, 3 Aug 2003 23:40:38 -0300 (ART)) Subject: Re: Migrating from BorlandC to GCC References: <20030804024038 DOT 97385 DOT qmail AT web14612 DOT mail DOT yahoo DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Sun, 3 Aug 2003 23:40:38 -0300 (ART) > From: =?iso-8859-1?q?Martin=20Iraizoz?= > > I compiled a C program (which I wrote in C and some ASM) using Borland C > compiler and worked perfectly. Now I am trying to compile it using the GCC > compiler (downloaded from www.delorie.com) but I get some errors. These > errors arise from the use of in-line assembly in the source code. Generally, you should have much less reasons using inline assembly with DJGPP than you have with Borland. Some of the more popular reasons for using inline assembly--making the code more efficient and issuing DOS system calls--are taken care of by different facilities in DJGPP (e.g., __dpmi_int). See sections 17.7 and 17.8 of the DJGPP FAQ list for more about this. > I know > that the in-line assembly syntax using GCC is different from the one used > with Borland C. There are big differences between them. Therefore I was > wondering if it is possible to compile the procedures that have assembly > code inside with the Borland C compiler. I would get an OBJ file. Then I > would compile the other part of the source (that has no problems at all > when compiled with GCC) and finally I would link all the OBJs together. Is > that posibble? Not really; see sections 17.5 and 17.6 in the FAQ. > If not possible, is there any other way of solving the problem? The best alternative is to rewrite the inline assembly in C. If you don't know how to do that (chapters 17 and 18 of the FAQ might help), then post the inline assembly parts here and someone will help you.