Alignment of constants

The assembler aligns constants on different boundaries according to the following:
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:
  1. The automatic alignment of constants and areas does not occur if the NOALIGN assembler option has been specified.
  2. 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 1. Length attribute value of symbol naming constants

Type of
constant

Implicit
Length

Examples

Value of Length
Attribute¹

B as needed DC B'10010000' 1



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
8
16
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
QD
RD

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:
  1. Depends on whether an explicit length is specified in the constant.
Table 2. Alignment of constants
Type of constant

Implicit
Boundary
Alignment

Examples Boundary Alignment¹
B byte DC B'1011' byte
C byte DC C'Character string' byte
CU byte DC CU'Character string' byte
G byte DC G'<.D.B.C.S .S.T.R.I.N.G> byte
X byte DC X'20202021202020' byte
H halfword DC H'25' halfword
    DC HL3'25' byte
F fullword DC F'225' fullword
    DC FL7'225' byte
FD doubleword DC FD'225' doubleword
P byte DC P'2934' byte
Z byte DC Z'1235' byte
    DC ZL2'1235' byte
fullword DC E'1.25' fullword
    DC EL5'1.25' byte
D doubleword DC 8D'95'Yes doubleword
    DC 8DL7'95' byte
L doubleword DC L'2.57E65' doubleword
LQ quadword DC LQ'0.1' quadword
Y halfword DC Y(HERE) halfword
A fullword DC AL1(THERE) byte
AD doubleword DC AD(WHERE) doubleword
S halfword DC S(LABEL) halfword
    DC SL2(LABEL) byte
V fullword DC V(EXTERNAL) fullword
    DC VL3(EXTERNAL) byte
VD doubleword DC VD(BIGOTHER) doubleword
J fullword DC J(CLASS) fullword
JD doubleword DC JD(LARGECLASS) doubleword
Q fullword DC QL1(DUMMY) byte
QD doubleword DC QD(BIGDUMMY) doubleword
R fullword DC R(APSECT) fullword
RD doubleword DC RD(BPSECT) doubleword
Note:
  1. Depends on whether an explicit length is specified in the constant.