Most assemblers can provide the programmer with a listing file, which shows the machine code for each instruction. The command line option for the as assembler to produce an assembly listing is -al. This causes the listing to be printed to standard output (your terminal window), so you probably want to redirect this output to a file. For example, the command:
as --gstabs -al -o assignment2.o assignment2.s > assignment2.lst