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.

DC instruction—Address constantsTable 29. R address constants (continued)Subfield Value Example ResultTruncation ofassembled value:Not applicableAddress constant—S: Use the S-type address constant to assemble an explicitaddress in base-displacement form. You can specify the explicit address yourself orlet the assembler compute it from an implicit address, using the current baseregister and address in its computation.The nominal values can be specified in two ways:1. As one absolute or relocatable expression (see ▌1▐ in Table 30 on page 156)representing an implicit address.2. As two absolute expressions (see ▌2▐ in Table 30) the first of which representsthe displacement and the second, enclosed in parentheses, represents the baseregister.|||||The address value represented by the expression in ▌1▐ in Table 30, is converted bythe assembler into the correct base register and displacement value. An S-typeconstant is assembled as a halfword and aligned on a halfword boundary. AnSY-type constant is assembled as 3 bytes and aligned on a halfword boundary. Theleftmost four bits of the assembled constant represent the base register designation;the remaining 12 bits (S-type) or 20 bits (SY-type), the displacement value.Notes:1. The value of the location counter (*) when specified in an S-type addressconstant varies from constant to constant if one or more the following isspecified:v Multiple operandsv Multiple nominal valuesv A duplication factorIn each case the location counter is incremented with the length of thepreviously assembled constant, except when multiple S-type address constantsare specified in a literal. In a literal, the same location counter value is used foreach of the multiple values.2. If a length modifier is used, only 2 bytes for an S-type constant, or only 3 bytesfor an SY-type constant, may be specified.3. S-type address constants can be specified as literals. The USING instructionsused to resolve them are those in effect at the place where the literal pool isassembled, and not where the literal is used.4. The location counter value used in the literal is the value at the point where theliteral is used, not where it is defined.For example:USING *,15DC 2S(*) generates F000F002LA 1,=2S(*) generated constants are F004F004Note that this behavior is different from that in A-type address constants andY-type address constants.Chapter 5. Assembler instruction statements 155

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

Saved successfully!

Ooh no, something went wrong!