lpcware

Inine assembly in LPC Xpresso(cortex m3)

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by venkateshkuppan on Tue Feb 12 05:57:30 MST 2013
I am trying to write a simple program combining C and assembly language.
I used the following syntax:

eg:

int main()
{

__asm
(
    "add r0,#1\n"
    "add r1,r0\n"
);
return 0;
}


but here while debugging the assembly part does not get executed, the control directly goes to the end of program.

So do I have to include some symbols or is there a mistake in the code I am using?

Outcomes