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

Assembly calling C function and entry directive

Hello, I want to call C program from arm assembly program. I written the code as below. Both the code are in different file. Assembly in .s and C code in .c file. When i run the program it will first start to run the C code and assembly code is not executing. Eventhough i am not able to see assembly code in disassembly window. I want to start execution from assembly and wants to call c function from assembly.Device Selected LPC2148.
Assembly code: preserve8 export f area |f|, code, readonly import g
entry mov r3,#0x05 bl g end
C code: int main(){ int a; g();} void g(){} My second question is about entry directive. Here i specified then also its not start to execute from there. Eventhough in different project i specified to area directive and give the entry directive in second area code then also it start to execute instruction from first area. Again i change the code, keep only one area and give the entry directive after some instruction. No change in the execution. Not able to change exection any way. Please give feedback.

0