O3) - you might see very hard to understand code. (do you want to check if your compiler works properly? - tough to judge, better trust your compiler)Īlso, bear in mind: if you set optimization level (e.g. I think, it stops after assembly code generation, it does not generate executable code. If( x1 != x2) //Skip (do not execute) next instruction if they are equalĬpse r16, r17 compare two regs and skip next instruction if regs are equalĬompilers have options to spit out assembly code.Ĭheck which compiler you use and set the option in the compiler arguments, e.g. St x, r16 content of r16 reg goes to a location pointed by x Ldi r26, 0x20 register pair now works as X-pointer register Lds 0x0120, r16 an arbitrary RAM location (see Fig-1 below) Check if you can follow them:Ītmel-0856-AVR-Instruction-Set-Manual.pdf (2.4 MB) I provide few samples of C codes and the corresponding ASM Codes (hand assembled using the attached Instruction Set Manual ).