www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/21/05:12:57

Message-Id: <199605210908.FAA18194@delorie.com>
Date: Tue, 21 May 96 11:58:01 LIT
From: Martynas Kunigelis <martynas DOT kunigelis AT VM DOT KTU DOT LT>
Subject: Re: Making the nearptr hacks use longs.
To: "Austin Appleby (a.k.a. Tanjent)" <applea AT weiss DOT che DOT utexas DOT edu>,
DJGPP mailing list <djgpp AT delorie DOT com>
In-Reply-To: Your message of 20 May 1996 18:34:55 GMT

>                                               So far I've found in my
>tinkering that _dosmemputl(videoptr,320*200,buff) is by far the fastest
                                     ^^^^^^^
                                     WRONG!!

>way to do it, surpassing even the __djgpp_nearptr_enable() hacks.
>
  <snip>
>
>it'll be even speedier... Basically, the idea is to set videoptr to a
>long pointer instead of a char pointer, so that the thing will optimize
>down to some resemblance of a movsd op instead of a movsb, thus a 4x
>improvement.

You missed something. _dosmemputl already does 4-byte transfers. That's
what 'l' at the end of the function name stans for: LONG (i.e. dword).
So you're lucky you got away with the above example. It should be:

_dosmemputl(buffer, 16000, 0xa0000);

And it is the fastest way. Not sure about the order of parameters, though,
check libc docs.

Hope this helps.

Martynas

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019