Date: Sun, 25 Aug 1996 19:41:48 +0200 (MET DST) From: Mark Habersack Reply-To: grendel AT ananke DOT amu DOT edu DOT pl To: "Mitchell A. Whiteley" cc: djgpp AT delorie DOT com Subject: Re: What does this mean? In-Reply-To: <321D67E8.7C09@cc.usu.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 23 Aug 1996, Mitchell A. Whiteley wrote: >I have four procedures using this same format. But one gives me an >error message that I can't figure out. > >1 __asm__ __volatile__( >2 "asm code" >3 : // no output variables >4 : "r" (SBPort) // input variables >5 : "%eax", "%ecx", "%edx" ); // slaughtered registers and/or memory > >Line 5 produces an error that reads: > invalid 'asm' : operand number missing after %-letter > >I'm lost. What does this mean?????? I have done it four other times >without error messages. This procedure is the second of the four that >have the same format. I triple-checked the syntax of everything around >it!! Please note that to access registers in the in-line asm code, you have to precede their "real" names with double percent sign %%. Single % means that you want to access an "argument" to assembler snippet. So, %eax is being treated like it was a number, not register name. Since %eax is not a number at all, you get the error message. Greetings, Mark /************************************************************/ /** Maybe it was infatuation or the thrill of a chase? **/ /** Maybe you were always beyond my reach and my heart **/ /** was playing safe? ***********/ /** But was that love in your eyes I saw, **/ /** or the reflection of mine? **/ /** I'll never really know for sure, **/ /** You never really gave me time! **/ /** Won't you give me that time? **/ /** "Cindirella Search" **/ /********************************/ Visit my homepage: http://ananke.amu.edu.pl/~grendel