Assembler Directives and Pseudo-Operations

.WORD Pseudo-Operation

.WORD Pseudo-Operation

The .WORD pseudo-operation reserves storage and initializes it to the given value.

Syntax

.WORD [ init_value[ , init_value] ...]

Parameters

init_value A relocatable or absolute expression, a decimal, octal, or hexadecimal number, or a sequence of ASCII characters surrounded by quotation marks. If you omit the initializing value, the Assembler initializes the area to zero.

Discussion

The .WORD pseudo-operation requests 32 bits of storage. If the location counter is not properly aligned on a boundary for a data item of that size, the Assembler advances the location counter to the next multiple of that item's size before reserving the area.

When you label the pseudo-operation, the label refers to the first byte of the storage area. Operands separated by commas initialize successive units of storage.

Example

The first pseudo-operation advances the current subspace's location counter to a word boundary, allocates a word of storage labeled F and initializes that word to minus 32 (2's complement). The second pseudo-operation initializes a word of storage to the hexadecimal number 6EFF1234.

F .WORD -32

.WORD 0X6eff1234

Chapter 4

115