One final inline assembly constraint question.

One final inline assembly constraint question.

Post by Joe » Sat, 26 Jul 2003 15:01:58



I have read up on, and am now pretty familiar with the usual "a" =
eax, "S" = esi, and so on, but I'd like an example of one of the
following please.
"<" Autodecrement addressing memory
">" Autoincrement addressing memory
Thank you.
 
 
 

One final inline assembly constraint question.

Post by Ben Peddel » Sat, 26 Jul 2003 18:59:26



> I have read up on, and am now pretty familiar with the usual "a" =
> eax, "S" = esi, and so on, but I'd like an example of one of the
> following please.
> "<" Autodecrement addressing memory
> ">" Autoincrement addressing memory
> Thank you.

Unfortunately, gcc does not accept ">" and "<" on the x86 (inconsistent
operand constraints in an `asm'). It'll bypass the '<' or '>' if you
specify another constraint with it (Multiple Alternative).
Perhaps because there are no implicitly auto-increment or auto-decrement
registers on the x86.

If it did accept '<' and '>', then it could cld / std and use ESI for
the output memory operand and EDI for the input memory operand.

 
 
 

One final inline assembly constraint question.

Post by DJ Delori » Sat, 26 Jul 2003 21:57:41


Quote:> I have read up on, and am now pretty familiar with the usual "a" =
> eax, "S" = esi, and so on, but I'd like an example of one of the
> following please.
> "<" Autodecrement addressing memory
> ">" Autoincrement addressing memory

Pushes and pops use these.
 
 
 

One final inline assembly constraint question.

Post by Joe » Sun, 27 Jul 2003 08:53:48




> > I have read up on, and am now pretty familiar with the usual "a" =
> > eax, "S" = esi, and so on, but I'd like an example of one of the
> > following please.
> > "<" Autodecrement addressing memory
> > ">" Autoincrement addressing memory
> > Thank you.

> Unfortunately, gcc does not accept ">" and "<" on the x86 (inconsistent
> operand constraints in an `asm'). It'll bypass the '<' or '>' if you
> specify another constraint with it (Multiple Alternative).
> Perhaps because there are no implicitly auto-increment or auto-decrement
> registers on the x86.

> If it did accept '<' and '>', then it could cld / std and use ESI for
> the output memory operand and EDI for the input memory operand.

OK, thanks for the info.
 
 
 

One final inline assembly constraint question.

Post by Joe » Sun, 27 Jul 2003 08:55:10



> > I have read up on, and am now pretty familiar with the usual "a" =
> > eax, "S" = esi, and so on, but I'd like an example of one of the
> > following please.
> > "<" Autodecrement addressing memory
> > ">" Autoincrement addressing memory

> Pushes and pops use these.

I see.  Thanks.
 
 
 

One final inline assembly constraint question.

Post by Joe » Mon, 28 Jul 2003 02:28:38




> > I have read up on, and am now pretty familiar with the usual "a" =
> > eax, "S" = esi, and so on, but I'd like an example of one of the
> > following please.
> > "<" Autodecrement addressing memory
> > ">" Autoincrement addressing memory
> > Thank you.

> Unfortunately, gcc does not accept ">" and "<" on the x86 (inconsistent
> operand constraints in an `asm'). It'll bypass the '<' or '>' if you
> specify another constraint with it (Multiple Alternative).
> Perhaps because there are no implicitly auto-increment or auto-decrement
> registers on the x86.

> If it did accept '<' and '>', then it could cld / std and use ESI for
> the output memory operand and EDI for the input memory operand.

I tried thanking you for your help, but something obviously went wrong
with the last message I tried posting, so I'm trying this again.  I
hope it posts OK this time.
 
 
 

One final inline assembly constraint question.

Post by Joe » Mon, 28 Jul 2003 02:30:02



> > I have read up on, and am now pretty familiar with the usual "a" =
> > eax, "S" = esi, and so on, but I'd like an example of one of the
> > following please.
> > "<" Autodecrement addressing memory
> > ">" Autoincrement addressing memory

> Pushes and pops use these.

I also tried thanking you, but something also messed up my post, so
here's a second attempt.  Thanks again.
 
 
 

One final inline assembly constraint question.

Post by Ben Peddel » Tue, 29 Jul 2003 01:39:53




>>>I have read up on, and am now pretty familiar with the usual "a" =
>>>eax, "S" = esi, and so on, but I'd like an example of one of the
>>>following please.
>>>"<" Autodecrement addressing memory
>>>">" Autoincrement addressing memory

>>Pushes and pops use these.

> I also tried thanking you, but something also messed up my post, so
> here's a second attempt.  Thanks again.

Google is the culprit. It tried to fix up a line it thought was wrapped.
To prevent that, leave a blank line between the qoute and your reply.
 
 
 

One final inline assembly constraint question.

Post by Ben Peddel » Tue, 29 Jul 2003 01:35:52





>>>I have read up on, and am now pretty familiar with the usual "a" =
>>>eax, "S" = esi, and so on, but I'd like an example of one of the
>>>following please.
>>>"<" Autodecrement addressing memory
>>>">" Autoincrement addressing memory
>>>Thank you.

>>Unfortunately, gcc does not accept ">" and "<" on the x86 (inconsistent
>>operand constraints in an `asm'). It'll bypass the '<' or '>' if you
>>specify another constraint with it (Multiple Alternative).
>>Perhaps because there are no implicitly auto-increment or auto-decrement
>>registers on the x86.

>>If it did accept '<' and '>', then it could cld / std and use ESI for
>>the output memory operand and EDI for the input memory operand.

> I tried thanking you for your help, but something obviously went wrong
> with the last message I tried posting, so I'm trying this again.  I
> hope it posts OK this time.

Your previous message did get through.

Strange that Google put your Thankyou ("OK, thanks for the info.") in
the quote.

 
 
 

1. Inline assembly verses straight assembly

I write code using Microsoft C and assembly.  My question is this.

If I am writing code in C, and decide to write a function in assembly, is
there any difference in speed between inline assembly and writing it in
assembly, compiling it and linking it into my C code.  Is there anymore
overhead in inline assembly?  Will the code be just as fast using inline
assembly as it would be in writing it in assemble as a separate module then
linking it in?

Feel free to E-Mail if you have any info.

Thanks

2. Best book on major specs: XML,XSL,XSchema,XPath,CSS1,DOM,RDF

3. Inline assembly question

4. Voice conversation W2K <-> XP

5. Simple extended inline assembly question.

6. access-list

7. Little question about inline assembly & BIOS routines...

8. need sendmail.cf file for older version

9. INLINE ASSEMBLY QUESTION

10. Quick and Easy DJGPP extended inline assembly question.

11. Quick inline assembly code problems/questions...

12. One more inline question.

13. Green Card Lottery- Final One?