Mail Archives: djgpp/1996/05/21/05:12:57
> 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 -