[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


how to compile assembly

Posted on 2004-11-04
Medium Priority
Last Modified: 2010-05-18

I have generated assembly listing in MSVC 6.0.
I have then optimized and changed the code.
How do I then generated the new obj and invoke the linker to make the new program?
Can it be done with MSVC?

THank you.
Question by:hengck23

Accepted Solution

BeyondWu earned 672 total points
ID: 12500621
>>>How do I then generated the new obj and invoke the linker to make the new program?
You can compile it with MASM6.x assembler first and then link it with your other modules.
>>>Can it be done with MSVC?
No, but you can convert your code into inline asm with _asm {... } directive, I think it's maybe the simplest approach for you.


Assisted Solution

Rosuav earned 664 total points
ID: 12889554
Keep your optimizations to the most crucial loops and such, where it'll actually make a noticable difference - coding in assembly instead of C tends to make your code less readable, so don't do it everywhere.

Before you go for this approach, though, have you compiled in Release mode with optimizations on? Chances are the compiler knows what it's doing.

Assisted Solution

ram_einstein earned 664 total points
ID: 13122540

The most popular assemblers on the net are:
NASM (Netwide Assembler): http://sourceforge.net/projects/nasm/
MASM (The Microsoft Macro Assembler): http://webster.cs.ucr.edu/AsmTools/MASM/
TASM (Turbo Assembler): It isn't free. So contact Borland and pay them $$.

I strongly recommend you go for the first one if you're not particular about getting an ancient, expensive compiler (ie. TASM). Don't even think about MASM.

Hope this helps,

LVL 61

Expert Comment

ID: 15625706
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: BeyondWu {http:#12500621} & Rosuav {http:#12889554} & ram_einstein {http:#13122540}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most folks would know the basics of how Dropbox works, so that’s not the purpose of this article. Security is what it’s all about, so here I’ll share how I choose to secure my Dropbox Account and the Data it contains.
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month19 days, 2 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question