From: Elliott Oti Newsgroups: comp.os.msdos.djgpp Subject: Re: Direct access to VGA memory Date: Tue, 24 Sep 1996 11:52:46 -0700 Organization: Academic Computer Centre Utrecht, (ACCU) Lines: 22 Message-ID: <32482DFE.E2A@stud.warande.ruu.nl> References: <5290et$g40 AT pulp DOT ucs DOT ualberta DOT ca> NNTP-Posting-Host: warande1078.warande.ruu.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: B Hodge To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp B Hodge screamed in despair: > > I recal someone discussing it a few weeks ago on the mailing list, but > what is the way to access the VGA memory directly using a pointer and not > the _farpoke and _farpeek commands? #include // gotta include this void main() { char *screen; // this is gonna grow up into a pointer to display memory __djgpp_nearptr_enable(); // turn off memory protection screen = (char *)(0xa0000 + __djgpp_conventional_base); // set screen to video // memory base /* Do whatever ya want with screen here */ __djgpp_nearptr_disable(); // turn memory protection back on }