www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/25/14:05:24

Date: Sun, 25 Aug 1996 19:41:48 +0200 (MET DST)
From: Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl>
Reply-To: grendel AT ananke DOT amu DOT edu DOT pl
To: "Mitchell A. Whiteley" <slyjv AT cc DOT usu DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: What does this mean?
In-Reply-To: <321D67E8.7C09@cc.usu.edu>
Message-ID: <Pine.NEB.3.95.960825193858.6895A-100000@ananke.amu.edu.pl>
MIME-Version: 1.0

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019