Problem making AVR assembler work in the Arduino IDE

I am a beginner! I have the latest Arduino IDE (1.8.3 I believe ) installed on my other computer. I am learning to do AVR assembler out of a bunch of books.

All is well and I am writing functions, getting values, twiddling ports and pins to my heart's delight... Except some things just won't compile.

MyArray: .DB 1,2,3,4,5,6
will not assemble.

.DEF statements will not either

LPM will not put the value found at the address (specified in the Z register) into R0

I can work around all these but I still would like it all to work "right" and as it should. I will not be supprised if I come across more things that should work but don't.
Aside from these and a few other glitches I seem to be able to write small, elementary code and verify the returned values are correct.

My question is there a list of know issues trying to do AVR assembler in the Arduino IDE and any workarounds?

Thanks in advance.

PS: If someone can tell me the exact assembler that is under the hood and maybe point me to its manual I would apreciate it very much.

If someone can tell me the exact assembler that is under the hood and maybe point me to its manual I would apreciate it very much.

It's GNU-as, the executable is called 'avr-as' (or 'avr-as.exe' in that ancient other OS). As far as I find in the documentation .def is supported (in the GNU world it's lower case), .db doesn't seem supported. The LPM instruction does work to my knowledge.

pylon: Thank you. Do you have a URL for the documentation?

I mostly use This Site for explaining the gnu assembler syntax and options. It's actually for a different CPU, but the nice part of the gnu assembler is that except for the cpu instructions themselves, the syntax remains pretty constant.

MyArray: .DB 1,2,3,4,5,6
will not assemble.

.DEF statements will not either

The gnu equivalent of .DB is ".byte"
".DEF" is present in the gnu assembler but does something entirely different than in the Atmel assembler. You probably want ".EQU name,val" instead of ".def name=val"

westfa: Thanks! I kinda muddled my way to figure that out... its what ever else that is out there that bothers me. I think I may have the right documentation... gonna work on it after turkey :slight_smile: Thank you all again!