C and C++

Moderators: None (Apply to moderate this forum)
Number of threads: 28629
Number of posts: 94611

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
including assembly in c++ Posted by bosebonas on 29 May 2006 at 10:28 AM
hi everyone there ,
i am using dev c++ as my c++ compiler but i am unable to find out how to include assembly in my code . when i use the asm keyword to include assembly programs there is always an error message.
i am waiting help from anywhere. thanks.
Report
Re: including assembly in c++ Posted by IDK on 29 May 2006 at 12:47 PM
: hi everyone there ,
: i am using dev c++ as my c++ compiler but i am unable to find out how to include assembly in my code . when i use the asm keyword to include assembly programs there is always an error message.
: i am waiting help from anywhere. thanks.
:
try any of the following:
__asm
_asm
asm

with a "" or {} after
Report
Re: including assembly in c++ Posted by stober on 29 May 2006 at 2:38 PM
This message was edited by stober at 2006-5-29 14:39:33

: hi everyone there ,
: i am using dev c++ as my c++ compiler but i am unable to find out how to include assembly in my code . when i use the asm keyword to include assembly programs there is always an error message.
: i am waiting help from anywhere. thanks.
:


Dev-C++ uses AT&T style assembly. Not nearly as easy as Microsoft compilers. This this:
http://www-128.ibm.com/developerworks/linux/library/l-ia.html



Report
Re: including assembly in c++ Posted by bluj91 on 3 Jul 2006 at 8:33 PM
: This message was edited by stober at 2006-5-29 14:39:33

: : hi everyone there ,
: : i am using dev c++ as my c++ compiler but i am unable to find out how to include assembly in my code . when i use the asm keyword to include assembly programs there is always an error message.
: : i am waiting help from anywhere. thanks.
: :
:
:
: Dev-C++ uses AT&T style assembly. Not nearly as easy as Microsoft compilers. This this:
: http://www-128.ibm.com/developerworks/linux/library/l-ia.html
:
:
:
:


I remeber reading somewhere that if your using iso C++ then the function ASM() or asm() or Asm() should be avalible to you. However ANSI C does not contain a standard way to pass inline assembly

ps. if you bloodshed.net's dev-cpp then I think if you read the faq it will tell you
Report
Re: including assembly in c++ Posted by Lundin on 5 Jul 2006 at 11:21 PM
: : This message was edited by stober at 2006-5-29 14:39:33

: : : hi everyone there ,
: : : i am using dev c++ as my c++ compiler but i am unable to find out how to include assembly in my code . when i use the asm keyword to include assembly programs there is always an error message.
: : : i am waiting help from anywhere. thanks.
: : :
: :
: :
: : Dev-C++ uses AT&T style assembly. Not nearly as easy as Microsoft compilers. This this:
: : http://www-128.ibm.com/developerworks/linux/library/l-ia.html
: :
: :
: :
: :
:
:
: I remeber reading somewhere that if your using iso C++ then the function ASM() or asm() or Asm() should be avalible to you. However ANSI C does not contain a standard way to pass inline assembly
:
: ps. if you bloodshed.net's dev-cpp then I think if you read the faq it will tell you
:


In C++ it should be asm("") according to the standard.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.