Xref: news2.mv.net comp.os.msdos.djgpp:3519 From: brennan AT mack DOT rt66 DOT com (Brennan "Mr. Wacko" Underwood) Newsgroups: comp.os.msdos.djgpp Subject: Re: Pointers -> memory how ? Date: 6 May 1996 17:22:58 -0600 Organization: None, eh? Lines: 29 Message-ID: <4mm1ki$c1o@mack.rt66.com> References: NNTP-Posting-Host: mack.rt66.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article , Don Karnage wrote: > >How can I make pointers -> memory :P Meaning, how can I make pointers >pointing to specific memory locations without dropping out of the protected >mode in DJGPP ? > >Like, perhaps, mapping the video Screen directly with an array char[4000] or >int[2000] !!! > >I'd want to have an adressable array pointer to ScreenPrimary so it can be >compatible with my other programs... If you call __djgpp_nearptr_enable() and it is successful you can access any linear address below the 1meg mark via the following calculation: (linear_ptr << 4) + __djgpp_conventional_base; i.e. 0xa0000 + __djgpp_conventional_base for a pointer to VGA memory. If it's above 1meg, you must map it in, I believe. Check out vbe.zip by Charles Sandmann, also available on my web page. http://www.rt66.com/~brennan/djgpp/ --brennan -- brennan AT rt66 DOT com | fsck /u