Message-ID: <326437D3.5B3F@gbrmpa.gov.au> Date: Wed, 16 Oct 1996 09:18:12 +0800 From: Leath Muller Reply-To: leathm AT gbrmpa DOT gov DOT au Organization: Great Barrier Reef Marine Park Authority MIME-Version: 1.0 To: "Salvador Eduardo Tropea (SET)" CC: djgpp AT delorie DOT com Subject: Re: Another way to access VGA memory References: <9610151516 DOT aa12417 AT ailin DOT inti DOT edu DOT ar> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Yeap! that's the good part, you can't destroy DOS or Losse with a wrong > calculus, and (at least for my program) is equally fast than the nearptr > methode (that's a really HACK :-), and I don't need to make strange arithmetic > adding the __djgpp_base... so from my point of view the load of the selector > isn't a problem (at least isn't worst than the base addition). Even more: if > your program have a really fast part where you don't call any of the library > functions you can load the selector only one time and reload it only when you > suspect that the value was loosed, I'm doing this and works OK. In the other > hand if I use nearptrs I must add the base in tons of parts so is worst. > That's my opinion, I know that Eli thinks that the nearptrs are faster than > this methode. Hey dudes... I started using selectors (such as %fs) but gave up after about 2 days. Why? Every time I want to write to a section of the graphics screen, I call a routine - say blit. Everytime blit is called, I have to reload the selector. Every time I exit the blit routine, I have to restore the selector. Using near pointers, you never have to worry about that. And I have never written a program where the __djgpp_conventional_base changes... could someone explain to me a situation where it does? I have never encountered this when only running my application (I do just about everything under Win95 too... :) Just have a variable gfx_screen which points to the physical memory area of the graphics screen, add the __djgpp_conventional_base to it, and then always just use that variable. Easy, no? Leathal.