I have some code in a project that uses assembly language. I am using CrossWorks
and it doesn't like this. Here is the code:
static inline unsigned __get_cpsr(void)
{
unsigned long retval;
asm volatile (" mrs %0, cpsr" : "=r" (retval) : /* no inputs */ );
return retval;
}
Here is the error:
`asm' undeclared (first use in this function)
Anyone know how to use assembly in CrossWorks?
Assembly instructions in the C code
Started by ●November 12, 2009
Reply by ●November 12, 20092009-11-12
On Fri, 13 Nov 2009 00:13:17 -0000, Bruce wrote:
> I have some code in a project that uses assembly language. I am using
> CrossWorks and it doesn't like this. Here is the code:
>
> static inline unsigned __get_cpsr(void)
> {
> unsigned long retval;
> asm volatile (" mrs %0, cpsr" : "=r" (retval) : /* no inputs */ );
> return retval;
> }
>
> Here is the error:
>
> `asm' undeclared (first use in this function)
>
> Anyone know how to use assembly in CrossWorks?
Best advice: read the FAQs.
http://rowley.zendesk.com/forums/51134/entries/46164
--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks V2 is out for LPC1700, LPC3100, LPC3200, SAM9, and more!
> I have some code in a project that uses assembly language. I am using
> CrossWorks and it doesn't like this. Here is the code:
>
> static inline unsigned __get_cpsr(void)
> {
> unsigned long retval;
> asm volatile (" mrs %0, cpsr" : "=r" (retval) : /* no inputs */ );
> return retval;
> }
>
> Here is the error:
>
> `asm' undeclared (first use in this function)
>
> Anyone know how to use assembly in CrossWorks?
Best advice: read the FAQs.
http://rowley.zendesk.com/forums/51134/entries/46164
--
Paul Curtis, Rowley Associates Ltd http://www.rowley.co.uk
CrossWorks V2 is out for LPC1700, LPC3100, LPC3200, SAM9, and more!