Archived

This topic is now archived and is closed to further replies.

Assembly and C/C++

This topic is 6009 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Are there any two compilers that work really good with each other? An asm and C/C++ compiler all in one maybe? I have Borlands Turbo C++ that supposedly can have inline assembly but I''m not sure how well that works, any suggestions or comments?

Share this post


Link to post
Share on other sites
If you want to use assembly code in your program you can either use the inline assembler or use MASM or TASM to generate an .obj file which you can link to the rest of your code using the right compiler directive (read the help file).

BTW: There is no such thing as an "assembly compiler"

Share this post


Link to post
Share on other sites
Any assembler + any C/C++ compiler pretty much + any linker.

For example NASM and GCC do a good work for me. GCC use GAS for inline assembly and thus AT&T syntax which is IMO rather painful to code with. Besides, I''m almost sure GAS doesn''t support all fancy MMX/SSE/etc intructions.


"This album was written, recorded and edited at Gröndal, Stockholm in the year of 2000. At this point in time money still ruled the world. Capitalistic thoughts were wide spread. From the sky filled with the fumes of a billionarie''s cigar to the deepest abyss drenched in nuclear waste. A rich kid was a happy kid, oh..dirty, filthy times. Let this be a reminder."
- Fireside, taken from back of the Elite album

Share this post


Link to post
Share on other sites
Where can I get the MASM 5.1. It seems to be regarded as one of the better assembly programs? I''ve tryed MASM32 but it won''t take a lot of the dos assembly coding.

Share this post


Link to post
Share on other sites
__ asm {
...
}

Doesn''t work for all compilers. it isnt standard C/C++. I don''t know why it wouldn''t be standardized. It really should be. How exactly tho, can someone answer, do you link them? How can you call the assembly code?

Share this post


Link to post
Share on other sites
ok, but how do I link the Assembly .obj with the C .obj ... I''m assuming one must use command prompt access... anyone know what the prompts are for any specific compiler? I''m working with Borland Turbo C++ and MSVC++ , but I can figure out how to actually do the linking of the two objs.

Share this post


Link to post
Share on other sites
Well I haven''t tried it yet but there are 2 ways that I would try

project->add to project->files select Object Files (.obj) or project->settings->link->object/library modules.

Seeya
Krippy

Share this post


Link to post
Share on other sites