From: Luke Anthony Hutchinson Newsgroups: comp.os.msdos.djgpp Subject: Re: Another way to access VGA memory Date: Mon, 28 Oct 1996 16:51:37 +1100 Organization: Basser Dept of Computer Science, University of Sydney, Australia Lines: 17 Message-ID: <327449E9.7BAFE65D@ug.cs.su.oz.au> References: <961023180905_339586309 AT emout17 DOT mail DOT aol DOT com> <54n92c$hbr AT troll DOT powertech DOT no> NNTP-Posting-Host: congo.ug.cs.su.oz.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp > >Using near pointers in no quicker because you still have to > >load the %edi register with your pointer and then no doubt add some stuff to > >this to access the right pixel. With my method you load %es or whatever and > >then load stuff into %edi to point to the right pixel - so it is not slower > >(apart from perhaps another register to save on the stack, although a push > >and a pop will hardly slow a program down even if done hundreds of times a > >second). > Firstly, near pointers are quicker, as segment loads are slooow in prot. mode. Secondly I reckon using __djgpp_nearptr_enable(), is the most elegant solution, infact most dos extenders have the data descriptor limit set to 0FFFFFFFFh as the default (eg:DOS4G/W). Infact, descriptor limits <0FFFFFFFFh are such a pain in the arse that I extend the code descriptor limits as well (for VBE prot. mode interface etc). Luke