delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/26/23:25:14

Message-ID: <19990927032752.3245.rocketmail@web1402.mail.yahoo.com>
Date: Sun, 26 Sep 1999 20:27:52 -0700 (PDT)
From: Prashant TR <prashant_news AT yahoo DOT com>
Subject: Re: Ext. mem(Protected Mode problem)
To: djgpp AT delorie DOT com
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com


--- Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> 
> On Fri, 24 Sep 1999, Prashant TR wrote:
> 
> > And does DJGPP allow me to make reference to any
> > portion of the extended memory ?
> 
> You can access the parts of extended memory that are
> not in use by the 
> DJGPP program and the DPMI host.
> 

Here's the portion of the code that I'm using. I don't
know if this is right. Please help.

*****************************************************
int _ctr0_startup_flags = _CRT0_FLAG_NEARPTR;

int main()
{
 unsigned long maxmem, f;
 char *x;

 printf("%s\n", (__djgpp_nearptr_enable()) ? "Enabled"
: "Disabled");
 x = (char *)(__djgpp_conventional_base);
 f = x[0x1000000];             // Both these don't
seem to work.
 _farpeekl(_dos_ds, 0x1000000); // Accessing 16MB

 return 0;
}
******************************************************

Thanks,
Prashant TR
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

- Raw text -


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