I am a newbie. I am starting to learn assembler (just to learn). I read someplace that it is possible to write pure AVR assembler directly within the IDE and the .INO files. I read it can be mixed in with the Arduino code so that it can be compiled, uploaded and ran just like a pure Arduino sketch.
I have been trying to find where in my IDE I can make this happen (set up files??). If someone knows and can tell me I would apreciate it very much. Thanks.
Have you found anything by googling? I'd start with a search there.
The most I've done is Direct Port Manipulation:
PORTD = PORTD & 0b11111011; // clear bit 2 for example
or defining a nop
#define nop asm volatile ("nop")
so it could be used in code:
SPDR = dataArray[x+0];nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop; // wait out the SPI transfer
SPDR = dataArray[x+1];nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;
It sounds like inline assembly is what you're looking for but you might be interested to know the Arduino IDE also supports non-inline assembly in .S files. Here's an example of a Blink sketch using one: https://forum.arduino.cc/index.php?topic=413151.0