11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

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

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

Terms, literals, and expressionsC3 DC C’This is too long a string to be worth counting’STRING MVC BUF(L’C3),C3Other attribute referencesOther attributes describe the characteristics and structure of the data you define ina program; for example, the kind of constant you specify or the number ofcharacters you need to represent a value. These other attributes are:v Count (K')v Defined (D')v Integer (I')v Number (N')v Operation code (O')v Scale (S')v Type (T')You can refer to the count (K'), defined (D'), number (N'), and operation code (O')attributes only in conditional assembly instructions and expressions. For fulldetails, see “Data attributes” on page 321.LiteralsYou can use literals as operands in order to introduce data into your program. Theliteral is a special type of relocatable term. It behaves like a symbol in that itrepresents data. However, it is a special kind of term because it also is used todefine the constant specified by the literal. This is convenient because:v The data you enter as numbers for computation, addresses, or messages to beprinted is visible in the instruction in which the literal appears.v You avoid the added effort of defining constants elsewhere in your sourcemodule and then using their symbolic names in machine instruction operands.The assembler assembles the data item specified in a literal into a literal pool (See“Literal pool” on page 43). It then assembles the address of this literal data item inthe pool into the object code of the instruction that contains the literal specification.Thus, the assembler saves you a programming step by storing your literal data foryou. The assembler also organizes literal pools efficiently, so that the literal data isaligned on the correct boundary alignment and occupies a minimum amount ofspace.Literals, constants, and self-defining termsLiterals, constants, and self-defining terms differ in three important ways:v Where you can specify them in machine instructions, that is, whether theyrepresent data or an address of datav Whether they have relocatable or absolute valuesv What is assembled into the object code of the machine instruction in which theyappearFigure 9 on page 41 shows examples of the differences between literals, constants,and self-defining terms.40 <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!