how do i adress a whole array instead of having to assign 1 register per operand ?

the problem is that if i use too many operands, the compiler generates a lot of code to load data in registers (before my code)and a lot of code to load modified registers back to the memory (after my code)

so i thought i could do the adressing myself by storing the adress of an array for instance in the z registerand the parsing memory, read/write the required values, but how to do that ?

also the compiler generates a lot of push before my actual asm code (without any pops wtf?)does anybody knows why and how to supress this, i lose a lot of cycles for nothing as the whole code runs in the "void loop(){...}" section

The compiler optimizes your code too. What makes you think you can do a better job, Rumpelstiltskin?

i know, but if you dont try.. right?

btw i end up having a code 10 times faster

seeing the code in asm, also helps you understand things that could be optimized

Excellent answer. Looking at the generated code has always helped me to make more efficient programs. While the optimizations can be incredible, the compiler does not always generate the most efficient code.

I probably know less about AVR assembler than any other assembler in the world, but I'll try to help. The tail-end registers can be paired ( R26:R27, R28:R29 and R30:R31). These are treated as 16-bit pointer registers (X, Y and Z) that can point into SRAM. Maybe setting one of these as a base pointer and using offsets you can accomplish what you want. Like I said, I have written no AVR assembler in the past, but I've written tons of ARM7, PIC and mainframe assembler along with scads of other micros.

i need fast refresh, and with c code, the led panel flickersarduino is not that fast

It's fast enough to generate VGA signals which don't flicker:

http://www.gammon.com.au/forum/?id=11608

I suggest you post your C code rather than trying to convert it all to assembler. By all means look at the generated assembler code, that's what I did. And then work out what lines of C code are generating more assembler code than you though.

To do that, find the .elf file from your compile (turn on verbose compiling) and type this at a command window: