What does the assembler do ?

The job of the assembler is to assemble the program and to generate the hex file. Hex file generation is the final outcome of the assembler.