HLASM Language Reference

HLASM Language Reference HLASM Language Reference

faculty.cs.niu.edu
from faculty.cs.niu.edu More from this publisher
22.02.2015 Views

DC Instruction—Character Constant Figure 38 (Page 2 of 2). Binary Constants Subfield Value Example Result 5. Modifiers Implicit length: (length modifier not present) Alignment: As needed Byte Range for length: 1 to 256 (byte length) B DC B'111111' C DC B'11' L'B = 1 ▌1▐ L'C = 1 ▌1▐ Range for scale: Range for exponent: 6. Nominal value Represented by: Enclosed by: Exponent allowed: Number of values per operand: Padding: Truncation of assembled value: .1 to .2048 (bit length) Not allowed Not allowed Binary digits (0 or 1) Single quotation marks No Multiple With zeros at left At left Character Constant—C The character constant specifies character strings, such as error messages, identifiers, or other text, that the assembler converts into binary representations. If no type extension is provided, then the constant may be changed, depending on the value of the TRANSLATE option. If the type extension of “E” is provided, then the representation is also EBCDIC, but it cannot be changed by the TRANSLATE option. For information about type extension “A” see “ASCII data in character constants” on page 144, and for information about type extension “U” see “Unicode UTF-16 data from character constants” on page 144. Any of the 256 characters from the EBCDIC character set may be designated in a character constant. Each character specified in the nominal value subfield is assembled into one byte (see ▌1▐ in Figure 39 on page 143). A null nominal value is permitted if a length is specified. For example: DC CL3'' is assembled as three EBCDIC spaces with object code X'404040', whereas DC CAL3'' is assembled as three ASCII spaces with object code X'202020'. Multiple nominal values are not allowed because a comma in the nominal value is considered a valid character (see ▌2▐ in Figure 39) and is assembled into its binary 142 HLASM V1R5 Language Reference

DC Instruction—Character Constant (EBCDIC) representation (see Appendix D, “Standard Character Set Code Table” on page 421). For example: DC C'A,B' is assembled as A,B with object code X'C16BC2'. Give special consideration to representing single quotation marks and ampersands as characters. Each single quotation mark or ampersand you want as a character in the constant must be represented by a pair of single quotation marks or ampersands. Each pair of single quotation marks is assembled as one single quotation mark, and each pair of ampersands is assembled as one ampersand (see ▌3▐ in Figure 39). Figure 39 (Page 1 of 2). Character Constants Subfield Value Example Result 1. Duplication factor Allowed 2. Type C 3. Type Extension U A | C | 4. Program type Allowed 5. Modifiers Implicit length: (length modifier not present) Alignment: Evaluate as an even number, if Type Extension of U is specified Byte Range for length: 1 to 256 (byte length) Range for scale: Range for exponent: Must be a multiple of 2 when the Type Extension is U .1 to .2048 (bit length) (Not permitted if Type Extension of U is specified.) Not allowed Not allowed C DC CU'UNICODE' A DC CA'ASCII' E DC CE'EBCDIC' L'C = 14 L'C = 5 L'E = 5 C DC C'LENGTH' L'C = 6 ▌1▐ 6. Nominal value Represented by: Characters DC C'A''B' Object code X'C17DC2' ▌3▐ | (all 256 8-bit DC CU'AA' X'00410041' | combinations) DC CA'AB' X'4142' Enclosed by: Exponent allowed: Single quotation marks No (would be interpreted as character data) Chapter 5. Assembler Instruction Statements 143

DC Instruction—Character Constant<br />

(EBCDIC) representation (see Appendix D, “Standard Character Set Code Table”<br />

on page 421). For example:<br />

DC<br />

C'A,B'<br />

is assembled as A,B with object code X'C16BC2'.<br />

Give special consideration to representing single quotation marks and ampersands<br />

as characters. Each single quotation mark or ampersand you want as a character<br />

in the constant must be represented by a pair of single quotation marks or<br />

ampersands. Each pair of single quotation marks is assembled as one single<br />

quotation mark, and each pair of ampersands is assembled as one ampersand (see<br />

▌3▐ in Figure 39).<br />

Figure 39 (Page 1 of 2). Character Constants<br />

Subfield Value Example Result<br />

1. Duplication factor Allowed<br />

2. Type C<br />

3. Type Extension U<br />

A<br />

| C<br />

| 4. Program type Allowed<br />

5. Modifiers<br />

Implicit length:<br />

(length modifier<br />

not present)<br />

Alignment:<br />

Evaluate as an<br />

even number, if<br />

Type Extension of<br />

U is specified<br />

Byte<br />

Range for length: 1 to 256<br />

(byte length)<br />

Range for scale:<br />

Range for exponent:<br />

Must be a multiple<br />

of 2 when the<br />

Type Extension is U<br />

.1 to .2048<br />

(bit length)<br />

(Not permitted<br />

if Type Extension<br />

of U is specified.)<br />

Not allowed<br />

Not allowed<br />

C DC CU'UNICODE'<br />

A DC CA'ASCII'<br />

E DC CE'EBCDIC'<br />

L'C = 14<br />

L'C = 5<br />

L'E = 5<br />

C DC C'LENGTH' L'C = 6 ▌1▐<br />

6. Nominal value<br />

Represented by: Characters<br />

DC C'A''B'<br />

Object code<br />

X'C17DC2' ▌3▐<br />

| (all 256 8-bit DC CU'AA'<br />

X'00410041'<br />

| combinations) DC CA'AB'<br />

X'4142'<br />

Enclosed by:<br />

Exponent allowed:<br />

Single quotation<br />

marks<br />

No (would be<br />

interpreted as<br />

character data)<br />

Chapter 5. Assembler Instruction Statements 143

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

Saved successfully!

Ooh no, something went wrong!