Mail Archives: djgpp/2003/08/04/01:12:24
> Date: Sun, 3 Aug 2003 23:40:38 -0300 (ART)
> From: =?iso-8859-1?q?Martin=20Iraizoz?= <martin_iraizoz AT yahoo DOT com DOT ar>
>
> 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.
- Raw text -