Assembler Directives and Pseudo-Operations

.STRING and .STRINGZ Pseudo-Operations

Discussion

The .STRING pseudo-operation requests the required number of bytes to store the string (where each character is stored in a byte). The .STRINGZ pseudo-operation also requests the required storage for the quoted string but then appends a zero byte for compatibility with C language strings.

When you label one of these pseudo-operations, the label refers to the first byte of the storage area.

Examples

This pseudo-operation allocates eight bytes, the first of which is labeled G. Then it initializes this area with the characters: A, space, S, T, R, I, N, and G.

G .STRING "A STRING"

This pseudo-operation allocates eight bytes to hold A STRING, allocates an additional byte for the appended zero, and associates the label G with the first byte of the storage area.

G .STRINGZ "A STRING"

110

Chapter 4