Message-Id: Date: Sat, 2 Aug 97 23:02 MET DST To: djgpp AT delorie DOT com References: <33DE0617 DOT 446B AT cray DOT com> <33DE0617 DOT 446B AT cray DOT com> Subject: Re: FIXDIV for ASM MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT From: Georg DOT Kolling AT t-online DOT de (Georg Kolling) Precedence: bulk Mark Goodwin schrieb: > Hello, > > I am new to assembler, and I want to write a FIXDIV function > using AT&T syntax. Following is my attempt at writing this > function; however it does not compile under DJGPP: > > inline static long FIXDIV(long Num, long Denom) > { > long Result; > asm ("movl Num, %%eax;" > "movl %%eax, %%edx;" > "sarl %%edx, 16;" > "shll %%eax, 16;" > "idivl Denom" You just have to use _Num and _Denom!