We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I do my main program in c. I want to call in this c program a fonction (procedure) in assembler. How can I do this ? with a #include <xxxx.a51> ? how can I do a mix program with c and assembler procedure?
thanks for your answer.
"and this warning came without any assembler code in my programm."
The trouble is, you have convered your entire project to assembler. This means that the Linker doesn't know that it should be a 'C' project, and doesn't automatically include the necessary 'C' runtime support.
If you search for those messages in the knowledge base, you will find more detailed descriptions.
"what can I do for this?"
Don't convert the entire project to assembler!
Have just one file that contains the "skeleton" for just one function, and apply the SRC directive to that file only.
the one that works for me when doing 'funny stuff' mixing C and assembler
void assembler_main(void) void main(void) {
assembler_main(): }
with that you can - when you FULLY know what you are doing - have C calling assembler and assewmbler calling C
Erik
sir erak
you give good idea for simple code
i do assssemblery code in startup go call c from that
main is not need you know it is only convention
you want i give you sample????
main is not need you know it is only convention it IS, unless you code assembler from scratch. The 'assembler' generated by the SRC still depend on all the C 'amenities' that startup and the next 'automatic', the name of which I can not think of right now, create.
sir erac
it IS, unless you code assembler from scratch
you is wrong you be know!!!!
startup has line
LJMP ?C_START
this is be line to calll main
remove ?C_START you no need main
you caall can then
LJMP any_asm_or_c_function_you_be_wanting
i know you see i try and workk well
you now want me send yo sample code to see?????
i not want money from friend erac for code!!!!
Modifying the startup code to jump to an application completely written in assembler does not make sense.
If I am then why does what I have work and yours not?
DO IT
what is your problem trying a simple thing that will take you 5 minutes instead of discussing this for hours?
"Modifying the startup code to jump to an application completely written in assembler does not make sense."
why you not think so?????
if appplication is all assemblere you must break in modules
i told it is good structuure you know more modules
begin module is startup
but i not say all assembllerer!!!!!
you call assembleerc in start and c in any order i say
plz think consept is good!!!???!!!
sorry
i sit in corner wear my hat and think good
I am sorry, I have made the mistake of responding to what you asked him