How does one do this?
If I want to analyze how something is getting compiled, how would I get the emitted assembly code?
Here is a solution for C using gcc :
gcc -S program.c && gcc program.c -o output
Here the first part stores the assembly output of the program in the same file name as Program but with a changed .s extension, you can open it as any normal text file.
The second part here compiles your program for actual usage and generates an executable for your Program with a specified file name.
The program.c used above is the name of your program and output is the name of the executable you want to generate.
BTW It's my First post on StackOverFlow :-}