Hello AH. Thanks for your very short and simple question:
--- In lpc2000@yahoogroups.com, "ah_sandiego" <ah_sandiego@...> wrote:
> Can someone post a simple example of C and inline ASM in a single
> file. I use the LPC2148 but any LPC board example would be helpful.
If you wanted to branch to an address stored in a variable (pointer),
"addr" in arm or thumb mode as appropriate, you could use the
following statement:
> asm volatile (" bx %0" : : "r" (addr));
The ":" syntax in ASM constructs is specific to GCC (AFAIK) and it is
used as a way of getting the instruction generator to do what you want
it to do. The following reference is a good start:
http://www.ethernut.de/en/documents/arm-inline-asm.html
Hope this helps.
JayaMessage
Re: Example of C and inline ASM in a file?
2006-04-08 by jayasooriah
Attachments
- No local attachments were found for this message.