SHASM Data and Data Area Directives

The following table shows SHASM 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. For more information about FDATA, see SHASM Floating Point Data.
.FDATAB
[<symbol>[:]] .FDATAB[.<operation size>] 
<block count>,<floating point data>
Reserves floating-point data blocks. For more information about FDATAB, see SHASM 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 may only be double quoted strings, and they may be used without parentheses.

See Also

SHx Series Assembler Directives | SHASM Section and Location Directives | SHASM Symbol Handling Directives | SHASM Function-Definition Directives | SHASM Debug Information Directives | SHASM Listing Directives | SHASM Miscellaneous Directives | SHASM Conditional Assembly Directives | SHASM Macro Directives

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.