Share via


SH-4 Assembler Command-Line Options (Windows Embedded CE 6.0)

1/5/2010

To start the SH-4 assembler, enter a command line with the following format when the host computer operating system is in the input wait state.

shasm <input source file> [,<input source file>...][command line options>...]

When you specify multiple source files on the command line, the assembler creates a unit of assembly processing by concatenating the specified files in the specified order. Because of this, the .END directive must appear only in the last file.

Command line options can begin with either a - (hyphen) or a / (slash). File names can be specified with forward or backward slashes.

If the assembler has the option of interpreting an argument as either a command line option or a file name, the argument will be interpreted as a command line option. For example, if a file called /source.src is assembled by writing shasm /source, the assembler interprets /source as a switch, and issues a message that there are no input files.

Command line options provide additional specifications for the assembly processing. The following table shows the command line options for the SH-4 assembler.

Command line option Description

-OBJECT

Specifies output of an object module. Default value.

-NOOBJECT

Suppresses output of an object module.

-DEBUG

Specifies output of debug information.

-NODEBUG

Suppresses output of debug information.

-LIST

Specifies output of an assembler listing. Default value.

-NOLIST

Suppresses output of an assembler listing.

-SHOW

Specifies output of the preprocessor function source program.

-NOSHOW

Suppresses output of specified preprocessor function source statements and object code display lines in the source program listing.

-LINES

Sets the number of lines in the assembler listing.

-COLUMNS

Sets the number of columns in the assembler listing.

-FoOBJPATH

Sets the path to which the object should be written. A synonym for the -o=OBJPATH option. Provided for compatibility with Microsoft-based tools.

-wide[_listing]

Shows up to eight bytes of machine code or data per line in the assemble listing. Default is four bytes per line.

-nowide[_listing]

Shows up to four bytes of machine code or data per line in the assemble listing. This is the default behavior.

-tab[_expand][=<number>]

Expands tab characters in the assemble listing. The number, if specified, is the spacing of tab stops. Default is eight.

-Notab[_expand]

Writes tab characters into the assemble listing unchanged. This is the default behavior.

-maxerr[ors]=<number>

Aborts the assembly after <number> errors have been reported. Default is 100.

-Qsh<version>[r<revision>]

Selects SH microprocessor version and revision that control the setting of the _M_SH and _M_SH_REV predefined symbols. Default is version SH-4.

-nologo

Instructs not to print the logo banner when it runs.

-help -usage

Output a detailed command line usage message and exit immediately.

-D<name>[=<number>]

Predefines an equate; for example, -DTERM is equivalent to TERM.

-CPU=SH<version>

Selects target CPU for the source program being assembled. Valid options are:

  • SH1
  • SH2
  • SH4

The assembler listing is a listing to which the results of the assembly processing are output.

Note that when compiling an assembly source file that ends in .s, in contrast to .asm or .src, then the output object file concatenates .obj to the end of the file name. For example, a file named test.s is assembled to test.s.obj.

Return Codes

The assembler delivers a return code that reports whether or not the assembly processing terminated normally. The following table shows the return values that indicate the activity at termination.

Activity Return value

Normal termination

0

Warnings occurred

0

Errors occurred

2

Fatal error occurred

4

See Also

Other Resources

Renesas SH-4 Series Assembler