Contents|Index|Previous|Next

General assembler options for Hitachi H8/300

To use the GNU assembler to assemble gcc output, configure gcc with the switch, --with-gnu-as (in GNUPro Toolkit distributions) or with the -mgas option.

-mgas
Compile using as to assemble GCC output.

-Wa
If you invoke as through the GNU C compiler (version 2), you can use the -Wa option to pass arguments through to the assembler. One common use of this option is to exploit the assemblers listing features. Assembler arguments that you specify with gcc -Wa must be separated from each other (and the -Wa) by commas.

-L
The additional assembler option, -L, preserves local labels, which may make the listing output more intelligible to humans.

For example, in the following commandline, the assembler option, -ahl, requests a listing interspersed with high-level language and assembly language.

    $ h8300-hms-gcc -c -g -O -Wa,-alh, -L file.c

-L preserves local labels, while the compiler debugging option , -g, gives the assembler the necessary debugging information.

Assembler options for listing output for Hitachi H8/300

Use the following options to enable listing output from the assembler (the letters after -a may be combined into one option, such as -aln).

-a
By itself, -a requests listings of high-level language source, assembly language, and symbols.

-ah
Request a high-level language listing.

-al
Request an output-program assembly listing.

-as
Request a symbol table listing.

-ad
Omit debugging directives from the listing.

High-level listings require that a compiler debugging option, like -g, be used, and that assembly listings (-al) also be requested.

Assembler listing-control directives for Hitachi H8/300

Use the following listing-control Hitachi H8/300 assembler directives to control the appearance of the listing output (if you do not request listing output with one of the -a options, the following listing-control directives have no effect).

.list
Turn on listings from this point on.

.nolist
Turn off listings from this point on.

.psize linecount, columnwidth
Describe the page size for your output (the default is 60, 200). as generates form feeds after printing each group of linecount lines. To avoid these automatic form feeds, specify 0 as the linecount.

.eject
Skip to a new page (issue a form feed).

.title
Use heading as the title (this is the second line of the listing output, directly after the source file name and page number) when generating assembly listings.

.sbttl
Use subheading as the subtitle (this is the third line of the listing output, directly after the title line) when generating assembly listings.

-an
Turn off all forms processing.