From: qball1723 AT aol DOT com (QBall1723) Newsgroups: comp.os.msdos.djgpp Subject: Re: 32bit memcpy function? Date: 24 Nov 1997 20:52:07 GMT Lines: 43 Message-ID: <19971124205200.PAA11381@ladder02.news.aol.com> NNTP-Posting-Host: ladder02.news.aol.com Organization: AOL http://www.aol.com References: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk >Subject: 32bit memcpy function? >From: wolfman AT cedar DOT alberni DOT net >Date: Sat, Nov 22, 1997 15:34 EST >Message-id: > > >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)