Chapter 5 Using AssemblerOperation Examples 815.4 Operation ExamplesThere are three steps to perform when you need a final list file with resolved addresses.1. With the assembler, generate a relocatable object file (.rf).2. With the linker, generate an executable format file (.ex) and map file (.map).3. With the assembler again, use the map file to generate a final list file (.lst) with addressesresolved by the linker.Program assemblyGeneration of a list file with the l option on the first assembly will not resolve addresses, so you wouldnot do so unless you have some special purpose. For the same reason, the Li, Lm, and Lc options arealso not used.as103 -g sample.asmThe above command assembles the source file (sample.asm) in the current directory, and generates arelocatable object file (sample.rf) with debug information in the current directory.as103 -g -D VERSION -o test.rf /user/source/main.asmThe above command assembles the source file (main.asm) in the /user/source directory. Forconditional assembly of the source file, assembly will proceed as though VERSION were defined.The above command also generates a relocatable object file named test.rf with debug information inthe current directory.as103 -g -o test.rf -I /user/lib sample.asmThe above example assembles the source file (sample.asm) in the current directory. Files specified byinclude will be read from the /user/lib directory.The above command also generates a relocatable object file named test.rf with debug information inthe current directory.as103 -I/user/defs -o /user/src/sample.rf -D TYPE file.asmThe above example assembles the source file (file.asm) in the current directory. For conditionalassembly (ifdef), assembly will proceed as though TYPE were declared. The assembler reads filesspecified with the include directive from the directory /user/defs.The above example will store the relocatable object file with name sample.rf in the /user/src directory.