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.

DC instruction—Decimal constantsDECIMALS DC PL8’+25.8,−3874,+2.3’,Z’+80,−3.72’The last example shows the use of a packed decimal literal.UNPKOUTAREA,=PL2’+25’Address constantsAn address constant is an absolute or relocatable expression, such as a storageaddress, that is translated into a constant. Address constants can be used forinitializing base registers to facilitate the addressing of storage. Furthermore, theyprovide a means of communicating between control sections of a multisectionprogram. However, storage addressing and control section communication alsodepends on the USING assembler instruction and the loading of registers. See“USING instruction” on page 216.The nominal value of an address constant, unlike other types of constants, isenclosed in parentheses. If two or more address constants are specified in anoperand, they are separated by commas, and the whole sequence is enclosed byparentheses. There are seven types of address constants: A, Y, S, R, Q, J and V. Arelocatable address constant may not be specified with bit lengths.Complex relocatable expressions: A complex relocatable expression can onlyspecify an A-or Y-type address constant. These expressions contain two or moreunpaired relocatable terms, or two or more negative relocatable terms in additionto any absolute or paired relocatable terms. A complex relocatable expressionmight consist of external symbols and designate an address in an independentassembly that is to be linked and loaded with the assembly containing the addressconstant.The following example shows how, and why, a complex relocatable expressioncould be used for an A or Y address constant:EXTRNXB DC A(X-*) Offset from B to XAddress constants—A and Y: The following sections describe how the differenttypes of address constants are assembled from expressions that usually representstorage addresses, and how the constants are used for addressing within andbetween source modules.In the A-type and Y-type address constants, you can specify any of the threefollowing types of assembly-time expressions whose values the assembler thencomputes and assembles into object code. Use this expression computation asfollows:v Relocatable expressions for addressingv Absolute expressions for addressing and value computationv Complex relocatable expressions to relate addresses in different source modulesLiterals, which are relocatable forms, are not allowed as operands, but length, scaleand integer attribute references to literals are allowed.Here are some examples:DCDCDCA(L’=F’1.23’)A(I’=F’3.45’)A(S’=FS6’7.89)Chapter 5. Assembler instruction statements 151

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

Saved successfully!

Ooh no, something went wrong!