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—Character constantTable 23. Character constants (continued)Subfield Value Example ResultRange for length: 1 to 256(byte length)Must be a multipleof 2 when theType Extension is U.1 to .2048(bit length)(Not permittedif Type Extensionof U is specified.)Range for scale: Not allowedRange for exponent: Not allowed6. Nominal valueRepresented by: Characters(all 256 8-bitcombinations)Enclosed by: Single quotationmarksExponent allowed: No (would beinterpreted ascharacter data)Number of valuesper operand:Padding: With spaces at right(X'40' EBCDIC, X'20'ASCII)Truncation ofassembled value:DC C’A’’B’DC CU’AA’DC CA’AB’Object codeX'C17DC2' ▌3▐X'00410041'X'4142'One DC C’A,B’ Object codeX'C16BC2' ▌2▐At rightIn the following example, the length attribute of FIELD is 12:FIELD DC C’TOTAL IS 110’However, in this next example, the length attribute is 15, and three spaces appearin storage to the right of the zero:FIELD DC CL15’TOTAL IS 110’In the next example, the length attribute of FIELD is 12, although 13 charactersappear in the operand. The two ampersands are paired, and so count as only onebyte.FIELD DC C’TOTAL IS &&10’In the next example, a length of 4 has been specified, but there are five charactersin the constant.FIELD DC 3CL4’ABCDE’The generated constant would be:ABCDABCDABCD142 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>The same constant could be specified as a literal.

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

Saved successfully!

Ooh no, something went wrong!