22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

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—Graphic Constant<br />

(X'40'). The assembler then maps each EBCDIC character into its 2-byte Unicode<br />

UTF-16 equivalent.<br />

For example:<br />

UA DC CU'UTF-16' object code X' 5554462D3136'<br />

UB DC CUL4'L' object code X' 4C2'<br />

UC DC CUL2'XYZ' object code X' 58'<br />

Double-byte data in character constants: When the DBCS assembler option is<br />

specified, double-byte data may be used in a character constant. The start of<br />

double-byte data is delimited by SO, and the end by SI. All characters between SO<br />

and SI must be valid double-byte characters. No single-byte meaning is drawn<br />

from the double-byte data. Hence, special characters such as the single quotation<br />

mark and ampersand are not recognized between SO and SI. The SO and SI are<br />

included in the assembled representation of a character constant containing<br />

double-byte data.<br />

If a duplication factor is used, SI/SO pairs at the duplication points are not<br />

removed. For example, the statement:<br />

DBCS DC 3C''<br />

results in the assembled character string value of:<br />

<br />

Null double-byte data (SO followed immediately by SI) is acceptable and is<br />

assembled into the constant value.<br />

The following examples of character constants contain double-byte data:<br />

DBCS DC C''<br />

DBCS1 DC C''<br />

DBCS2 DC C'abc'<br />

DBCS3 DC C'abcdef'<br />

The length attribute includes the SO and SI. For example, the length attribute of<br />

DBCS is 2, and the length attribute of DBCS2 is 11. No truncation of double-byte<br />

character strings within C-type constants is allowed, since incorrect double-byte<br />

data would be created.<br />

| It is possible to generate invalid DBCS data in these situations:<br />

| You specify a bit-length modifier that causes truncation of the DBCS data or<br />

| the shift-out and shift-in characters.<br />

| You specify the TRANSLATE option.<br />

Graphic Constant—G<br />

When the DBCS assembler option is specified, the graphic (G-type) constant is<br />

supported. This constant type allows the assembly of pure double-byte data. The<br />

graphic constant differs from a character constant containing only double-byte data<br />

in that the SO and SI delimiting the start and end of double-byte data are not<br />

present in the assembled value of the graphic constant. Because SO and SI are<br />

not assembled, if a duplication factor is used, no redundant SI/SO characters are<br />

created. For example, the statement:<br />

DBCS DC 3G''<br />

Chapter 5. Assembler Instruction Statements 145

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

Saved successfully!

Ooh no, something went wrong!