Message-ID: Newsgroups: comp.os.msdos.djgpp From: Xeno Antares Date: Sat, 14 Dec 2002 20:07:38 GMT References: <3DF9B0CA DOT 9050500 AT mail DOT inf DOT tu-dresden DOT de> <200212131744 DOT gBDHiDd11835 AT envy DOT delorie DOT com> Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Subject: Re: Quest about inline asm... Lines: 41 NNTP-Posting-Host: 213.6.109.131 X-Trace: 1039901169 news.freenet.de 3013 213.6.109.131:1776 X-Complaints-To: abuse AT freenet DOT de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id gBELU4i13149 Reply-To: djgpp AT delorie DOT com On Fri, 13 Dec 2002 14:30:10 -0800, "lewi9908" wrote: >> Omit the last colon. >> >> __asm__("pushl %eax" >> : /*No output*/ >> :"a"(ResultsMod)); > As stated in last msg I get the compiler error below with this... > > ...: invalid 'asm' : operand number missing after %-letter > > So I reread the error and remember I needed to use > __asm__("pushl %%eax" and not __asm__("pushl %eax". > > So it links now but I still got someways to go on my own... > > Thanks for the help... Hey! I'd suggest you try this one: ,---- | __asm__("pushl %0" | : /*No output*/ | :"a"(ResultsMod)); `---- You cannot rely on ResultsMod being stored in eax, and that would be contrary to the idea behind the templated approach taken in arg0 of __asm__. So the snippet above means "no outputs; store ResultsMod into any 'a-register' (despite intel having only one) referenced as '%0'; push the value contained in register ref'ed by '%0'". Hope that's kinda right, -- Xenocryst @ Antares Scorpii -- Hasta la victoria siempre -- Che