Mail Archives: djgpp/1998/06/24/18:47:02
S Prasad wrote:
>
> If I have a routine in ASM, compiled as .OBJ (or .O, I think they are
> the same), how do I use this function in my DJGPP C program?
They are not the same. The format used to represent the object code, as
well as the characteristics of the code itself, heavily depends on the
compiler originally used to build it. .OBJ usually indicates a Borland
or Microsoft-style object file, which is incompatible with DJGPP's
object format. Even if you were to convert the format, the code itself
almost certainly uses a 16-bit real-mode model, which quite simply will
not work in a protected mode environment.
If you have access to the original assembly source code, you may be able
to work some magic on it to convert it to something that DJGPP can
digest. The easier course by far is to just find a DJGPP equivalent or
write one from scratch.
See chapter 17 of the DJGPP Frequently Asked Questions list for more
information, including a possible exception to what I wrote above.
--
---------------------------------------------------------------------
| John M. Aldrich | "Autocracy is based on the assumption|
| aka Fighteer I | that one man is wiser than a million |
| mailto:fighteer AT cs DOT com | men. Let's play that over again, |
| http://www.cs.com/fighteer | too. Who decides?" - Lazarus Long |
---------------------------------------------------------------------
- Raw text -