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 |
|
Reserves data area with default initialization to zeros. |
.DATA |
|
Reserves integer data. The following list shows the data size of symbol.
|
.DATAB |
|
Reserves integer data blocks. The block count specification must be an absolute value with no forward reference symbols. |
.FDATA |
|
Reserves floating-point data. |
.FDATAB |
|
Reserves floating-point data blocks. |
.FRES |
|
Reserves floating-point area. The area count specification must be an absolute value with no forward reference symbols. |
.SDATA |
|
Reserves character string data. |
.SDATAB |
|
Reserves character string data blocks. |
.SDATAC |
|
Reserves character string data with length. |
.SDATACB |
|
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 |
|
Reserves character string data with zero terminator. |
.SDATAZB |
|
Reserves specified number of character string data blocks with zero terminator. |
.RES |
|
Reserves data area. The area count specification must be an absolute value with no forward reference symbols. |
.SRES |
|
Reserves character string data area. The character string area size specification must be an absolute value with no forward reference symbols. |
.SRESC |
|
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 |
|
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.