Mail Archives: djgpp/1997/11/25/08:16:16
>Subject: 32bit memcpy function?
>From: wolfman AT cedar DOT alberni DOT net
>Date: Sat, Nov 22, 1997 15:34 EST
>Message-id: <b167cd$c221f DOT 2af AT news DOT alberni DOT net>
>
>
>I was wondering if DJGPP has a 32bit memcpy function (memcpy uses 8bit
>right?) If so,
>please tell me what it is. And if not please tell me that there isn't.
>
>
The following are 32-bit macros I found in a DJGPP assembly tutorial
somewhere:
// MACRO FOR 32 BIT MEMORY MOVE (used to copy double_buffer to
// video_buffer
#define rep_movsl(src, dest, numwords) \
__asm__ __volatile__ ( \
"cld\n\t" \
"rep\n\t" \
"movsl" \
: : "S" (src), "D" (dest), "c" (numwords) \
: "%ecx", "%esi", "%edi" )
// MACRO TO SET BITS (32-bits at a time), used in filling the double
// buffer using LONG WORDS ; ]
#define rep_stosl(value, dest, numwords) \
__asm__ __volatile__ ( \
"cld\n\t" \
"rep\n\t" \
"stosl" \
: : "a" (value), "D" (dest), "c" (numwords) \
: "%ecx", "%edi" )
Enjoy! & I hope these help.
Jim the loiterer
http://members.aol.com/qball1723/index.htm
(wannabe PC game/graphics developer)
- Raw text -