delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/16/14:21:58

Xref: news2.mv.net comp.os.msdos.djgpp:1881
From: korpela AT islay DOT ssl DOT berkeley DOT edu (Eric J. Korpela)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: New to DJGPP
Date: 14 Mar 1996 00:34:36 GMT
Organization: Cal Berkeley-- Space Sciences Lab
Lines: 34
Message-ID: <4i7pis$go7@agate.berkeley.edu>
References: <4i45mo$b4k AT dub-news-svc-6 DOT compuserve DOT com>
NNTP-Posting-Host: islay.ssl.berkeley.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <4i45mo$b4k AT dub-news-svc-6 DOT compuserve DOT com>,
 <76003 DOT 3544 AT compuserve DOT com> wrote:
>While I've been programming for awhile, I'm new to DJGPP, and have a
>rather simple question: How does djgpp handle the "NEAR" and "FAR"
>pointer types? Is there a switch to turn these on? 
>
>Steven Griffith
>

The easy (but not quite correct) answer is "it doesn't".  And if your
program is not too dos dependent you can probably define them away as
follows to get your program to run.

#define NEAR
#define FAR
#define HUGE

If your program calls the "far*" memory management routines, you'll
probably need to define them properly, too.

#define farmalloc(x) malloc(x)
#define farcalloc(x,y) calloc(x,y)
etc.

If your program is dos dependant and requires access to specific memory
locations or calls DOS via interrupts, it's a bit harder. Check out the
FAQ and docs for info on how to do that.

Eric
-- 
Eric Korpela                        |  An object at rest can never be
korpela AT ssl DOT berkeley DOT edu            |  stopped.
<a href="http://www.cs.indiana.edu/finger/mofo.ssl.berkeley.edu/korpela/w">
Click here for more info.</a>

- Raw text -


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