How do I get the compiled code in assembler

I folks
Today I was reading an interesting post here in the forum and Nick Gammon show an output code generate by the compiler in assember.

void loop(){
int var_a;
var_a = analogRead(A1);

void setup ()
} // end of setup

Generated assembler:


000000e0 :
e0: 8f e0 ldi r24, 0x0F ; 15 (1)
e2: 0e 94 74 00 call 0xe8 ; 0xe8 (4)
e6: 08 95 ret (4)

I always ask my self how can I get the assembler code generated by the compiler do a simple program.
This is a great way of trying to guess what the compiler is doing in some cases.
Is there any asm file generated when I do a compile?

I don't think there is by default, no. You could manually create it using avr-objdump

avr-objdump -h -S mySketch.elf

Of course, you need to tell it where avr-objdump and mySketch.elf are on your system (mySketch.elf is in your sketch's build directory).

Alternatively, UECIDE has an option to output the LSS file (LiSting + Source) into the sketches own folder when you compile, which is very useful.