Mail Archives: djgpp/1999/10/21/14:19:22
On Wed, 20 Oct 1999, Tom Fjellstrom wrote:
> I've been playing around with mode 13h, and the
> only thing I've been really stuck on is my 'blit'
> routine. Suffice it to say it is extremely slow.
> It may have to do with '__djgpp_nearptr_enable()'ing
> before blit and '__djgpp_nearptr_disable()'ing after,
> for every bitmap
These two functions are very slow, because they issue a DPMI function
call. You should call them as seldom as you can. The FAQ explains what
are the circumstances when you MUST call them.
However, in general, I'd suggest to toss the idea of using nearptr hack,
and switch to dosmemput and farptr functions instead. They are almost as
fast as nearptr, even in tight loops, don't require an expensive call to
__djgpp_nearptr_enable, and don't disable memory protection.
The FAQ clearly recommends not to use nearptr, so why do you need to mess
with it?
- Raw text -