Solved

Compiling .asm file as part of the Visual C++ Project

Posted on 2001-06-18
2
355 Views
Last Modified: 2010-04-02
Hi,

How can I make Visual C++ IDE/compiler to compile .asm file which is part of the Visual C++ project? What other tools do I need to compile the .asm file? Or, will the VC++ compiler itself compile .asm file, with any switch?

Also, how can I change the code segment for a particular function? Is there any way I can specify a different code segment for a particular function?

please help me.

Thanx in advance,
Jayaraj J.
0
Comment
Question by:Jayaraj_J
  • 2
2 Comments
 
LVL 49

Accepted Solution

by:
DanRollins earned 200 total points
ID: 6205430
See:
Q106399 - INFO: Using the Development Studio or Visual Workbench with MASM  

http://support.microsoft.com/support/kb/articles/Q106/3/99.asp

You can select a particular segment by using

#pragma code_seg

or setting options in the compiler for that module or by using the normal MASM segment-setting pseudo ops.

=-=-=-=-=-=-=-=-=-=-=-=-
However, these days, very few persons use asm, and when it is needed, you can usually write the necessary code using __asm blocks right inside of a C++ function.

-- Dan
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 6207406
Hi Jayaraj_J,

As an expert here at EE, I am striving for a "4.0 grade point average."  When you accept my comment as a "Good" answer, it lowers my average.  Please answer these questions, to help me understand how to improve:

1) Did the comment I posted help you to solve your problem?

2) Obviously my comment was less than a perfect solution in your eyes.  What could I have added to make it 100% perfect?

3) Do you understand that if the comment does not fully solve your problem, that you have the option -- in fact, the responsibility -- to respond to clarify the question or add some details?

4) Do you understand that it costs you no more to give an A than it does to give a B or a C, but that the expert recieves more points for the better grade?

5) Have you read the information at
http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp#3
and do you understand it?

6) Is there anything I said that offended you in any way?

-- Dan
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now