Forum : 8051
Original Post
Post Information | Post |
---|---|
April 14, 2008 - 11:14am
|
please help me on how to use asm code as a part of c code in RIDE ide. suggest me any materail to follow or read on this. |
the easy way is to make a skeleton function in C and then use the generated assembler as a basefor the assemler module.
Erik
Have a look at the section 3.6 in the RC51.pdf RC51 Compiler manual (around page 39), and at the example in C:\RIDE\EXAMPLES\8051\GENERAL\C_ASM.
Lionel
I think I have found a bug. If you declare an external function that takes void as parameter and call it from your C-Program the Linker (LX51) reports "***Error 100: UNRESOLVED EXTERNAL SYMBOL : fct3(MAIN)
Example:
You can test this by adjusting the aforementioned example (C:\RIDE\EXAMPLES\8051\GENERAL\C_ASM) accordingly.
Did you declare the function as reentrant in the definition ? The naming of a reentrant (versus non-reentrant) is different. It allows to check that the parameters are stored at the right place.
Removing the reentrant attribute indeed fixed the error, thanks.