Hi all can anyone tell me how to include assembly code in between your C coding. For the sake of simplicity consider the below code and mentioned procedure thereafter which I learn from the A51macro assembler and utility file.
void main() { #pragma asm JMP $ #pragma endasm while(1); }
After this step I am right clicking on my source file main.c and in the Option for... properties I am activating Generate Assembler SRC file and Assemble SRC file. After this step on final rebuilding the target files I am getting list of 2 warnings- 1) UNRESOLVED EXTERNAL SYMBOL symbol C_START 2) REFERENCE MADE TO UNRESOLVED EXTERNAL symbol C_START
Please tell how to eliminate this and get 0 error and 0 warning. Thanks
"can anyone tell me how to include assembly code in between your C coding"
Yes - the C51 Manual tells you that!
If you are not sufficiently familiar with the C51 Manual to know that, then you are probably not sufficiently familiar with C51 to be doing it at all!
Before discussing this further, please see this thread: http://www.keil.com/forum/17856/ and be sure to read the linked article.
Hi Andy I had gone through the link mentioned by you in the last message. Thanks it helps me a lot to understand the basics and following the same I able to successfully write a small assembly in a seperate source file. The remaining technique remains the same as mentioned previously.
Okay now in the link http://www.keil.com/forum/docs/thread17991.asp#msg92653 the 2nd reply given by you mention that the C51 provide peculiar feature which eliminate the need of assembler. See now my requirement needs to write some data on the flash memory during runtime . It require IAP for that I need to access the particular sector in the flash "Is it possible to do without C??"
Sorry the last line is Without ASSEMBLY
View all questions in Keil forum