22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

EQU Instruction<br />

EQU Instruction<br />

The EQU instruction assigns absolute or relocatable values to symbols. Use it to:<br />

Assign single absolute values to symbols.<br />

Assign the values of previously defined symbols or expressions to new<br />

symbols, thus letting you use different mnemonics for different purposes.<br />

Compute expressions whose values are unknown at coding time or difficult to<br />

calculate. The value of the expressions is then assigned to a symbol.<br />

Assign length and type attributes to symbols, either implicitly or explicitly.<br />

| Assign program type and assembler type values to symbols.<br />

EQU also assigns attributes. It takes the value, relocation, and length attributes of<br />

the operand and assigns them to the name field symbol, and sets the integer and<br />

scale attributes to zero. The type attributes of an absolute expression is always 'U',<br />

and its length attribute is always 1 (unless the second and third operands are<br />

specified.<br />

When there is a symbol naming a complex relocatable expression, or a complex<br />

relocatable expression is eventually “reduced” to an absolute or simply relocatable<br />

expression, the first symbol is used for attribute assignment.<br />

| The program type is always null, and the assembler type is always null, except<br />

| when the appropriate operand is specified.<br />

|<br />

| ►►──symbol──EQU──expression_1──,───<br />

(1) ─┬──────────────┬<br />

─ ─,─────────────►<br />

| └─expression_2─┘<br />

| ►──┬──────────────┬──,──┬──────────────┬──,──┬──────────────┬──────►◄<br />

| └─expression_3─┘<br />

└─expression_4─┘<br />

└─expression_5─┘<br />

| Note:<br />

| 1<br />

Use commas as placeholders when there is an expression following<br />

symbol<br />

is one of the following:<br />

An ordinary symbol<br />

A variable symbol that has been assigned a character string with a value<br />

that is valid for an ordinary symbol<br />

expression_1<br />

represents a value and attributes that the assembler assigns to the symbol in<br />

the name field. expression_1 may have any value allowed for an assembly<br />

expression: absolute (including negative), relocatable, or complexly<br />

relocatable. The assembler carries this value as a signed 4-byte (32-bit)<br />

number; all four bytes are printed in the program listings opposite the symbol.<br />

Implicitly, the relocation and length attributes are also assigned for certain types<br />

of expressions.<br />

Any symbols used in expression_1 need not be previously defined. However, if<br />

any symbol is not previously defined, the value of expression_1 is not assigned<br />

to the symbol in the name field until assembly time and therefore may not be<br />

184 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!