If you are invoking the assembler via the compiler, you can use the “-Wa” option to pass arguments through to the assembler. The assembler arguments must be separated from each other (and the “-Wa”) by commas. For example:
$ m1750-coff-gcc -c -g -O -Wa,-alhd,-L file.c
emits a listing to standard output with high-level and assembly source.
Usually you do not need to use this “-Wa” mechanism, since many compiler command-line options are automatically passed to the assembler by the compiler. (You can call the GNU compiler driver with the “-v” option to see precisely what options it passes to each compilation pass, including the assembler.)
These options enable listing output from the assembler. By itself, “-a” requests high-level, assembly, and symbols listing. You can use other letters to select specific options for the list: “-ah” requests a high-level language listing, “-al” requests an output-program assembly listing, and “-as” requests a symbol table listing. High-level listings require that a compiler debugging option like “-g” be used, and that assembly listings (“-al”) be requested also.
Use the “-ac” option to omit false conditionals from a listing. Any lines that are not assembled because of a false .if (or .ifdef, or any other conditional), or a true .if followed by an .else, will be omitted from the listing.
Use the “-ad” option to omit debugging directives from the listing.
Once you have specified one of these options, you can further control listing output and its appearance using the directives .list, .nolist, .psize, .eject, .title, and .sbttl. The “-an” option turns off all forms processing. If you do not request listing output with one of the “-a” options, the listing-control directives have no effect.
The letters after “-a” may be combined into one option, e.g., “-aln”.