Share via


SH-4 Assembler Data and Data Area Directives (Windows Embedded CE 6.0)

1/5/2010

The following table shows SH-4 assembler directives for data and data area reservation.

Directive Syntax Description

.COMMON

.COMMON <symbol name>[,<size>]

Reserves data area with default initialization to zeros.

.DATA

[<symbol>[:]] .DATA[.<operation size>] <integer data>[,<integer data>...]

Reserves integer data.

The following list shows the data size of symbol.

  • B - Byte
  • W - Word, 2 bytes
  • L - Longword, 4 bytes, default

.DATAB

[<symbol>[:]] .DATAB[.<operation size>]<block count>,<integer data>

Reserves integer data blocks.

The block count specification must be an absolute value with no forward reference symbols.

.FDATA

[<symbol>[:]] .FDATA[.<operation size>] <floating point data>[,<floating point data>...]

Reserves floating-point data.

.FDATAB

[<symbol>[:]] .FDATAB[.<operation size>] <block count>,<floating point data>

Reserves floating-point data blocks.

.FRES

[<symbol>[:]] .FRES[.<operation size>] <area count>

Reserves floating-point area.

The area count specification must be an absolute value with no forward reference symbols.

.SDATA

[<symbol>[:]] .SDATA <character string>[,<character string>...]

Reserves character string data.

.SDATAB

[<symbol>[:]] .SDATAB <block count>,<character string>

Reserves character string data blocks.

.SDATAC

[<symbol>[:]] .SDATAC <character string>[,<character string>...]

Reserves character string data with length.

.SDATACB

[<symbol>[:]] .SDATACB <block count>,<character string>

Reserves specified number of character string data blocks with length.

A character string with length is a character string with an inserted leading byte that indicates the length of the string.

.SDATAZ

[<symbol>[:]] .SDATAZ <character string>[,<character string>...]

Reserves character string data with zero terminator.

.SDATAZB

[<symbol>[:]] .SDATAZB <block count>,<character string>

Reserves specified number of character string data blocks with zero terminator.

.RES

[<symbol>[:]] .RES[.<operation size>] <area count>

Reserves data area.

The area count specification must be an absolute value with no forward reference symbols.

.SRES

[<symbol>[:]] .SRES <character string area size>[,<character string area size>...]

Reserves character string data area.

The character string area size specification must be an absolute value with no forward reference symbols.

.SRESC

[<symbol>[:]] .SRESC <character string area size>[,<character string area size>...]

Reserves character string data area with length.

A character string with length is a character string with an inserted leading byte that indicates the length of the string.

.SRESZ

[<symbol>[:]] .SRESZ <character string area size>[,<character string area size>...]

Reserves character string data area with zero terminator.

String constants in the .SDATA family of directives are allowed to be one or more of the following in any combination:

"quoted string"
<control char expression>

The assembler requires that parentheses be put around string constants if they are to be used as part of more complicated expressions such as string comparisons in .SDATA and related directives.

In all other contexts, string constants can only be double-quoted strings, and can be used without parentheses.

See Also

Reference

SH-4 Assembler Directives