Mail Archives: djgpp/1997/04/10/06:26:26
Gugler wrote:
>
> I would like to know if there is a way to convert .OBJ files from another
> compiler to .O files for DJGPP. I have found code to take you DJGPP
> program out of protected mode, Would that be of any help?
The problem is that the two formats are largely incompatible. See the
DJGPP Frequently Asked Questions list, chapters 17 and 18, for a
discussion of the various problems and their possible solutions.
Chapter 17 discusses the possibility of conversion of the .obj format
code, and Chapter 18 discusses all the things that you have to change in
order to make such code work.
While I hardly qualify as an expert in the PM<->RM interface in DJGPP, I
can't help but think that forcing the program out of protected mode
isn't going to do anything useful, and it may very well cause all kinds
of problems. For one thing, all of the library code assumes that it is
running in protected mode. If you really need your 16-bit code that
badly, read the FAQ chapter 17.6.
Overall, the best and easiest option is usually to just port the 16-bit
real mode code to 32-bit protected mode and compile it with DJGPP.
Depending on what that code does, though, the porting process may not be
easy. If you're trying to use graphics or interrupt handling code, you
may be better off just using one of the excellent DJGPP libraries that
exist for the purpose, such as GRX 2.0 and Allegro 2.2.
--
John M. Aldrich <fighteer AT cs DOT com>
* Anything that happens, happens.
* Anything that, in happening, causes something else to happen,
causes something else to happen.
* Anything that, in happening, causes itself to happen again, happens
again.
* It doesn't necessarily do it in chronological order, though.
--- Douglas Adams
- Raw text -