Solved

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

Posted on 2001-06-18
2
362 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 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.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

717 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