Solved

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

Posted on 2001-06-18
2
356 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

920 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

15 Experts available now in Live!

Get 1:1 Help Now