??? 04/20/05 17:55 Read: times |
#92009 - C called by assembly called by C Responding to: ???'s previous message |
This and other replies, no doubt convey the fact that it is "very difficult" , "not done" and such.
But just from an academic point of view, has anybody done such a thing ? And if no one has done it, can we say " No. You cannot call a C function from an asm code " ? relevant to this As Neil says, if you have a 'C' function in your project, you will also need all the 'C' "baggage" to support it - unless it's a trivial function, in which case why use 'C' anyway?! And if you have to have all the 'C' "baggage" anyhow, what's the point of writing the rest of the code in assembler?! I DO have a case if assembly calling C. That assembly, however is called from C so Neils comment do not apply. Now, why would I do such a thing? Well assembly is used because sequentially accessing 4 concurrent buffers can be done by replacing just the high address register (addressing 4 buffers, all of 256 bytes and butted). In one special case some calculations I did not want to spend the time writing in asm are performed, so there the asm call C. The same buffer mainpulation in C get about 10 times slower. Erik |
Topic | Author | Date |
Calling a C function in a 8051 | 01/01/70 00:00 | |
It depends.... | 01/01/70 00:00 | |
You may not want to do it anyway | 01/01/70 00:00 | |
C from ASM : Yes or No | 01/01/70 00:00 | |
Yes, you can | 01/01/70 00:00 | |
Why on earth?![]() | 01/01/70 00:00 | |
C called by assembly called by C | 01/01/70 00:00 | |
What compiler | 01/01/70 00:00 | |
RE: What complier | 01/01/70 00:00 | |
I do not know | 01/01/70 00:00 | |
RTFM! | 01/01/70 00:00 | |
oh well | 01/01/70 00:00 | |
SDCC can do it | 01/01/70 00:00 | |
any compiler can do it! | 01/01/70 00:00 | |
the answer is not to that question, I th | 01/01/70 00:00 | |
I don't think. I done it | 01/01/70 00:00 | |
VFM? | 01/01/70 00:00 | |
that is my impression | 01/01/70 00:00 |