X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Eli Zaretskii Newsgroups: comp.os.msdos.djgpp Subject: Re: help with inline AT&T assembly Date: Wed, 03 Apr 2002 08:57:30 +0300 Lines: 12 Message-ID: <3CAA99CA.33B1298D@is.elta.co.il> References: <20020402131311 DOT 21631 DOT 00001396 AT mb-fa DOT aol DOT com> NNTP-Posting-Host: 192.116.55.139 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: fu-berlin.de 1017813709 28637781 192.116.55.139 (16 [61365]) X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Sterten wrote: > > I wanted to convert my inner loop to assembly , > it did compile but it doesn't do what the C-routine does. > I'm new to AT&T syntax , where is the mistake ? I think the order of the operands is wrong: the AT&T syntax reverses them (first source, then destination). That is, "movl %%ebx,%1" puts what's in EBX into the 1st arg, not the other way around. The same reversal of operands happens with addl. I believe this is explained in section 17.1 of the DJGPP FAQ list.