• C

Use functions from an assembly program

Hello I need to make some functions in assembly and then use them from a C program.

Please tell me first which C compiler/IDE to download.    Preferably not VC because it will take me TOOO MUCH TIME to download. and Please tell me an step by step  of what to do. If you have an assembler program example that would be great,
LVL 10
djhexAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

stefan73Commented:
Hi djhex,
Use gcc. It knows inline assembly and is quite powerful with it. Here's the manual page how to use the inline assembler:

http://gcc.gnu.org/onlinedocs/gcc-3.4.3/gcc/Extended-Asm.html#Extended-Asm

GCC is easy to download with Cygwin:

http://www.cygwin.com

Cheers!

Stefan
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
djhexAuthor Commented:
Give me an example. An assembly program and a c program that calls that asembler program.
Step by step please

I must USE MASM32 for the assembler.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

djhexAuthor Commented:
I cant use INLINE ASSEMBLER: THe homework is

Make some functions for example a sum of two numbers in assembler and call them from a  C program
0
djhexAuthor Commented:
If there is another IDE in which I can use C and assembler in ONe project without using 2 ides please tell me
0
sunnycoderCommented:
If this was homework question, you should have told us upfront ... EE has separate rules for dealing with homework questions ...

You do not have to use 2 IDEs ... you can write the code using a simple text editor and compile from the command line ... IDEs are not all important for programming ...
0
djhexAuthor Commented:
separate rules?  what you mean: EVERY QUESTION HERE CAN BE A HOMEWORK: ITS JUST PEOPLE DOESNT SAY.
0
sunnycoderCommented:
1. Drop the caps ... Its considered shouting and is bad manners on forums
2. We try to distinguish homework questions from others and do deal with them differently ... That we are not able to point out each and every one of them does not make a justifiable ground for you to break the rules. As asker, honesty of purpose is your responsibility
Read
http://www.experts-exchange.com/help.jsp#hi56
0
djhexAuthor Commented:
I am still waiting the answer.
0
sunnycoderCommented:
Make yourself comfortable ... its going to be a long wait here.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.