From: Endlisnis Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in GCC? Date: Wed, 09 Sep 1998 20:36:30 -0300 Organization: NBTel Internet Lines: 18 Message-ID: <35F710FE.B45A3EC3@unb.ca> References: <35F5B07A DOT 8E37D184 AT unb DOT ca> <35F6ED90 DOT 6D81 AT erols DOT com> NNTP-Posting-Host: fctnts09c10.nbnet.nb.ca 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 John S. Fine wrote: > > int add(int a, int b) > > { > > int Ret; > > asm ("addl %1, %0" //this line compiles to "addl ecx,ecx". > > : "=&r" (Ret) > > : "0" (a), "r" (b) > > ); > > return Ret; > Try "addl %2, %0" It took me hours, but I figured that one out myself. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlis AT nbnet DOT nb DOT ca