Mail Archives: djgpp/1997/04/18/00:50:33
M. Solmaz wrote:
>
> Hi,
>
> I have a little problem. I want to convert a C program, written in
> Borland C, to a C program, which has to be compiled by gcc. The problem
> is with the MK_FP (make a far pointer)... I don't know how to convert,
> such that I can compile it with gcc. Can anyone help me?
Far, near, and huge pointers, in the sense used by real mode compilers
like Borland, do not exist in DJGPP's flat model protected mode. You
can allocate any size structure up to the maximum virtual memory
available on your system, and access any address within your program's
data space without needing to worry about segments or any of that other
nasty junk. Enjoy freedom like you've never experienced before! ;)
The problem comes when trying to access addresses outside your program's
data segment. To do this, you must use one of several special
techniques to avoid being caught by the memory protection routines.
Please download and read the DJGPP Frequently Asked Questions list, and
examine chapter 17.7. You should also read the rest of chapter 17,
chapter 18, and probably 10 as well. When you have the time, I
recommend that you peruse the FAQ in its entirety. You'll learn much...
bth!
P.S.: To reply via email, use the address below.
--
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 -