This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C and Assembly

I want to know how to write assmebly code and c code in same program.... i mean i need to write some function in assembly and some in C code.. i should be able to call both of them from either codes.. how to do this.. help me out..

Parents
  • "The startup file normally calls the initialization function of the C library.
    The initialization function of the C library normally calls main()."

    Somewhere in that chain is also the thing that initialises the user's 'C' variables...

    So, back to Erik's point, you really should make sure that you have a main() function in 'C' as your programs "entry point" - which was effectively also my point in saying, "you would generally just be calling from 'C' to assembler; not vice-versa"

Reply
  • "The startup file normally calls the initialization function of the C library.
    The initialization function of the C library normally calls main()."

    Somewhere in that chain is also the thing that initialises the user's 'C' variables...

    So, back to Erik's point, you really should make sure that you have a main() function in 'C' as your programs "entry point" - which was effectively also my point in saying, "you would generally just be calling from 'C' to assembler; not vice-versa"

Children
No data