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.

Data attributes6. The scale attribute reference can only be used in arithmetic expressions inconditional assembly instructions, and in absolute and relocatable expressionsin assembler and machine instructions.Integer attribute (I')The integer attribute has a numeric value that depends on the length and scaleattribute values of the data being referred to by the attribute reference. Theformulas relating the integer attribute to the length and scale attributes are givenin Table 54.The integer attribute can also be specified outside conditional assemblyinstructions. Then, the integer attribute value is not used for conditional assemblyprocessing, but is used as a value at assembly time.Notes:1. The integer attribute reference can be used only in arithmetic expressions.2. When no integer attribute value can be determined, the reference is flagged andthe integer attribute is 1.3. If the value of the SETC symbol is equal to the name of an instruction that canvalidly define the integer attribute, the assembler lets you use the integerattribute with a SETC symbol.4. Binary floating-point constants return an attribute of 0.5. Decimal floating-point constants return an attribute of 0.6. The integer attribute reference can only be used in arithmetic expressions inconditional assembly instructions, and in absolute and relocatable expressionsin assembler and machine instructions.Table 54. Relationship of integer to length and scale attributesConstant TypeFixed-point(H and F)Formula Relating Integer toLength and Scale Attributes ExamplesI’ = 8*L’−S’−1 HALFCON DC HS6’−25.93’Values of the IntegerAttributeI’ = 8*2−6−1= 9ONECON DC FS8’100.3E−2’I’ = 8*4−8−1= 23Floating-point(D, E, and L)when L’ ≤ 8I’ = 2*(L’−1)−S’SHORT DC ES2’46.415’I’ = 2*(4−1)−2= 4LONG DC DS5’−3.729’I’ = 2*(8−1)−5= 9L-typeonlywhen L’ > 8I’ = 2*(L’−1)−S’−2EXTEND DC LS10’5.312’I’ = 2*(16−1)−10−2= 18Decimal¹Packed (P)I’ = 2*L’−S’−1PACK DC P’+3.513’I’ = 2*3−3−1= 2Zoned (Z)Notes:I’ = L’−S’ZONE DC Z’3.513’I’ = 4−3= 11. The value of the integer attribute is equal to the number of digits to the left of the assumed decimal point afterthe constant is assembled, and the value of the scale attribute is equal to the number of digits to the right of theassumed decimal point.Chapter 9. How to write conditional assembly instructions 331

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

Saved successfully!

Ooh no, something went wrong!