General information about constants
Constants defined by the DC instruction are assembled into an object
module at the location at which the instruction is specified. However,
the type of constant being defined, and the presence or absence of a
length modifier, determines whether the constant is to be aligned on a
particular storage boundary or not (see Alignment of constants).
Symbolic Addresses of Constants: The
value of the symbol that names the DC instruction is the address
of the first byte (after alignment) of the first or only constant.
Length attribute value of symbols naming constants
The length attribute value assigned to the symbols in the name
field of the constants is equal to:
- The implicit length (see "Implicit Length" in
Table 17) of the
constant when no explicit length is specified in the
operand of the constant, or
- The explicit length (see "Value of Length Attribute" in
Table 17) of the constant.
If more than one operand is present, the length attribute value of
the symbol is the length in bytes of the first constant specified,
according to its implicit or explicit length.
Alignment of constants
The assembler aligns constants on different boundaries according
to the following:
- On boundaries implicit to the type of constant (see "Implicit
Boundary Alignment" in Table 18) when no length
is specified.
- On byte boundaries (see "Boundary Alignment" in
Table 18) when an explicit length is specified.
Bytes that are skipped to align a constant at the correct boundary are
not considered part of the constant. They are filled with
binary
zeros.
Notes:
- The automatic alignment of constants and areas does not occur if the
NOALIGN assembler option has been specified.
- Alignment can be forced to any boundary by a preceding DS or DC
instruction with a zero duplication factor. This occurs whether or not
the ALIGN option is set.
Table 17. Length attribute value of symbol naming constants
Type of
constant |
Implicit
Length |
Examples |
Value of Length Attribute1 |
| B |
as needed |
DC B'10010000' |
1 |
C
CU |
as needed
as needed |
DC C'ABC'
DC CL8'WOW'
DC CU'ABC'
DC CUL4'XX' |
3
8
6
4 |
| G |
as needed |
DC G'<DaDb>'
DC GL8'<DaDb>' |
4
8 |
| X |
as needed |
DC X'COFFEE'
DC XL2'FFEE' |
3
2 |
H
F
FD |
2
4
8 |
DC H'32'
DC FL3'32'
DC FD'32' |
2
3
8 |
P
Z |
as needed
as needed |
DC P'123'
DC PL4'123'
DC Z'123'
DC ZL10'123' |
2
4
3
10 |
E
D
L
LQ |
4
816
16 |
DC E'565.40'
DC DL6'565.40'
DC LL12'565.40'
DC LQ'565.40' |
4
6
12
16 |
Y
A
AD |
2
4
8 |
DC Y(HERE)
DC AL1(THERE)
DC AD(WHERE) |
2
1
8 |
S
V
VD
J
JD
Q
QDRD |
2
4
8
4
4
8
4
8 |
DC S(THERE)
DC VL3(OTHER)
DC VD(BIGOTHER)
DC J(CLASS)
DC JD(LARGECLASS)
DC QL1(LITTLE)
DC QD(BIGLITTLE)
DC R(APSECT)
DC RD(BPSECT) |
2
3
8
4
8
1
8
4
8 |
|
Note:
- Depends on whether or not an explicit length
is specified in the constant.
|
Table 18. Alignment of constants
| Type of constant |
Implicit Boundary Alignment |
Examples |
Boundary Alignment1 |
| B |
byte |
DC B'1011' |
byte |
C
CU |
byte
byte |
DC C'Character string'
DC CU'Character string' |
byte
byte |
| G |
byte |
DC G'<.D.B.C.S .S.T.R.I.N.G> |
byte |
| X |
byte |
DC X'20202021202020' |
byte |
H
F
FD |
halfword
fullword
doubleword |
DC H'25'
DC HL3'25'
DC F'225'
DC FL7'225'
DC FD'225' |
halfword
byte
fullword
byte
doubleword |
P
Z |
byte
byte |
DC P'2934'
DC Z'1235'
DC ZL2'1235' |
byte
byte
byte |
E
D
L
LQ |
fullword
doubleword
doubleword
quadword |
DC E'1.25'
DC EL5'1.25'
DC 8D'95'
DC 8DL7'95'
DC L'2.57E65'
DC LQ'0.1' |
fullword
byte
doubleword
byte
doubleword
quadword
|
|
Y
A
AD
S
V
VD
J
JD
Q
QD
R
RD
|
halfword
fullword
doubleword
halfword
fullword
doubleword
fullword
doubleword
fullword
doubleword
fullword
doubleword
|
DC Y(HERE)
DC AL1(THERE)
DC AD(WHERE)
DC S(LABEL)
DC SL2(LABEL)
DC V(EXTERNAL)
DC VL3(EXTERNAL)
DC VD(BIGOTHER)
DC J(CLASS)
DC JD(LARGECLASS)
DC QL1(DUMMY)
DC QD(BIGDUMMY)
DC R(APSECT)
DC RD(BPSECT) |
halfword
byte
doubleword
halfword
byte
fullword
byte
doubleword
fullword
doubleword
byte
doubleword
fullword
doubleword
|
|
Note:
- Depends on whether or not an explicit length is
specified in the constant.
|
[ Top of Page | Previous Page | Next Page | Contents | Index ]