From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: far pointers using djgpp Date: 19 Jun 1998 03:14:58 GMT Organization: Oxford University, England Lines: 31 Message-ID: <6mcl3i$isj$2@news.ox.ac.uk> References: <35881d34 DOT 2869157 AT news DOT unisys DOT com DOT br> NNTP-Posting-Host: sable.ox.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Wed, 17 Jun 1998 17:28:50 -0400 in comp.os.msdos.djgpp Jerry Lawrence wrote: : Or, you could do this: (can't remember where i got the info from) : 1) store a local ram buffer of the screen buffer; do all screen : operations to this buffer. : 2) in your graphics init function, use this right after you change : screen mode: : __djgpp_nearptr_enable(); : 3) in your graphics deinit function, use this: : __djgpp_nearptr_disable(); : 4) when a full screen buffer is ready to be displayed: : memcpy( (unsigned char *) (0xa0000+__djgpp_conventional_base), : (buff),320*200); : where "buff" is a 64k buffer (assuming 320x200x256 color) If you're going to do it this way, you might as well not use near pointers and use the dos memory access functions to copy your buffer to the screen. Remove steps 2 and 3, and in step 4 use dosmemput instead of memcpy: dosmemput (buffer, 320*200, 0xa0000); -- george DOT foot AT merton DOT oxford DOT ac DOT uk xu do tavla fo la lojban -- http://xiron.pc.helsinki.fi/lojban/lojban.html