Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assembly language

Status
Not open for further replies.

artral

Computer
Aug 18, 2001
1
I have good knowldge in microproccer and c.
But i don't no how to write assembly program in c .
please explain my problem.
 
Replies continue below

Recommended for you

Could u explain exactly what u have to program in C.. Then I will try to explain.

 
Do you have thousands of books.
Year 80 refference.
That's all.
 
Hi,

I'm confused by your question,

Is it

a. You are writing a program in C and you wish during the normal flow of C to write some assembly code.If this is the case then the flow would go:

...
asm {
Push dx // Push regersters on stack
. // other asm code
. // other asm code
Pop dx // Pull registers off stack
}
....

Problem is this makes your program machine (processor) specific.


b. Or you want to write an assembly routine using C ???.
I'm guessing here but are you intending to write a C language piece of code for a microcontroller ?

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor