• 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
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.

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:


GCC is easy to download with Cygwin:




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.
Busting 5 common myths about IT jobs.

Ignore popular stereotypes about what it’s like to work in IT. It’s a tech-driven world, and tech-based jobs are among the most diverse, and rewarding as you can get. Think you’ll be holed up in a basement, staring at a computer while outsourcing threatens your job security?

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
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
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 ...
djhexAuthor Commented:
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
djhexAuthor Commented:
I am still waiting the answer.
Make yourself comfortable ... its going to be a long wait here.
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

From novice to tech pro — start learning today.