Message-Id: <199605210908.FAA18194@delorie.com> Date: Tue, 21 May 96 11:58:01 LIT From: Martynas Kunigelis Subject: Re: Making the nearptr hacks use longs. To: "Austin Appleby (a.k.a. Tanjent)" , DJGPP mailing list 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. > > >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