Does the Arduino IDE have an asm() keyword or some other way of using assembly?

Hello,

Does the Arduino IDE support calls to assembly functions in any way? If not, where can I get an avr assembler?

Does the Arduino IDE support calls to assembly functions in any way?

Yes. Look at this thread: http://forum.arduino.cc/index.php?topic=101034.0

Yes it does.

I use this in my code for fast SPI transfers.

This goes at the top of the sketch:

define nop asm volatile ("nop")

Need this in setup() to set up the IO pins and select 8 MHz SPI clock speed: SPI.begin(); SPI.setClockDivider(SPI_CLOCK_DIV2 ); // 8 MHz rate

This does the transfer: SPDR = (testArray[0]); nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; SPDR = (testArray[1]); nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; SPDR = (testArray[2]); nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; SPDR = (testArray[3]); nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop;

I actually have an array of 45 bytes I blast out to shift registers like this. So the AVR GCC compiler handles Assembler already.

You can do this in two ways: - Write inline assembler inside your c code - You can write functions in assembler inside a .S (capital S!) file which are referred from a .h file. These can then be placed in a folder among the libraries

The assembler is already in place

Thank you all for your help.