From: Fabrice ILPONSE Newsgroups: comp.os.msdos.djgpp Subject: Re: assembly language Date: Wed, 26 Aug 1998 10:24:36 +0200 Organization: Universites Paris VI/Paris VII - France Lines: 26 Message-ID: <35E3C644.FA5CF969@asim.lip6.fr> References: <01J10IURTRN694HU4A AT SLU DOT EDU> NNTP-Posting-Host: asim.lip6.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk GAMMELJL AT SLU DOT EDU wrote: > > Thanks to those who responded to my query about > movl $0x0,%edx vs xorl %edx,%edx > The movl sets %edx to zero, whereas xorl sets %edx and the carry bit to > zero. Thus the two statements above are not exactly the same thing. > This fact could make little difference to all but a few programmers, > and those few probably already know to avoid the xorl command when > writing codes in assembly language. I find that the movl command > results in faster executables even when xorl can be used as above > (in those cases in which the carry bit does not matter). Hi!! the problem with the movl is that the instruction code is bigger because of the constate $0x0 that is included in it whereas not for the xorl... ;) bye -- ^ ^ ^ | | | +-+-+ Fabrice ILPONSE | email: fabrice AT asim DOT lip6 DOT fr | | -