delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/18/00:50:33

From: "John M. Aldrich" <fighteer AT NO DOT SPAM DOT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: MK_FP with gcc...
Date: Thu, 17 Apr 1997 07:57:35 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 38
Message-ID: <3355D7EF.6D7F@NO.SPAM.cs.com>
References: <33562259 DOT 5003 AT twi DOT tudelft DOT nl>
NNTP-Posting-Host: ppp208.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019