?
Solved

Use functions from an assembly program

Posted on 2005-04-06
10
Medium Priority
?
263 Views
Last Modified: 2010-04-15
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,
0
Comment
Question by:djhex
  • 5
  • 4
10 Comments
 
LVL 12

Accepted Solution

by:
stefan73 earned 2000 total points
ID: 13719972
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
 
LVL 10

Author Comment

by:djhex
ID: 13721348
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
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13722804
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Author Comment

by:djhex
ID: 13726920
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
 
LVL 10

Author Comment

by:djhex
ID: 13727001
If there is another IDE in which I can use C and assembler in ONe project without using 2 ides please tell me
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13727894
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
 
LVL 10

Author Comment

by:djhex
ID: 13729538
separate rules?  what you mean: EVERY QUESTION HERE CAN BE A HOMEWORK: ITS JUST PEOPLE DOESNT SAY.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13733310
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
 
LVL 10

Author Comment

by:djhex
ID: 13735220
I am still waiting the answer.
0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 13737503
Make yourself comfortable ... its going to be a long wait here.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

750 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