Differences Between SHASM and Hitachi Assembler
The following list highlights differences between SHASM and the Hitachi native assembler.
- SHASM generates output in Microsoft COFF; the Hitachi assembler generates output in SYSROF. Limitations of the Microsoft COFF format mean that certain features of the Hitachi assembler are restricted or unavailable in SHASM.
- Constant symbols defined with .EQU cannot be imported or exported. Only label symbols and relative .EQU symbols can be imported and exported.
- Symbols from a DUMMY section cannot be exported.
- Alignments greater than 64 are not supported.
- The COMMON section type is not supported.
- The STACK section type is supported as if it were a regular DATA section.
- Absolute sections are not supported.
- Cannot specify an entry point using the .END directive.
- Arithmetic expressions that involve relative symbols must be reducible to one of the following forms:
- expr: constant
- | symbol
- | expr + expr
- | expr - constant
- SHASM generates error and warning messages that contain, not only an error number, but also a descriptive message.
- SHASM shows source line numbers rather than accumulated line numbers in the listing.
- The default number of columns for the SHASM listing is 80, rather than 132 lines. However, SHASM does not truncate the source lines in the assemble listing, regardless of the number of columns.
- By default, SHASM displays machine code and data four bytes to a line. The Hitachi assembler shows up to eight bytes to a line. You can use the -wide command-line option to select alternate behavior for SHASM.
- The Hitachi assembler includes a cross-reference list and section list in the listing file by default. SHASM does not currently support either the cross-reference list or the section list.
- The .CPU directive described in the Hitachi assembler documentation is only partly implemented. If either -cpu or -Qsh are used to specify a CPU on the command line, .CPU is ignored. In addition, if .CPU appears more than once, all but the first are ignored. The SHCPU environment variable is ignored completely. To assemble for a CPU other than the SH-3, the -cpu or -Qsh command-line options must be specified.
See Also
What's New for SH-4 | New SHx Assembler Registers | New SHx Assembler Instructions | SHx Assembler Programming Limitations
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.