11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Terms, literals, and expressionsTable 5. Summary of termsTermsTerm can beabsoluteTerm can berelocatableValue isassigned byassemblerValue isinherent intermSymbols X X X 28Literals X X X 40Self-defining terms X X 32Location counterreferenceSymbol lengthattributeOther dataattributes¹X X 35X X 37X X 40Notes:1. Other valid data attributes are scale and integer.PagereferenceFor more information about absolute and relocatable expressions, see “Absoluteand relocatable expressions” on page 46.SymbolsYou can use a symbol to represent storage locations or arbitrary values. If youwrite a symbol in the name field of an instruction, you can then specify thissymbol in the operands of other instructions and thus refer to the formerinstruction symbolically. This symbol represents a relocatable address.You can also assign an absolute value to a symbol by coding it in the name field ofan EQU instruction with an operand whose value is absolute. This lets you use thissymbol in instruction operands to represent:v Registersv Displacements in explicit addressesv Immediate datav Lengthsv Implicit addresses with absolute valuesFor details of these program elements, see “Operand entries” on page 82.The advantages of symbolic over numeric representation are:v Symbols are easier to remember and use than numeric values, thus reducingprogramming errors and increasing programming efficiency.v You can use meaningful symbols to describe the program elements theyrepresent. For example, INPUT can name a field that is to contain input data, orINDEX can name a register to be used for indexing.v You can change the value of one symbol that is used in many instructions(through an EQU instruction) more easily than you can change several numericvalues in many instructions.v If the symbols are relocatable, the assembler can calculate displacements andassign base registers for you.v Symbols are entered into a cross reference table that is printed in the OrdinarySymbol and Literal Cross <strong>Ref</strong>erence section of the assembler listing. The crossreference helps you find a symbol in the source and object section of the listingbecause it shows:28 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!