'l"he exponent modifier affects each nominal value specified in the
operand, whereas the exponent written as part of the nominal value subfield
• algebraically added together before the nominal value is converted to constants) described and affected by the subfields that ~recede it.
It is this value that is assembled into the internal binary
representation of the constant.
The formats for specifying nominal values are described in the figure to the right.
DOS Only one nominal value is allowed in binary (B) and hexadecimal. (X)
constants.
How -nomiricil
,ialue-s
arespecTfied and interpreted by the asserobler is explained in the subsections that describe each individual constant, beginning at G3t.be separated by commas
\
\
\ \ - ---(Value~ value, ...• value)
Section G: Symbol and Data Definition 179
Page of GC33-4010-4 Revised Feb. 25,1975 By TNL: GN33-8193
G3C -- LITERAL CONSTANTS
Purpose
Literal constants allow you to define and refer to data directly in machine instruction operands.
You do not need to define a constant separately in another part of your source module. The difference between a literal, a data constant, and a self-defining term is described in CS.
Specifications
A literal constant is specified in the same way as the operand of a DC instruction. The general rules for the operand subfields of a DC instruction (as described in G3E
abov~ also apply tc the subfield of a literal constant. Moreover, the rules that apply to the
individual types of constants, as described in G3D through G3M, apply to literal constants.
However, literal ccnstants differ from DC operands in the fcllowing ways:
o ·
Literals must be preceded by an equal sign.• • Multiple operands are not allowed •
•
• 'Ihe duplicaticn factcr Ifiust not be zero.
•
L 3,=F'32'
G3C EINARY CONS!AN! {El
Fur~cse
The tinary constant allcws ycu tc sfecify the ~recise bit
~attern ycu want assembled into storage.
Specificaticns
The ccnstants of the subfields defining a binary ccnstant are described in the figure telow.
O
NOTE: Each binary ccnstant is asserrbled into the inteqral number of bytes required to contain the tits s~ecified.Binary Constants
Subfield 3. Constant Type
Binary (B) 1. Duplication Factor Yes
2. Modifiers As needed
Implicit Length: (Length Modifier not present)
B DC B'lOlOllll' L'B C DC B'lOl' L'C
Alignment:
(length Modifier not present) Byte
Range for Length: 1 through 256 (byte length) .1 through .2048 (bit length)
Range for Scale: Not allowed Range for Exponent: Not allowed
4. Nominal Value Binary digits (0 or 1) Represented by:
Enclosed by:
Exponent allowed:
Number of Values per Operand:
Padding:
Truncation of Assembled Value:
Apostrophes
No
Multiple
With zeros at left
At left
section G: Symbol and Data Definition 181
G3E -- CHARAC!ER CONS!AN! (C)
The ctaracter constant allows you tc sfecify character strings such as error messages, identifiers, or cther text, that the asserrbler will convert into their tinary (EECtIC) representation.
Specificaticns
!he ccntents of the sutfields defining a ctaracter ccr.stant are descrited in the figure en the CfPcsite fage.
~ Each character specified in the ncrrinal value subfield is assembled into one tyte.
Multiple norrinal values are not allcwed, because if a comma is specified in the nominal value sutfield, the asserrtler
~considers the comma a valid character and therefore asserrtles it intc its tinary (EBCDIC) representation.
NOTE: When apostrophes or ampersands are to be included in the asserrbled ccnstant, doutle apostrophes or dcutle
•
ampersands rrust te Sfecified. !hey are asserrbled as single apostrophes and ampersands.
Subfield
1. Duplication Factor allowed 2. Modifiers
I mplicit Length: (Length Modifier not present)
Character Constants 3. Constant Type
Character (C)
Yes
As needed
C DC C'LENGTH ' J.J T I,... ~ 6
o
Alignment: Byte
(length Modifier not '<;t)
present) Range for length:
Range for Scale:
Range for Exponent:
4. Nominal Value Represented by:
Enclosed by:
Exponent allowed:
Number of values per Operand:
Padding:
Truncation of Assembled value:
1 through 256 (byte length) .1 through .2048 (bit length)
Not allowed
Not allowed
Characters (All 256 8-bit combinations)
Apost rophes No
One
With blanks at right (X 140 I)
At right
DC C'A' 'B'
Assembled AlB A&B DC C'A&&B '
DC C'A,B '
Object Code (hex).
I
cll6BI c21Section G: Symbol and Data Definition 183
G3F -- HEXArECIMAI CCN5lA~l (X)
Fur~ese
You can use hexadecirral ccnstants to generate large bit
~atterns rrore conveniently than ~ith binary constants.
Also, the hexadecimal values you specify in a seurce rrcdule allow yeu te corr~are therr directly ~ith the hexadecimal values generated for the otject code and address lecaticns printed in the ~rcgrarr listing.
Specificaticns
lhe centents cf the subfields defining a hexadecirral constant are described in the figure on the c~pesite fage.
~
Each hexadecimal digit specified in the norrinal value•
subfield is asserrl::led intc feur bits (their binary ~a tterns can be found in C4E) • lhe implicit length in bytes cf a hexadecimal ccnstant is then half the nurrber of hexadecimal
•
digits specified (assuming that a hexadecirral zerc is added to an odd nurrter cf digits).
Subfield
1.D.!-Iplication Factor allowed 2.~
Implicit Length: (Length
!\~cdifier not present)
Alignment:
(Length Modifier not present) Range for Length:
Range for Scale:
Range for Exponent:
4. Nominal Value Represented by:
Enclosed by:
Exponent allowed:
Number of Values per Operand:
Padding:
Truncation of Assembled value:
x
Hexadecimal Constants 3. Constant Type
Hexadecimal (X) Yes
I
"
As neededX DC X'FFOOA2' Y DC X1POOA2'
Byte
1 through 256 (byte length)
I
.1 through .2048 (bit length)1 Not allowedNot allowed I
Hexadecimal digits (0 through 9 and A through F)
Apostrophes
I No
Multiple
With zeros at left
I
At left
L'X L'Y
DC DC
X'lF'
.. ,. ····6bi~~"~~~t.(hex)
i 10001111111 X ' 91P' 10000 100110001111111 .• ••.. 14-1 byte~1
Section G: Symbol and Data Definition 185
G3G -- FIXEr-FOINT CCNSTANTS (B ANr F)
Purpose
Fixed-point constants allow you to introduce data that is in a forrr suitatle fcr the cperaticns of the fixed-point rr-achine instructions of the standard instruction set.
The ccnstanots you define can alsc be autcmatically aligned to the proper fullword or halfword toundary for tte
instructions that refer tc addresses on these boundaries (unless the NCALGN option has teen specified; see (2) •
You can perform algetraic functicns using this type of constant because they can have positive or negative values.
Specificaticns
The contents cf the sutfields defining fixed-point constants are described in the figure on the oPPosite page.
~
The nominal value can te a signed (fluS is assumed if the•
number is unsigned) integer, fraction, or rrixed number.
follc~ed by an exponent (positive or negative). The
~ exponent must lie within the perrrissitle range. If an
~ exponent rrcdifier (see G3E) is alsc specified, the algetraic
§YE cf the exponent and the exponent modifier rrust liE • within the perrrissitle range.
Subfield
1. Duplication Factor Allowed 2. Modifiers
! mp lie it Length: (Length Modifier not present)
Alignment:
(Length Modifer not present)
Range for Length:
Range for Scale:
Range for Exponent:
4. Nominal Value
Decimal digits (0 through 9) Decimal digits (0 through 9)
DC F'-200'
With zeros at left Not allowed
Some examples of the range of values that can be assembled into fixed-point constants are given in the figure to the right.
Length Range of Values that
•
can be AssembledThe range of values depends on the _ implicitly or explicitly specified length (if scaling is disregarded) • feature rnacbine instructicns. ~he packed decimal constants
(p-tyfe) are used fer processing by the decinal instructicn set. The zcned decinal ccnstants (Z-type) are in the form
~BCrIC representation) that you can use as a print inage (except the digits in the rightmost byte).
Specificaticns
The contents cf the subfields defining decimal constants are described in the figure on the opposite page.