GC33 4010 5_OS_VS_DOS_VSE_VM_370_Assembler_Language_Dec81 5 OS VS DOS VSE VM 370 Assembler Language Dec81

GC33-4010-5_OS_VS_DOS_VSE_VM_370_Assembler_Language_Dec81 GC33-4010-5_OS_VS_DOS_VSE_VM_370_Assembler_Language_Dec81

User Manual: GC33-4010-5_OS_VS_DOS_VSE_VM_370_Assembler_Language_Dec81

Open the PDF directly: View PDF PDF.
Page Count: 470

DownloadGC33-4010-5_OS_VS_DOS_VSE_VM_370_Assembler_Language_Dec81 GC33-4010-5 OS VS DOS VSE VM 370 Assembler Language Dec81
Open PDF In BrowserView PDF
G C33-40 10-5
File No. S370-21

Systems

OS/VS - DOS/VSE - VM/370
Assembler Language

------ -------------_.- -----

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

Sixth Edition (March 1979)
This edition, as amended by technical newsletter GN20-9372, applies to Release 4
of OSjVSI, Release 3 of OSjVS2, Release 2 of VMj370, DOSjVSE, and to any
subsequent releases until otherwise indicated in new editions or technical
newsletters.
Changes are periodically made to the information herein; before using this
publication in connection with the operation of IBM systems, consult the latest
IBM System/370 and 4300 Processors Bibliography, GC20-0001, for the editions
that are applicable and current.
It is possible that this material may contain reference to, or information about, IBM
products (machines and programs), programming, or services that are not
announced in your country. Such references or information must not be construed
to mean that IBM intends to announce such IBM products, programming, or
services in your country.
Publications are not stocked at the address given below; requests for IBM
publications should be made to your IBM representative or to the IBM branch
office serving your locality.
A form for reader's comments is provided at the back of this publication. If the
form has been removed, comments may be addressed to IBM Corporation, P.O. Box
50020, Programming Publishing, San Jose, California, U.S.A. 95150. IBM may use
or distribute any of the information you supply in any way it believes appropriate
without incurring any obligation whatever. You may, of course, continue to use the
information you supply.
© Copyright International Business Machines Corporation 1972, 1979

Read This First

This manual describes the OSjVS - DOSjVSE - VM/370 assembler
language.
rhe OS/VS - VM/370 assembler language offers the following improvements
Jver the OS/360 assembler language as processed by the F assembler:
1.

New instructions and functions

2.

Relaxation of language restrictions on character string lengths,
attribute usage, SET symbol dimensions, and on the number of entries
allowed in the External Symbol Dictionary

3.

New system variable symbols

~.

New options: for example, for the printing of statements in the
program listings or for the alignment of constants and areas.

rhe figure on the following pages lists in detail these assembler
language improvements and indicates the sections in the manual where the
instructions and functions incorporating these improvements are
described.
If you are already familiar with the OS/360 assembler
language as processed by the F assembler, you need only read those
sections. Also included in the figure on the following pages are the
improvements of the DOSjVS assembler language over the DOS/360 assembler
language as processed by the D assembler.
~OTE: Sections I through L, describing the macro facility and the
conditional assembly language, have been expanded to include more
examples and detailed descriptions.
~ote

for VM/370 Users

rhe services provided by the OS Linkage Editor and Loader programs are
paralleled in VM/370 by those provided by the eMS Loader.
Therefore,
for any reference in this publication to those OS programs, you may
assume that the eMS Loader performs the same function.
Certain shaded notes in this publication refer to "OS only" information.
Nhere you see these notes you may assume the information also applies
for VM/370 users.
Note for DOS/VSE Users
All references to DOS and DOS/VS are also applicable to DOS/VSE.

iii

COMPARISON OF ASSEMBLERS
Assemblers

Language Feature
00S/360 (0)

OS/VS·
VM/370

Described in

1.

No of continuation lines allowed in
one statement

1

2

2

2

B1B

2.

Location Counter'value printed for
EQU, USING~ ORG (in ADDR2 field)

3 bytes

3 bytes

3 bytes

4 bytes
(up to 3
leading zeros
suppressed)

C4B

3.

Self·Defining Terms
maximum value:

224.1

224·1

224.1

2 31 .1

number of digits
binary:
decimal:
hexadecimal:
character:
4.

Relocatable and Absolute Expressions
unary operators allowed:
value carried:
number of operators:
levels of parentheses:

24

24

24

8

8

8

32
10

6
3

6
3

6
3

4

no
truncated to
24 bits
15
5

yes
truncated to
24 bits
15
5

no
truncated to
24 bits
15
5

yes
31 bits

ALIGN/
NOALIGN
option not
allowed

constants
not aligned

constants
aligned

constants
not aligned

C4E

8
C6B

19
6

5.

Alignment of Constants
(with no length modifier) when
NOALIGN option specified:

6.

Extended Branching Mnemonics
for R R format instructions:

no

yes

no

yes

COPY Instruction
nesting depth allowed:
macro definitions copied:

none
no

3
yes

none
no

5
yes

no

no

no

yes

El

no

yes

no

no

E2C

255

511

255

399
(including
entry symbols
identified by
ENTRY)

7.

8.

02

D1H

, E1A

END Instruction
generated or copied END
instructions:

I

OOS/VSE

OS/360 (F)

9.

All control sections initiated by a
CSECT start at location 0 in listing
and object deck

10.

External Symbol Dictionary Entries
maximum allowed:

E2G

"

11.

DSECT Instruction blank name entry:

no

yes

no

yes

E3C

12.

DROP Instruction
blank operand entry:

not allowed

signifies all
current base
registers
dropped

not allowed

signifies all
current base:
registers
dropped

F1B

13.

EQU Instruction
second operand as length attribute:
third operand as type attribute:

no
no

no
no

no
no

yes
yes

one

multiple

multiple

mUltiple

14.

DC/OS Instruction;
number of operands:

G2A

iv

G3B

COMPARISON OF ASSEMBLERS
Assemblers

Language Feature
DOS/360 (D)

OOS/VSE
yes

no

OS/360 (F)

OS/VS VM/370

yes

yes

Described in

G3B

15.

Bit-length specification allowed:

16.

Literal Constants
multiterm expression for
duplication factor:
length, scale, and
exponent modifier:
Q. or S-type address constant:

no

yes

no

yes

no
no

yes
no

no
no

yes
yes

Binary and Hexadecimal Constants
number of nominal values:

one

one

one

multiple

G3D
G3F

18.

a-type address constant allowed:

no

no

yes

yes

G3M

19.

ORG Instruction
name entry allowed:

sequence symbol
or blank

sequence symbol
or blank

sequence symbol
or blank

any symbol
or blank

H1A

20.

Literal cross-reference:

no

yes

no

yes

H1B

21.

CNOP Instruction
symbol as name entry:

sequence symbol
or blank

sequence symbol
or blank

only sequence
symbol or blank

any symbol
or blank

H1C

22.

PRINT Instruction
inside macro definition:

no

yes

no

yes

H3A

17.

G3C

H3B

TITLE Instruction
number of characters in name
(if not a sequence symbol):

4

4

4

8

24.

OPSYN Instruction:

no

no

yes

yes

25.

PUSH and POP Instructions
for saving PRINT and USING status:

no

no

no

yes

Symbolic Parameters and
Macro Instruction Operands
maximum number:

100

200

200

no fixed
maximum

J2C
K1B

all positional
parameters
or operands
must come
first

all positional
parameters
or operands
must come
first

all positional
parameters
or operands
must come
first

keyword parameters or operands
can be interspersed among
positional param
eters or operands

J3C
K3C

Generated op-codes START, CSECT,
DSECT, COM allowed

no

yes

no

yes

Generated Remarks due to generated
blanks in operand field:

no

no

no

yes

MNOTE Instruction
in open code:

no

no

no

yes

System Variable Symbols
&SYSPARM:
&SYSDATE:
&SYSTIME:

yes
no
no

yes
no
no

no
no
no

yes
yes
yes

Maximum number of characters in
macro instruction operand:

127

255

255

255

no

no

no

yes

no

no

no

yes

23.

26.

mixing positional and keyword:

27.
28.

29.

30.

31.

32.

Type and Count Attribute of
SET symbols:
&SYSPARM, &SYSNDX,
&SYSECT, &SYSDATE, &SYSTIME:

H5A
H6

J4B
J4B

J5D

J7

K5

L1B

v

COMPARISON OF ASSEMBLERS
I

Assemblers

Language Feature

33.

34.

35.

36.

OS/360 (F)

OS/VS VM/370

no, global must
precede local

no, global must
precede local

yes

yes

yes

yes

no

yes

yes

yes

no

255

4095

2500

32,767

no

no

no

yes

8

255

8

255

DOS/360 (D)

DOS/VSE

no, global must
precede local

global and local must immediately follow prototype statement, if in macro definition:
must immediately foliow any source
macro definitions, if in open code:

SET Symbol Declaration
global and local mixed:

Subscripted SET Symbols
maximum dimension:
SETC Instruction
duplication factor in operand:
maximum number of characters
assigned
Arithmetic Expressions
in conditional assembly
unary operators allowed:
number of terms:
levels of parentheses:

37.

ACTR Instruction allowed anywhere
in open code and inside macro
definitions:

38.

Options for Assembler Program
ALIGN
ALOGIC
MCALL
EDECK

MLOGIC
L1BMAC

Described in

L2

L2

L3B

L4A
no
16
5

yes
16
5

no
16
5

yes
up to 25
up to 11

no, only immediately after global
and local SET
symbol
declarations

yes

no, only immediately after global
and local SET
symbol
declarations

yes

no
no
no
no

yes
no
no
yes

yes
no
no
no

yes
yes
yes
no

no
no

no
no

no
no

yes
yes

vi

L6C

D2
L8
J8B
Order No.
GC33·4024
L8
J8A

Page of GC33-4010-S
As Updated 28 Dec 1981
By TNL GN20-9372

Preface

This is a reference manual for the OS/VS - DOS/VSE - VM/370 assembler
language.
It will enable you to answer specific questions about
language functions and specifications. In many cases it also provides
information about the purpose of the instruction you refer to, as well
as examples of it's use.
The manual is not intended as a text for learning the assembler language.

Who This Manual Is For
'I'his manual is for programmers coding in the OS/VS - VM/370 or DOS/VSE
assembler language.

Major Topics
This manual is divided into four main parts
"Introduction" and the Appendixes) :

(aside from the

PART I (Sections B and C) describes the coding rules for, and the
structure of, the assembler language.
PART II (Section D) describes the machine instruction types and their
formats.
PART III (Sections E through H) describes the assembler instructions.
PART IV . (Sections I through L) describes the macro facility and the
conditional assembly language.

How To Use This Manual
Since this is a reference manual, you should use the Index or the Table
of Contents to find the subject you are interested in.
Complete specifications are given for each instruction or feature of the
assembler language (except for the machine instructions, which are
documented in Principles of Operation -- see "References You May Need") .
In many cases, a "Purpose" section suggests why you might use the
feature; a "Specifications" section explains use of a complex feature;
and one or more figures give examples of coding an instruction.
If you are a present user of the OS Assembler F or the DOS Assembler D,
you need only read those sections listed in the table preceding this
"Preface" which indicates those language features that are different
from the DOS or OS System/360 languages.

vii

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

TABS: Tabs mark the beginning ·of the specifications portion of the
language descriptions.
Use the tabs for quick referencing.
o

USING

Tab -

OS-DOS DIFFERENCES: Wherever the OSjVS and DOSjVS assembler languages
differ, the specifications that apply only to one assembler or the'other
are so marked. The ·os only' markings also apply for the VM/370
assembler.

KEYS: The majority of figures are placed to the right of the text that
describes them.
Numbered keys within a figure are duplicated to the
left of the text describing the figure.
Use the numbered keys to tie
the underlined passages in the text to specific parts of the figure.
Key-

•

GLOSSARY: The glossary at the back of the manual contains terms that
apply to assembler programming specifically and to allied terms in data
processing in general.
You can use the Glossary for terms that are
unfamiliar to you.
IBM is grateful to the American National Standards Institute (ANSI) for
permission to reprint its definitions from the American National
Standard Vocabulary for Information Processing, which was prepared by
Subcommittee X3.S on Terminology and Glossary of American National
Standards Committee X3.

References You May Need
You may want to refer to
I1311 System/370 Principles of Operation, GA22-7000, or IBH 4300
Processors Principles of Operation for ECPS:VSE Mode, GA22-7070, the
definitive pUblications for machine instructions, and to
OS/VS - VM/370 Assembler Programmer's Guide, GC33-4021
for detailed information about the OS/VS - VM/370 Assembler.
Guide to the DOS/VSE Assembler, GC33-4024
for detailed information about the DOS/VSE Assembler.

viii

Contents

SECTION A: INTRODUCTION •
A1

A2

A3

A4

C4C

Symbol Length Attribute
Reference • • • • • • •
C4D
Other Attribute References.
Self-Defining Terms • • • • •
C4E
C5 -- LITERALS • • • • • • • • • • • •
C6 -- EXPRESSIONS • • • • • • • • • • •
C6A -- Purpose • • • • • • • • • • •
C6B -- Specifications • • • • •
Absolute and Relocatable
Expressions • • • • • • • • • •
Absolute Expressions • • • • • •
Relocatable Expressions • • • •
Rules for Coding Expressions • •
Evaluation of Expressions •

1

WHAT THE ASSEMBLER DOES • • • •
-- THE ASSEMBLER LANGUAGE • • • • •
Machine Instructions •
Assembler Instructions • • • • •
Macro Instructions • • •
THE ASSEMBLER PROGRAM • • • • • •
A2A -- Assembler processing Sequence
Machine Instruction processing.
Assembler Instruction processing
Macro Instruction processing • •
-- RELATIONSHIP OF ASSEMBLER TO
OPERATING SYSTEM • • • • • • • •
Services Provided by the
Operating System • • • ~ •
-- CODING AIDS • • • • • • • •
Symbolic Representation of
Program Elements • • • • • • • •
Variety of Data Representation •
Controlling Address Assignment •
Relocatability • • • • • • • • •
Segmenting a program • • • • • •
'Linkage Between Source Modules.
Program Listings • • • • • • • •

PART I: CODING AND STRUCTURE • • • • •

1
2
2
3
3
3
4
5
5
8
9

CODING SPECIFICATIONS
Field Boundaries
The Statement Field
The Identification-Sequence
Field
· ~
·
The Continuation Indicator
Field
Field Positions
B1B
Continuation Lines
B1C
Comments Statement Format
B1D
Instruction Statement Format
Fixed Format
Free Format
Formatting Specifications
B1A

--

-----

...·
...·

·
··
····
···

·····
··
·····
. · .· · · · · · ·
··

.· .· .· .· .· .·.·· · · ···
···

PART II: FUNCTIONS AND CODING OF
MACHINE INSTRUCTIONS • • • • •

61

10
10
10
11
11
11
11

SECTION D: MACHINE INSTRUCTIONS •

• 63

D1 -- FUNCTIONS • • • • • • • • •
•
D1A -- Fixed-Point Arithmetic • • •
Operations Performed • • • • • •
Data Constants Used • •
D1B -- Decimal Arithmetic • • • • •
Operations Performed • • • • •
Data Constants Used • • • • • •
D1C -- Floating-Point Arithmetic • •
Operations Performed • • • • • •
Data Constants Used • • • • • •
D1D -- Logical Operations • • • • •
Operations Performed
•
D1E -- Branching • • • • • • • • • •
Operations Performed • • • • • •
D1F -- Status switching • • '. • • •
Operations Performed • • • • • •
D1G -- Input/Output • • • • • • • •
Operations Performed • • • • • •
D1H -- Branching with Extended
Mnemonic Codes • • • • • • •
D1I -- Relocation Handling • • •
ALIGNMENT • • • • • • • • • • • •
D2
STATEMENT FORMATS • • • • • • • •
D3
MNEMONIC OPERATION CODES • • • •
D4
OPERAND ENTRIES • • • •
D5
General Specifications for
Coding Operand Entries
•
D5A -- Registers • • • • •
Purpose and Usage • • • • • • •
Specifications • • • • • • • • •
D5B -- Addresses • • • • • • • • • •
purpose and Definition • • • • •
Relocatability of Addresses • •
Specifications •
• • • • •
Implicit Address • ~ •
•
Explicit Address • •
•
D5C -- Lengths • • • • •
•
D5D -~ Immediate Data • • • • •
D6
EXAMPLES OF COCEC MACHINE
INSTRUCTIONS • • • • • •
RR Format •
RX Format • • • • • • • • • • •

13

16
16
16
17
17
17
18
19
20
20
20
21

SECTION C: ASSEMBLER LANGUAGE STRUCTURE 25
C1 -- THE SOURCE MOCULE • • • • • • • •
C2 -- INSTRUCTION STATEMENTS. • • • •
C2A -- Machine Instructions • • • •
C2B -- Assembler Instructions • • •
Ordinary Assembler Instructions
Conditional Assembly
Instructions • • • • • • • • • •
C2C -- Macro Instructions • • • • •
C3 -- CHARACTER SET •
•
C4 -- TERMS • • • • • • • • • • • • • •
C4A -- Symbols • • • • • • • • • • •
Symbol Definition • • • • • • •
Restrictions on Symbols • • • •
C4B -- Location Counter Reference.

56
57
58
59
60

9
10

SECTION B: CODING CONVENTIONS • • • • • 15
Standard Assembler Coding Form. 15
B1

44
46
46
50
53
53
55

26
26
29
30
30
32
33
34
36
36
38
40
41
ix

63
64
64
64
65
65
65
66
66
66
67
67
68
68
69
69
71
71
72
74
75
78
79
80
80
82
82
82
84
84
85
86
87
87
88
90
92
92
93

RS Format • • • • • • • • • • • 94
SI Format • • • • • • • . ' . • • 95
S Format • • • • • • • • • • • • 96
SS Format • • • • • • • •
97
PART III: FUNCTIONS OF ASSEMBLER
INSTRUCTIONS • • • • • • • • • •
SECTION E:

PROGRAM SECTIONING •

F2

99
• 101

SECTION G: SYMBOL

E1 -- THE SOURCE MODULE • • • • •
102
The Beginning of a Source
Module • • • • • • • • • •
102
The End of a Source Module • • 102
E1A -- The COpy Instruction • • • • 103
E1B -- The END Instruction • • • • 105
E2 -- GENERAL INFORMATION ABOUT CONTROL
SECTIONS • • • • • • • • • • • • 107
E2A -- At Different processing
Times • • • • • • • • • • • 108
E2E -- Types • • • • • • • • • • • 110
Executable Control Sections • • 110
Reference Control Sections..
110
E2C
Location Counter Setting • • 111
E2D - T First Control Section. • •
113
E2E
The Unnamed Control Section 115
E2F
Literal pools in Control
Sections • • • • • • • • • • 115
E2G
External Symbol Dictionary
Entries. • • • • • • • • • 116
E3 -- DEFINING A CONTROL SECTION • • • 117'
E3A
The START Instruction.
117
E3B -- The CSECT Instruction.
119
E3C -- The DSECT Instruction •
121
How to Use a Dummy Control
Section • • • • • • • • • • • • 121
Specifications • • • • • • • •
122
E3D -- The COM Instruction • • ••
124
How to Use a Common Control
Section • • • • • • • • • • • • 124
Specifications • • • • • • ••
125
E4 -- EXTERNAL DUMMY SECTIONS • • • •
127
Generating an External Dummy
Section ., • • • • • • • • • • • 127
How to Use External Dummy
Sections • • • • • • • • •
128
E5
DEFINING AN EXTERNAL DUMMY
SECTION
••••••
130
E5A
The DXD Instruction • • ••
130
E5B -- The CXD Instruction
131
SECTION F:

F1B -- The DROP Instruction • • • • 144
ADDRESSING BETWEEN SOURCE MODULES:
SYMBOLIC LINKAGE • • • • •
• 147
How to Establish Symbolic
Linkage • • • • • • • • •
147
F2A
The ENTRY Instruction •
150
F2B
The EXTRN Instruction • • • 151
F2C _. The WXTRN Instruction • • •
152
~ND

DATA DEFINITION

153

G1 -- ESTABLISHING SYMBOLIC
REPRESENTATION • • • • • • • • • 153
Assigning Values • • • • • • . ' 154
Defining and Naming Data • • • 154
G2
DEFINING SYMBOLS • • • • • • • • 155
G2A -- The EQU Instruction • • ~. 155
G3 -- DEFINING DATA • • • • • • • • •
161
The DC Instruction • • • • • 162
G3A
G3B -- General Specifications for
Constants • • • • • • • • • 163
Rules for the DC Operand • • •
164
Information about Constants • • 165
Padding and Truncation
of Values • • • • • • • • • • • 167
Subfield 1:· Duplication Factor 168
Subf ie ld 2: Type • • • • • • • 169
Subfield 3: Modifiers • • • • • 170
Subfield 4: Nominal Value • • • 179
Literal Constants • • • • •
180
G3C
Binary Constant (B) • • • • 181
G3D
Character Constant (C).
182
G3E
Hexadecimal Constant (X) • • 184
G3F
Fixed-Point Constants
G3G
(H and F) • • • • • r • • • • 186
Decimal Constants (P and Z)
188
G3H
Floating-point Constants
G31
(E, D and L) • • • • • • • • 190
The A-Type and Y-Type Address
G3J
Constants • • • • • • • • •
194
The S~Type Address Constant 196
G3K
The V~Type·Address Constant 198
G3L
The.Q-Type Address Constant 200
G3M
The OS Instruction • • • • • 201
G3N
How to Use the rs Instruction • 201
Specifications • • • • • • • • 206
G30 -- The CCW Instruction • • • • 209
SECTION H: CONTROLLING THE ASSEMBLER
PROGRAM • • • • • . ' . • • • • •

ADDRESSING • • • • • • • • 133

H1 -- STRUCTURING A PROGRAM •
H1A -- The ORG Instruction •
H1B -- The LTORG Instruction •
The Literal Pool'. • • •
Addressing Considerations • • •
Duplicate Literals • • • • • •
Specifications • • • • • .;. •
H1C -- The CNOP Instruction • • • •
H2 -~ OETERMINING.STATEMENT FORMAT'AND
SEQUENCE • • • • • • • • • •
H2A -- The ICTL Instruction • • • •
H2B -- The ISEQ Instruction • • • •
H3 -- LISTING FORMAT AND OUTPUT. •
H3A -- The PRINT Instruction • • •

F1 -- ADDRESSING WITHIN SOURCE MODULES:
ESTABLISHING ADDRESSABILITY ••
133
How to Establish Addressability 134
F1A -- The USING Instruction • ••
134
The Range of a USING
Instruction • • • • . • • • • • 135
The Domain of a USING
Instruction • • • • • • • • • • 135
How to Use the USING
Instruction • • • • •
137
Specifications for the USING
Instruction • • • • • '. • • •
141

x

211
211
212
214
215
216.
217
217
218
219
219
221
222
222

Pagc of GC33-40 lO-5
As Upda tcd 28 lke 1981
By TN!. GN20-9372

H3B
The TITLE Instruction
H3C
The EJECT Instruction
H3D
The SPACE Instruction
H4 -- PUNCHING OUTPUT CARDS • • •
H4A -- The PUNCH Instruction •
H4B -- The REPRO Instruction.
H5 -- REDEFINING SYMBOLIC OPERATION
CODES • . • • • • • • • • • • •
H5A -- The OPSYN Instruction • • •
H6 -- SAVING AND RESTORING PROGRAMMING
ENVIRONMENTS • • • • • • • • • •
H6A
The PUSH Instruction • • • •
H6B
The POP Instruction • • ••
H6C -- Combining PUSH and POP • • •

234
234
234
235

PART IV: THE MACRO FACILITY • • • • •

237

SECTION I:

224
227
228
228
228
231
232
232

INTRODUCING MACROS • • • • 239

Using Macros • • • • • • • • • 240
The Basic Macro Concept • • • • 243
Defining a Macro • • • • • •• 245
Calling a Macro • • • • • • • • 246
The Contents of a Macro
Definition • • . • • • • •
248
The Conditional Assembly
Language
• • • • •
250
SECTION J:

THE MACRO DEFINITION

• 251

J1 -- USING A MACRO CEFINITION •
• 251
J1A -- Purpose. • • • • • • • • • 251
J1B -- Specifications
• 252
Wher~ to Define a Macro in a
Source Module
• 252
Open Code . . • .
• 252
The Format of a Macro
Definition. • • • • • • • • • 253
PARTS OF A MACRO DEFINITION • • 254
J2
J2A
The Macro Definition Header 254
J2B
The Macro Definition Trailer 254
J2C
The Macro Prototype Statement:
Coding • • • • • • • • • • • 255
Alternate Ways of Coding the
Prototype Statement • • • • • • 256
J2D -- The Macro Prototype Statement:
Entries • • • • • • • • • • 256
The Name Entry • • • • • • •• 256
The Operation Entry • • •
257
The Operand Entry • . • .
. 258
J2E -- The Body of a Macro
Definition • • • • • •
• 259
SYMBOLIC PARAMETERS • • • • • • 260
J3
General Specifications • • • • 260
subscripted Symbolic Parameters 261
J3A
positional Parameters • • • 262
J3B -- Keyword Parameters • •
• 263
J3C -- Combining positional
and Keyword Parameters
265
J4 -- MODEL STATEMENTS • • • • •
• 266
J4A -- purpose • • • • • • • • • • 266
J4B -- Specifications • • • • • • • 266
266
Format of Model Statements
Variable Symbols as Points of
Substitution • • • • • • • • • 267
Rules for Concatenation • • • • 268
Rules for Model Statement
Fields • • • • • • • • • • • • 269

J5 -- PROCESSING STATEMENTS • •
J5A
Conditional Assembly
Instructions • • • • • •
J5B
Inner Macro Instructions • •
J5C
The COPY Instruction • • • •
J5D
The MNOTE Instruction •
J5E
The MEXIT Instruction •
J6 -- COMMENTS STATEMENTS • • • •
J6A
Internal Macro Comments
Statements • • • • • • • • •
J6B -- Ordinary Comments Statements
J7 -- SYSTEM VARIABLE SYMBOLS • • • •
J7A
&SYSDATE..........
J7B
&SYSECT..........
J7C
&SYSLIST • • • • • • • • • •
J7D
&SYSNDX..........
J7E
&SYSPARM..........
J7F
&SYSTIME..........
J8 -- LISTING OPTIONS • • • • • • • •
J8A
LIBMAC...........
J8B -- MCALL • • • • • • • • • • •

272
272
272
272
273
276
277
277
277
278
279
280
281
284
284
287
287
287
288

SECTION K: THE MACRO INSTRUCTION • • • 289
K1 -- USING A MACRO INSTRUCTION • • •. 289
K1A -- Purpose • • • • • • • • • • 289
K1B -- Specifications • • • • • • • 290
Where the Macro Instructions can
Appear • . • • • • • • • •
290
Macro Instruction Format • • • 290
Alternate Ways of Coding a Macro
Instruction . • • • • • • • • • 291
ENTRIES • • • • • • • • • • • • 292
K2
K2A -- The Name Entry • • • • • • • 292
K2B -- The Operation Entry • • • • 293
K2C -- The Operand Entry • • • • •
293
K3 -- OPERANDS • • • • • • • • • • • • 294
K3A
positional Operands • • • •
294
K3B -- Keyword Operands • •
• • 296
K3C -- Combining positional
and Keyword Operands • • • • 299
300
K4
SUBLISTS IN OPERANDS . •
302
K5
VALUES IN OPERANDS • • • •
NESTING IN MACRO DEFINITIONS • • 307
K6
307
K6A -- Purpose • • • • • •
Inner and Outer Macro
Instructions • • • • • • • • •
307
Levels of Nesting
• • • 308
Recursion • • • • • • • • • • • 310
K6B -- Specifications • • • • • • • 311
General Rules and Restrictions 311
passing Values through Nesting
Levels • • • • • • • • • • • • 312
System Variable Symbols in
Nested Macros • • • • • • • • • 314
SECTION L:
LANGUAGE •

THE CONCITIONAL ASSEMBLY
• • 317

L1 -- ELEMENTS AND FUNCTIONS • • • • •
L 1 A - - SET S ymbo 1 s • • • • • •
The Scope of SET Symbols •
Specifications • • • • • •
Subscripted SET Symbols Specifications • • • • • • • •
L1B -- Data Attributes • • • •
What Attributes Are. . • •
L1C -- Sequence Symbols • • • • • •
xi

317
3 18
319
320
322
323
323
334

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

L2 -- DECLARING SET SYMBOLS • • • • •
L2A
The LCLA, LCLB, and LCLC
Instructions • • • • • • • •
L2B
The GBLA, GELB, and GBLC
Instructions • • • • • • • •
L3 -- ASSIGNING VALUES TO SET SYMBOLS
L3A
The SETA Instruction
L3B -- The SETC Instruction • • • •
L3C -- The SETB Instruction • • • •
L4 -- USING EXPRESSIONS • • • • • • •
L4A
Ari thmetic (SETA)
Expressions • • • • • • • •
L4B -- Character (SETC) Expressions

L4C --Logical

(SETEj

336

APPENDIX I:

CHARACTER CODES • • • • . 377

336

APPENDIX II:

HEXADECIMAL-DECIMAL
CONVERS ION TABLE

340
343
343
345
347
349
349
355

Expressions. 359

L5 -- SELECTING CHARACTERS
FROM A STRING • • • • • • • • •
L5A -- Substring Notation • • • • •
L6 -- BRANCHING • • • • • • • • • • •
L6A
The AIF Instruction • • • •
L6B
The AGO Instruction • • • •
L6C -- The ACTR Instruction • • • •
L6D -- The ANOP Instruction • • • •
L7 -_. IN OPEN CODE • • • • • • • • • •
L7A -- Purpose. • • • • • • • • •
L7B -- Specifications • • • • • • •
L8 -- LISTING OPTIONS • • • • • • • •

364
364
367
367
369
370
373
374
374
374
376

APPENDIX III:
IAPPENDIX IV:

INSTRUCTION

~ACHINE

FOR~AT

383

•

DELETED

• • • 389
•

391-406

APPENDIX V:

ASSE~BLER

APPENDIX VI:

SUMMARY OF CONSTANTS • • 411

INSTRUCTIONS • 407

APPENDIX VII: SUMMARY OF MACRO
FACILITY • • • • •

• 413

GLOSSARY • •

421

INDEX • • • • • • • • • • • • • • • .

437

xii

Section A: Introduction
What the Assembler Does
A computer can understand and interpret only machine
language. Machine language is in binary form and, thus,
very difficult to write. The assemcler language is a
symbolic programming language that you can use to code
instructions instead of coding in machine language.
Because the assembler language allows you
symbols made up of alphabetic and numeric
of just the binary digits 0 and 1 used in
language, you can roake your coding easier
understand, and change.

to use meaningful
characters instead
the machine
to read,

The assembler must translate the symbolic assembler language
into machine language cefore the computer can execute ycur
program, as shown in the figure below.
CODING SHEETS

SOURCE MODULE

Assembler Language Input
or

TERMINAL

ASSEMBLER

OBJECT MODULE

Machine Language Output

LOAD MODULE

Main Storage of
COMPUTER

Section A:

Introduction

1

Assume that your program, written in the assembler language,
has been punched into a deck of cards called the sourlli I······

10

I

II

Iii 1. .

1<

..

OOl'r."o"

'.

I'

.'.

Opl.... nd

20

"
I

.

"

. .. ! ..••.

I
I:

•

I.···••

'0

"

i.l.

......
..

1

.

STATEMENT

"

'.

.

'0

r

'.

..

.·.·1·

.

'.<

r< I
I
I

'.

1 >1

1

GRAPHIC

I

I

I

PAGE

PUNCH

I

I

I

CARD ELECTRO NUMBER

..

'0

1

!

Iii I····

.••.•

CommentS

60

...... il
'.:
i
·i
··1···. I •. Ii IFI I . ' I I HIi

I
II

.

*

IWnl,f,c.l,on.

"

"

,

SeQu.,,"

I···.··!.) 1>1 ·1 I ..... ·i ..·.· I.·•.
..
I··.
il ··.··1·[;
·····1·1
I.··.·.·
.. 1'. LI 11< II IiI /: ...' I> .. I

II.·.····

It·.·.·.

..

OF

'0

'

j

I
.'

V.·,

,>1<

I
III·····

I

.'1· "'f:

..

II

Ii .

I 1/ 1',

..

.

I ".

II

·:·!I·
I

i

I

.

.

•.....

,

/

......

I
'.1"

1 ••

.....

·.1··· I I - 1,1 Iii
I I.
I

Ii

,., ·····1 !"':' 1,\I······
I

....

I .. ·••··•

"

...

r

>.·.• • i . .•.••. [<
.,i i>l}

I

B'

,

I

Illi

."

......

•. . >

.'.

!

........... 1<1·····
} ..... II .

I
•

'

I

..

,• 1'"

..

..
'

.. '...

.

..

I.· ·

>.,. I

1 .\ I

......

.....

1

'"

.

...

...

.

:

II· 1"·1"
j ..•.

I",

I

! .I

•••••••••••

.

'. .........

.

..•

:1····

f····

'.

Ii

1··.··1···.·.·· ·····1
". I I I> I

 < . y!i

I

.'
."

....

'

"

......

.......

..

'0

A stlmdsrd card (orm, IBM electro 6509. is av'lilable for punChing source statements from rMs form.
Instfllctions for usilJg this form are In any IBM Svsrem1360 Assembler Rcft'rl.'nce MaIlUJ/.
AddrfJSS comments concerning rhi$ lorm to IBM NordiC L.1boratory. PubliciHiolls Developmem.

... ,

I··.··

I···.··

Ii . ·. ·.••

....

"

.

:..

....

'.

'

...........

.

................

I····

i

'.:..:

I.·.·

"'1'" .....

.. '.'

<•••••..

......

.

.! .... •• 1 i······· .•....•

I

'

i·' . . .

i
1/ : ......

'.

....

...............
"

...........

....

..
.

..

I·····

I

.

' ...

.

,••.< I·.'

.....• ......

I
.' I·

•

·"1> 11<

:>

I

'.'

I

I

... 'I·.•· · · 1
......... ..' \

I

':'

" ~/ I:
I{I. I.ili .. II

... ·1·...

!

!
1

I

ILl 1<1····. I

iii Itlt 1···.·1··.·.···

) 1·< / ......

. '.

•<

I .,.

..

'

..

<> I
..

1

'.

<

....
..... y

•.•••.<

.'

....

'0

Bo/( 962 S· 181 09 Udingo 9, Sweut'll.

Section B:

Coding Conventions

15

BI -- Coding Specifications

B1A - FIELD BOUNDARIES
Assembler language statement usually occupy one aO-column
line on the standard form ~or statements occupying more
than ao columns, see B1B below). Note that any printable
character punched into any column of a card, or otherwise
entered as a position in a source statement, is reproduced
in the listing printed by the assembler. All characters
are placed in the line by the assembler. Whether they are
printed or not depends on the printer.
Each line of
the coding form is divided into three main fields:

~

The Statement field,

~

The Identification -Sequence field, and

~

The Continuation Indicator field.

Stmnt Field

The Statement Field

•

The instructions and comments statements must be written
in the statement field. The statement field starts in
the "begin" column and ends in the "end" column. Any
continuation lines needed must start in the "continue"
column and end in the "end" column. The assembler assumes
the following standard values for these columns:

•

The "begin" column is column 1

8

•

The "end" column is column 71, and

0

•

The "continue" column is column 16.

These standard values can be changed by using the ICTL
instruction. However, all references to the "begin",
"end", and "continue" columns in this manual refer to the
standard value described above.

IBM

..
.,

PROGRAM

DATE

PROGRAMMER

"'LA BEL

"-

c~a

•

GX28-6509·!

IBM SY!item 360 Assembler Coding Form

.

STATEMENT

10

O'*"io"

,.

Optr.nd

"

'0

"

OP COD OPE RA N 05
CON TI NU AT ION

e

30

L I NE5

"

PUNCHING
INSTRUCTIONS

.. RE MA .

I
I

I

GRAPHIC

I

PUNCH

s•

RK5
MU 5 T 5T ART IN

CO L U MN

.

I
I

I

I

I

I

Com...nlt

8.

I

CARD

..

I
I

:

:

I

~c::;:::::

"

!

;

OF

'1

1

U

.~

Ii

16

I

16

t

p. t d·

X

~

ldent,.,(
$etjue

"

The Identification - Sequence Field
/

The identification-sequence field. can contain identification
characters or sequence numbers or both. If the ISEQ
instruction has been specified to check this field, the
assembler will verify whether or not the source statements
are in the correct sequence.
NOTE: The field the assembler normally checks lies in
columns 73 through 80. However, if the ICTL instruction
has been used to change the begin and end columns, the
boundaries for the identification-sequence field can be
affected.

The Continuation Indicator Field

The continuation indicator field occupies the column after
the end column. Therefore, the standard position for this
field is column 72. A non-blank character in this column
indicates that the current statement is continued on the
next line. This column must be blank if a statement is
completed on the same line; otherwise the assembler will
treat the statement that follows on the next line as a
continuation line of the current statement.

Field Positions
The statement field always lies between the begin and the
end columns.' The continuation indicator field always lies
in the column after the end column. The identificationsequence field usually lies in the field after the
continuation indicator field. However, the ICTL
instruction, by changing the standard begin, end, and
continue columns can create a field before the begin column.
This field can then contain the identification-sequence
field.

Section B:

Coding Conventions

17

B1B - CON,!'INUATION LINES

Continuation
To continue a statement on another line, the following
applies:
1. Enter a non-blank character in the continuation indicator
field (column 72). This non-blank character must not be
part of the statement coding. When more than one
continuation line is needed, a non-blank character must
be entered in column 72 of each line that is to be
continued.

•

2. Continue the statement on the next line, starting in
the continue column ~olumn 16). Columns to the left of
the continue column must be blank. Comments may be
continued after column 16.
Note that if an operand is continued after column 16 it
is taken to be a comment. Also if the continuation
indicator field is filled in on one line and the user
tries to start a totally new statement after column 16 on
the next line, this statement will be taken as a comment
belonging to the previous statement.
Only two continuation lines are allowed for a single
assembler language statement. However, macro instruction
statements and the prototype statement of macro definitions
ca~ have as many continuation lines as needed.

IBM

PUNCHING

INSTRUCTIONS
DATE

PROGRAMMER

...

,~

GX28-6509-5 U/M 050

IBM System 360 Assembler Coding Form

PR()(iRAM

Oper,'ion

.. .

"
PU NCH

STATEMENT

I

r

I

PUNCH

"

NE XT

..
RE MA RKS
Co

30

25

IN CL U 0 E

"

'0

PH AS E3

"

L I NE

.0

,

T
I

T

GRAPHIC

O~.nd

I

•

...

Printed in USA

..

T
I

PAGE

1

Idl'nllfie.tio"..
Sotqu.nc.

.0

CO NT IN UE

Ii IA

LA

18

il

ON

~a
.h
R E MIA Rk" NF En N h
CO N~ I~ UE I N COL

14)

10+ b + b + 10 + 10
t;
O~ ~E NT

P

11.
+ o +p + p + p
p~ ill E NT

.
IS

.
leo "'~~

LP AD ED
EN T

IS

I~ TO

Lp AD ED

flEG

1

IN TO

,

p~ ~H ~T

REG

1

I S

73

"

B•

1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + i + 1 + 1 + 1 +1

+t;! ( 3

"

CARD ELECTRO NUMBEA

V

LA

OF

BO

X
:.-. y

+X
X'

1~

+r x

i

+

I

A R E ~A RK

*

I

_LLl

,B1C - COMMENTS STATEMENT FORMAT

)

Comments

Comments statements are not assembled as part of the ccject
module, but are only ~rinted in the assembly listing.
As many comments statements as needed can be written,
subject to the following rules:

o

1. Comments statements require an asterisk in the begin
column.
Internal macro definition comments statements require
a period in the begin column, followed by an asterisk (for
details see J6A) •
NOTE:

2. Any characters, including blanks and special characters,
of the IBM System/370 Character Set (see C3) can ce used.

•

3. Comments statements must lie in the staterrent field
and not run over into the continuation indicator field;
otherwise the statement following the comments statement
will be considered as a continuation line of that corrrrents
st at ement •
4. Comments statements must not appear cetween an
instruction statement and its continuation lines.

GX28-6509·5 UIM 050

IBM

IBM System 360 Assembler Ceding Form

PROGRAM
PUNCHING

INSTRUCTIONS

DATE

PROGRAMMER

...

.

,~

STATEMENT

0'"'

0"... ...

Qpet'.nd

,.

"
" "
"
"
iT H IS IS AN OR DI NA R Y CO MM EN TS
JAN AS SE MB LER PR OG RA M.
'\!

*
~

,.

"
5 T AT EM EN TI,

,.

Printed in USA
...
GRAPHIC

I

I

I

PAGE

I

PUNCH

I

I

I

CAAO ELECTRO NUMBER

WH I CH

..

CAN

Comnwnll

IN

..

"

"

•
\

i

I:

:

I

i

I

I
I

I

I

I

I

i
I

i
I

!

I

I

I i

i

!

:

I

..

Stqu.nc.

I

1
I

..

*

l(len1,!,.::."on.

AP P" E AR AN Ylltl HE RE

0
1
1

O.

I

: I

I

_._-

:
I

L

.-

Section B:

Coding Conventions

I

19

B1D

INS~RUC~ION

S~ATEMENl

FOR~AT

Instructions
The statement field of an instructicn staterrent rrust te
forrratted tc include frcm one to four of the following
entries:
1. A narre entl:y
2. An

o~eraticn

entl:Y

3. An operand entry
4. A rerrarks entry.

..

stand~rd coding forrr, is divided into fields that ~rovide
fixed positions for the first three entries, as fcllo~s:

~he

IBM
I'·OG'~

---

IAI~

J:II

IslE '... TID

GX28-6509-5 U/M 050
Printed in U.S.A.

IBM 5Yltlm 360 A.. lmblor Coding F.rm

~

I

""HeMING

·~tr±,:j;;'

~.

f ;~~ ..

IA IR

1114

nlR alp

1110

1 is

... 15 Elc T

~AT'

INST"UCTIONI

STATlM.NT

"

..

G.....'e

I ' ' ' 'M

I

I

J

J

I

I

IEIN ITIRlv

"

00_"

..

'"

I'AG.

*

-

' .... lltaillofto

"'

"

1.-

I.

NIA MIE IE NTIRI\' 101M liT ITIElo
lalp

.. I ...

I ....

nlRG

IEIN ITIRlv INlolTI ,RIE au IB
IEIN ITIRIV 10M I iT IE

10
I

,

••
••

An a-character name field starting in cclurrn
A 5-character
An

o~erand

o~el:aticn

1~

field starting in cclurrn 10.

field that begins in column 16.

Note that with this fixed format one blank
field.

se~al:ates

each

Free Format
It is not necessary to code the narre, c~eraticn, and c~el:and
entries acccrding to the fixed fields on the standard
coding form. Instead, these entries can be written in
any ~csition, subject to the formatting specifications
below.

20

Formatting Specifications
Whether using fixed or free format, the following general
rules apply to the coding of an instruction statement:
1. The entries must be written in the following order:
name, operation, operand, and remarks.
2. The entries must be contained in the begin column (1)
through the end column (71) of the first line and~ if
needed, in the continue column (16) through the end ccluwn
(71) of any continuation lines.
entries must
O or3. The
more blanks.

be separated from each other by one

~ 4. If used, the name entry must start in the begin column.
S. The name and operation entries,
4Et an
least one blank, must be contained
instruction statement •
•

each followed by at
in the first line cf

6. Th: operation entry must start at least one colurrn tc
the r~ght of the begin column.

IBM

PUNCHING
INSTflUCTtONS
OAn

PROGRAMME ..

.

..SA L R ..

No_

-

Ii.-

NA ME I"-S ALR

4Et

STATEMENT
O,*.nd

Opw.llOn

8

NA ME

1 4

-

.~
1 4

2.

II

1 5~

"

15
f-

f-

30

30

'0

..

Printed in U.S.A.

I

r

RE MA RKS

~

--

R EM AR KS

r8
;AAIM!EI

GX28-6509-5 U/M 050

IBM 5y.tern 360 AUllmbler Coding form

I'ROGAAM

F R EE

I
I

GRAPHIC
PUNCH

I

..

--

..

I

I

I

Co_nil

"

F I XED

PAGE

CARD ELECTRO NUMIEft

..

)::

.:

II

I·'. :/

.........
15

Soq,-

"

FO RM AT

NA ME

I.: II: ···1 ···1 1.'.1 I····· :1 • :. III I, • ·
: .'. ·.··1 !/ II> < Ii IIJ Ijh ISA LR I X
I::
ON L Y OP ER AND AND RE MA RKS EN TR Y AL L 0 ~E 0 HE RE

I: ..·.

EN TRY

"

8'

FO RM AT

r~.
1 4 I, 1 5

*

IOtnli"",1Ofto

1

14

SA L R

OF

•

I

I
1

I
i

OM IT TED

!

I
'-'-'- -

L-

i

--

-

I

THE NAME ENTRY: The name entry identifies an instruction
statement.
The following applies to the name entry:
1. It is usually optional.
2. It must be a valid symtol at assembly time (after
substitution for variable symbols, if specified); for an
exception see the TITLE instruction (H3E).

Section B:

Coding Conventions

21

THE OPERATION ENTRY: The operation entry provides the
symbolic operation code that specifies the machine,
assembler, or macro instruction to be processed. The
following applies to the operation entry:
1. It is mandatory.
2. For machine and assembler instructions it must be a
valid symbol at assembly time (after substitution for
variable symbols, if specified). The standard syrr.bolic
operation codes are five characters or less (see Appendixes
IV and ~ •

3. For macro instructions it can be any valid symbol that
is not identical to the operation codes described in 2
above.
THE OPERAND ENTRY: The operand entry has one or more
operands that identify and describe the data used by an
instruction. The following applies to operands:
1. One or more operands are usually required, depending
on the instruction.
2. Operands must be separated by commas. No blanks are
allowed between the operands and the commas that separate
them.
3. Operands must not contain embedded blanks, because a
blank normally indicates the end of the operand entry.
However, blanks are allowed if they are included in
character strings enclosed in apostrophes (for example,
CIJ NI ) or in logical expressions (see L4C).

22

THE REMARKS ENTRY: The rerrarks entry is used tc descrite
the current instructicn. The following applies to the
remarks entry:
1. It is cfticnal.
2. It can ccntain any of the 256 characters (or punch
combinations) of the IEM Systerr/370 character set, including
tlanks and sfecial characters.
3. It can follow any operand entry.
4. ~f an cfticnal cferand entry is omitted, rerrarks are
allcwed if the absence cf the operand entry is indicated
by a comma, preceded and followed ty one cr rrcre tlanks.

IBM

IBM 5 ysem
t
360 A sembler Codmg Form

r

'ROO .......

PUNCHING

I

fPROGRA ..... U,

DATE

No_

I.LR .. ,.

,.

OJ-rltoon

B

AL V.A YS

INSTAUCTIDNS

SR
PU NCH

10

S

1 0

9

t

STATEMENT
O,*,nd

"

L/As E L OP CO DE

3.

OP Rl

3S

OP R

2'

If

GIiI"""IC

'UNe><

.. RE MA RKS

•
r

ST ART

NO NOl

CS ECT

NO N02

END

a~

...

I

I

I

I

T
I I
I

CO MMA

IN

01

CA TES

.

OF

CAAO ELECTAO NUU.Ef'

..

Co

-

..

I .... ;' ......

MU ST BE SE PA RA TED FR OM
AN OP ER AND EN TRY BY ONE OR MO RE
SL AN KS.

i

OM IT

GX28-6509-5 U/M 050
Printed in USA
PAGE

I
ASS EN C E OF

"

OP NO

RE MA RKS
,~

RE MA RKS
i

!

,

Section B:

I

Coding Conventions

23

Section C: Assembler Language Structure
/

This section describes the structure of the assembler
language, that is, the various statements which are allowed
in the language and the elements that make up those
statements.

Section C:

Assembler Language Structure

25

Cl -- The Source Module
A source module is a sequence of assembler language
statements that constitute the input to the assembler.
The figure on the opposite page shows an overall picture
of the structure of the assembler language.

C2 - Instruction Statements
The instruction statements of a source module are composed
of one to four entries that are contained in the statement
field. Other entries outside the statement field are
discussed in B1A. The four statement entries are:
1. A name entry (usually optional)

2. An operation entry (mandatory)
3. An operand entry (usually required)
4. A remarks entry (optional).
NOTES:
1. The figures in this sUbsection show the overall structure
of the statements that represent the assembler language
instructions and are not specifications for these
instructions. Th~ individual instructions, their purposes,
and their specifications are described in other sections of
this manual (as cross-referenced in the figures). Model
statements, used to generate assembler language statements,
are described in J4.
2. The remarks entry is not processed by the assembler, but
only copied into the listings of the program. It is
therefore not shown except in the overview opposite.

26

Source Module
made up of
Source Statements

EITHER

NAME

COMMENTS
STATEMENTS

INSTRUCTION
STATEMENTS

REMARKS

OPERATION

EXPRESSIONS

CHARACTER
STRINGS

IBM SYSTEM/370
CHARACTER SET

Section C:

Assembler Language Structure

27

C2A -- MACHINE INSTRUCTIONS
The machine instruction statements are described in the
figure below.
The instructions themselves are discussed in Part II cf
this manual and summarized in Appendix IV.

I

I
I

can be

OPERAND
Entry

OPERATION
Entry

NAME
Entry

I

I must bel

I

I

A
Symbol
(or blank)

A symbolic
Operation
Code

One or more
operands
composed of

or

or

Location
Counter
Reference
e.g.i<

Exp (Exp)

or

Arithmetic
combination
of terms

Exp(Exp,Exp)
or
Exp C, Exp)

or

Exp

= Expression

Symbol
Length
Attribute
Reference
e.g.L'HERE

Which can be
any of the
following

Decimal

Hexadecimal

Binary

Character

e.g. 9

e.g. X '09'

e.g. B '1001'

e.g. C 'JAN'

Section C:

Assembler Language Structure

29

C2B -- ASSEMBLER INSTRUCTIONS
The assembler instruction statements can be divided into
two main groups: ordinary assembler instructions and
conditional assembly instructions.

Ordinary Assembler Instructions
Ordinary assembler instruction statements are described
in the figure on the opposite page.
These instructions are discussed in Part III of this manual
and summarized in Appendix V.

30

NAME
Entry

OPERATION
Entry

A

A symbolic
Operation
Code

Symbol
(or blank)

OPERAND
Entry

One or more
operands

Operands can be
composed of one
to four subfields

Duplication
factor

Type

Operands can be
composed of

Modifiers

Expression

Constant
(Nominal
Value)

or

Character
String
e.g.
'TO BE
PUNCHED'

Symbolic
Option
e.g.

NOGEN

One or more
constants of
the format
below

e.g.

'Decimal
number'
e.g. F '2'

(Expression)
or

or
e.g. A(ADDR)

'Character
string'
e.g. C' A is B'

1 Discussed more fully where individual instructions are described

Section

c:

Assembler Language Structure

31

Conditional Assembly Instructions
Conditional assembly instruction statements and the rracrc
processing statements (MACRO, MEND, MEXIT, MNOTE) are
described in the figure below.
The conditional assembly instructions are discussed in
Section L and macro processing instructions in Section
J; both types are summarized in Appendix V.

I

I

can be

I

I

OPERAND
Entry

OPERATION
Entry

NAME
Entry

I
must be

I

I
A symbolic
Operation
Code

Sequence
Symbol
.SEa
(or blanOk)

or

Variable
Symbol
& VAR

Sequence
Symbol

or

Variable
Symbol

or

I

Expression
or
(Expression)

Zero or more
operands
composed of

or

Exp,'msg'
MNOTE
3,'ERROR'

or

(exp)seq sym
(&A EQ1).SEQ

Which can be any
combination of
variable symbols
and other characters
that constitute an
Exp=Expression

Arithmetic
Expression
&A +1

32

or

Logical
Expression
&81 OR &82

or

Character
Expression
'JAN&C'

C2C -- MACRO INSTRUCTIONS
Macro instruction statements are described in the figure
below; the prototype statement of a macro definition, which
serves as a model for the macro instruction staterrent,
is also shown.
Macro instruction statements are discussed in Section K
of this manual and the prototype statement is discussed
in Section J2.

Symbolic
Operation
Code

Symbolic
Parameter

Zero or more
Symbolic
Parameters

Prototype
Statement

Macro
Instruction
Statement

Zero or more
Operands
which can be

Ordinary
Symbol
(or blank)

or

Sequence
Symbol

or

Variable
Symbol

Each entry
can have a
value

Character
String
(excluding
blanks)

Section C:

or

'Character
String'
(including
blanks)

Assembler Language Structure

33

C3 - Character Set
Terms, expressions, and character strings used to build
source statements are written with the fcllowing characters:
1. Alphameric Characters

Alphabetic characters (or letters):- A through Z, and
$, #,

@

Digits

(or numerals): 0 through 9

2. Special characters
+ -

,

= • * () • /

&

l:lank

Examples, showing the use of the above characters are given
in the figure below.
Normally, ycu would use strings of alphameric characters
to represent data (terms, see C4) , and special characters
as:
a. Arithmetic cperators in expressions
b.

Data or field delimiters

c. "Indicators to the asseml:ler for specific handling.
Characters are represented ty the card-~unch ccrrbinaticns
and internal bit ccnfigurations listed in Appendix I.
In addition to the printatle characters listed abcve, any
of the 256 combinations for punched cards listed in A~~endix
I can be used:
1. Between paired apcstrophes

2. As staterrent remarks
3. In comments statements
4. In rracrc instructicn o~erands
1(5) •

34

(for restrictions see

Page of GC33-401G-4
Revised Feb. 25. 1975
By TNL: GN33-8193

)

Char. Set

Characters

Usage

Alphameric

In symbols

LABEL NINE#Ol

Terms

Digits

As decimal
self-defining
terms

01

Terms

Special
Characters

Example

Constitu ti ng

9

As Operators
Addition

NINE+FIVE'"

Subtraction

NINE-5

Multiplication

9*FIVE

/

Division

TEN/3

+ or -

(Unary)

+NINE

+

Expressions

-FIVE

Terms

As Delimiters
Blanks

Between fields

LABEL

Comma

Between operands

OPND1,OPND2

Operand field

Apostrophes

Enclosing
character strings

C'STRING '

String

Enclosing subfields
or subexpressions

MOVE MVC TO(80) ,FROM
(A+B "" (C-D) 1

Statement
Expression

Parentheses

AR

3,4

Statement

As indicators
for
Ampersand

Variable symbol

&VAR

Term

Period

Sequence symbol

.SEQ

(label)

Comments statement
in Macro definition
Concatenation

~*THIS

Asterisk

Equal sign

IS A COMMENT

Statement

&VAR.A

Term

Bit-length
specification

DC CL.7 I AB '

Operand

Decimal point

DC F'l.7E41

Operand
Expression

Location counter
reference
Comments statement

':' THIS IS A COMMENT

Literal reference

L

Keyword

&KEY=D

6, =F ,12 1

Section C:

Statement
Statement
Keyword
Parameter

Assembler Language Structure

35

C4 -- Terms
A term is the smallest element of
the assembler language that
represents a distinct and separa te
value." It can therefore te used
alone or in ccmbination with other
terms to form expressions. Terms
have absolute or reloca table val ue s
that-are assigned by the assemtler
or are inherent in the terms
themsel ves.

A term is absolute if its value
does not change upon program
relocation and is reloca table if
its value changes upon relocation.
The various types of terms described
below are summarized in the figure
to the right.

,

Terms

Terms

Term Can Be

Assigned by
Assembler

Absolute

Relocatable

X

X

X

X

X

Symbols
Location
Counter
Reference
Symbol
Length
Attribute

X

X

Other Data
Attributes

X

X

Self-Defining
Terms

X

C4A -- SYMBOLS

Furpose
You can use a syrobcl tc represent storage location$ or
arbitrary values.
SYMBOLIC REPRESEN'IA'IICN: You can \-;rite a symbol in the
name field of an instruction. Ycu can then s~ecify this
symtcl in the c~erands cf other instructions and thus refer
to the former instruction symbolically. This symtol
represents a relocatatle address.
You can alsc assign an absolute value to a symbol ty coding
it in the name field of an EQU instructicn with an c~erand
whose value is absclute. This allo\-;s you to use this.
symbol in instruction operands tc represent registers,
displacements in explicit addresses, irrrrediate data,
lengths, and implicit addresses with atsclute values. Fcr
details cf these ~rcgrarr. elements, see r5. The advantages
of symbolic over numeric re~resentation are:
1. Syrrbcls are easier tc remember and use than numerical
values, thus reducing prograrrrring errors and increasing
programming efficiency.
2. Ycu can use rreaningful symtcls to descrite the ~rcgrarr
elements they represent; for exarople, INFUT can name a
field that is to contain in~ut data, cr INDEX can narre
a register to te used for indexing •
. 36

Value Is
Inherent in
Term

X

3. You can change the value of one symbol (through an EQU
instructicn) more easily than you can change sevexal
numerical values in rrany instructions.
4. Symbols are entered into a cross-reference table that
the asserrbler ~rints in the ~rogram listing.
~his table
helps you to find a symtol in a prcgrarr listing, because
it lists (1) the numter of the staterrent in which the
syrebcl is defined (that is, used as the name entry) and
(2) the numbers of all the staterrents in which the syrrbcl
is used in the c~erands.
~HE SYMEOL ~AELE:
~he assembler rraintains an internal
table called a syrrbcl table. ~hen the asserrbler ~rccesses
your source staterrents for the first time, the assembler
assigns an absolute or relocatable value tc every syrrbcl
that a~~ears in the name field of an instruction. The
assembler enters this value, which norrrally reflects the
setting cf the locaticn ccunter, into the symbol table;
it also enters the attributes asscciated with the data
represented by the syrrbcl. ~he values of the symbol and
its attributes are available later when the asserrblex finds
this syrrbcl cr attribute reference used as a term in an
operand or expression (Attribute references used as terrrs
are discussed in C4C and C4D below) •

Specifications
The three types of symbol recognized
by the assembler are:

,

'
I

1. Ordinary symbols

Symbols
2. Sequence symbols
3. Variable symbols.
ORDINARY SYMBOLS: Ordinary symbols
can be used in the name and operand
field of machine and assembler
instruction statements. They must
be coded in the format shown in
the figure to the right.
NOTES:

~

.

alphabetic character (letter)

~alphameric characters

o IR

DIN S Y M

Examples:

HERE
READER
AOOl
B002

1. No special characters are allowed
in an ordinary symbol.
2. NO blanks are allowed in an
ordinary syrrbcl

Section C:

#01
#12
@33
$OPEN

X

Y
Z

F2A

Assembler Language Structure

37

Var. Sym.
VARIABLE SYMBOLS: Variable symbols
can only be used in macro processing
and conditional assembly
instructions. They must be coded
in the format shown in the figure
to the right.

ampersand
alphabetic character (letter)

~

6 alphamedc ch.,acters

&

IARSYMj

Examples:

&A
&B
&C

&PARAM
&KEYWORD
&CHAR3

Seq. Sym.

SEQUENCE SYMBOLS:
Sequence symbols
can only be used in macro processing
and conditional assembly
instructions. They must be coded
in the format shown in the figure
to the right.

~

period

alphabetic character lIetter}

~ alphamedc characters

. SIEQUSYMI
Examples:

.SEQ
.LOOPll
.EXIT20
.TOOOl
Symbol Definition

An ordinary symbol is considered
defined when it appears as:
1. The name entry in a machine or
assembler instruction of the
assembler language.
2. One of the operands of an EXTRN
or WXTRN instruction.
NOTE: Ordinary symbols that appear
in instructions generated from model
statements at pre-assembly time
are also considered defined.

38

The assembler assigns a value to
the ordinary symbol in the name
fields as follows:

1. According to the address of the
leftmost byte of the storage field
that contains one of the follo~ing:

o

•
•

a.
Any machine or assemtler
instruction (exce~t the EQU or
GFSYN instructions)

L

3, AREA

c. Any constant defined by the
DC instruction

AREA

DS

F

d. A channel corrmand word defined
by the CCW instruction.

F200

DC

F'200' •

FULL
TWOO

EQU AREA}.
EQU F200

R3

EQU 3

The address value thus assigned
is relocatabl e, because the object
code assembled from these items
is relocatablej the relocatability
of addresses is descrited in C5B.

•,

8

LOAD

b. A storage area defined by
the CS instruction

2. According to the value of the
first or only expression specified
in the operand of an EQU instruction.
This expression can ha ve a
relocatable or absolute value, which
is then assigned to the ordinary ~
symbol. The value of an ordinary~
symbol must lie in the range -2 31
through +231'1-1.

Object Code
in Hex

Address Value
of Symbol

Assembler Language
Statements

Address of
AREA

Relocatable

..------....

I

LOAD- ~15S131 0 xxxxi

•
•
I
I

L

A

R3,FULL
R3,TWOO

AREA-tfIXX x x xxx x
~

F200fl lOO

I

o 0 OOCSI

FUL~7
TWOO

Absolute
R3=3
Address
of FULL

..------....

I

I

15s131o xxxx
15A I 3 I 0 Ixxxx I

------

Address of

TWOO

Section C:

Assembler Language Structure

39

Restrictions on Symbcls
FIRST

START

o

L

REG4,TABLE(INDEX}

B

SECOND

DS

CL256

UNIQUE DEFINITION: A symbol must
ce defined only once in a source
module:

o

either in the name field of a
source statement

8

or in the operand field of an
EXTRN or WXTRN ~nstruction.
This is true even for a source
module which contains two or more
control sections.
NOTE: The ordinary symbol that
appeC3:rs in the name field of an
OPS¥N or TITLE instruction does
not constitute a definition of that
symbol.
It can therefore be used
in the name field of any other
statement in a source roodule.

CONTROL SECTION NAMES: A duplicate
symbol can, however, be used as
the name entry of a START, CSECT,
DSECT, or COM instruction. The
~ first time a symbol is used to name
these instructions, it identifies
the beginning of the control section:
a duplicate use of the symbol
•
ident~f~es the resumption of an
interrupted control section.
PREVIOUSLY DEFINED SYMBOL: In some
instructions the symbols used in
4Bttheir operands must have been defined
in a previous instruction.
previously defined symbols are
required for the operands of the
following instructions:
EQU
CNOP
ORG
DC and DS (in modifier and
duplication factor expressions).

40

SECOND

CSECT
L

REG3,ADRDR

B

RESUMEl

DC

A(READER)

CSECT
LA

END

INDEX,20

C4B -- LOCATION

COUN~ER

REFERENCE

Purpose
assembler runs a location counter
to assign storage addresses to your
program statements. It is the
asserotler's equivalent of the
instruction counter in the computer.
You can refer to the current value
of the location counter at any place
in a source medule by sfecifying
an asterisk as a term in an operand.
~he

THE LOCATION COUNTER: As the
instructions and constants of a
source module are being assemtled,
the location counter ha s a val ue
that indicates a location in storage.
The assembler increrrents the location
counter according to the fOllowing:

O

1. After an instructien or constant
has been assembled, the location
counter indicates the next availatle
location.

2. Before assembling the current
instructien or constant, the
assembler checks the toundary
alignIfent required fer it and adjusts
~ the location counter, if necessary,
,
to indicate the prefer boundary.

•

•.

3. While the instruction or constant
is being assembled, the location
counter value does not change.
It indicates the lccatien of the
current data after toundary alignment
and is the va lue a ssigned to the
symbOl, if present, in the name
field of the staterrent.

Location
in Hex

Source
Statements

DONE

DC

CL3'SOB'

BEFORE

EQU

*

DURING

DC

F'200'

oooooe.

AFTER

EQU

*

000010

NEXT

DS

D

000004
8000007'8

0000084:

•

4. After assembling the instruction
or censtant, the assembler increments
the location counter ty the length
of the asserrbled da ta te indica te
the next available location.
The assembler maintains a location
counter for each control section
in a source module; fer complete
details about the location counter
setting in control sections, see
E2C. The assembler carries an
internal location ceunter value
as a 4-byte, 32-bit value, tut it
only uses thelow-erder 3 bytes,
which are printed in the program
listings. However, if you specify
addresses greater than 2 24 -1, you
cause overflow into the high-order
byte, and the assembler issue s '~:he
error message "LOCA'IION COUNTER
OVERFLOW".
Section C:

Assembler Language Structure

41

NOTE: In the figure below, an example of a location counter

overflow (or wrap-around) is shown.

o

••
•

The internal address value of the symbol B is carried as
a 4-byte value, but the printed location only includes
the low-order 3 bytes.
The location counter value for instructions or constants
is usually printed as a 3-byte value. However, the 4-byte
value, with up to 3 leading zeros suppressed, is printed
for the addresses specified in the opercmds .o.~~he~cl~owing
~P~. }:;:.~~t:~qrt~:.¥QlJ,.Of{H.~ . . . . .a.I1(jt!§:rNG •..•....... Only. ·.3~byt~·· . ·.yalues
~:t'~.E:t'~rtt:~~.~g:t't:1:l~()p~:t'Cl:t1:9:~i~~1:hE;.ab()ve ·.·instrllctions·~

You can control the setting of the location counter in
~ a particular control section by using the START or ORG
instructions.

Assembly Listings in Hexadecimal Representation

LaC

OBJECT CODE

ADDR 1 ADDR2

000000

1

000000
FFFFFE

,X1FFFFFE

58506004

00D08

07F;*

1*

I

A

START 0
•

2

ORG

,~+x, FFFFFE'

L

5,4 (,6)

(Location counter overflow)

ERROR

UIO{)QQ04

e
Up to 3 leading zeros
are suppressed

42

SOURCE STATEMENT

3

000004

•

STMT

4

B

BR

15

5

C

DC

A(B)

6

D

EQU C

Specifications

Loc. Ctr Ref
!he lccaticn counter reference is
specified by an asterisk (*). The
asterisk can be s~ecified as a
relocatable term according to the
follcwing rules:

Location
in Hex

1. It can only be specified in the
cperands cf:

a.

Machine instructions

b.

The

rc and rs instructions

c. !he EQU, ORG, and USING
instructions.
2. It can alsc be s~ecified in
~ literal constants (see CS).

•

!he value of the locaticn ccunter
reference (*) is the current value
cf the lccaticn ccunter cf the
control section in which the asterisk
P) is specified as a terrr. !he
asterisk has the sarr.e value as the
address cf the first byte of the
instruction in which 1t a~pears
(for the value cf the asterisk in
address constants with duplicaticn
factcrs, see G3J).

000104
000108

Address
Value of 'if.

Source
Statements

1

HERE

IOOOllC~ONSTANT

IOOO120KHERE

J

Section C:

8

I

B
B

HERE
*+8
} same
HERE+8 effect

DC
L

A(*) •
3, =A (*)

I

CONSTANT
THERE

I

Assembler Language Structure

43

C4C -- SYMBOL LENGTH ATTRIBUTE REFERENCE

Purpose
When you specify a symbol length attribute reference, you
obtain the length of the instruction or data referred to
by a symbol.
You can use this reference a s a term in
instruction operands to:
1. Specify unknown storage area lengths
2. Cause the assembler to compute length specifications
for you
3. Build expressions to be evaluated by the assembler.

Specifications
The symbol length attribute reference must be specified
according to the following rules:
1. The format must be L' immediately followed by a valid
symbol or the location counter reference (*).
2. The symbol must be defined in the same source module
in which the symbol length attribute reference is specified.
3. The symbol length attribute reference can be used in
the operand of any instruction that requires an absolute
term. However, it cannot be used in the form L'* in any
instruction or expression that requires a previously defined
symbol.

44

The value of the length attribute
is normally the length in bytes
of the storage area required by
an instruction, constant, or field
represented by a symbol. The
assembler stores the value of the
length attribute in the symbol table
along with the address value assigned
to the syrobcl.
When the assembler encounters a
symbol length attribute reference,
it substitutes the value of the
attribute from the symbol table
entry for the symbol specified.
The ?ssembler assigns the length
values to symbols in the
name field of instructions as
follows:
attr~bute

Length Attr.

4Dt F?r

machine instructions, i t assigns
2, 4, or 6, depending on
the format of the instruction.

e~ther

•

~or th: DC and DS instructions,

~t ass~gns

either the implicit or
explicitly specified length. The
length attribute is not affected
by a duplication factcr.

8
DOS

For the EQU instruction, it assigns
the length attribute value of the
leftmost or only term of the first
expression in the first operand,
unless a specific length attribute
is supplied in a second o~erand.
Onlyonec~erandis allowed in
EQU'instruction~

Note the ler;gth attribute values
of the following ter~s in an EQU
instructicn:

Value of Symbol
Length Attribute
(at assembly time)

Source Module

MVC
L
LR

TO,FROM
3,ADCON
3,4

L'MACHA
L'MACHB
L'MACHC

TO
FROM
ADCON
CHAR
DUPL

DS
DS
DC
DC
DC

CL80
CL240
A(OTHER)
C'YUKON'
3F'200'

L'TO
L'FROM
L'ADCON
L'CHAR
L'DUPL

RELOCl
RELOC2
ABSOLl
ABSOL2

EQU
EQU
EQU
EQU

TO

L'RELOCl
L'RELOC2
L'ABSOLl
L'ABSOL2

EQU
EQU
EQU

X!~~},~A-B
C.;t~9K:!;1

L'SDTl
L'SDT2
L'SDT3

~+10

L'ASTERISK

•

ttd+so

~g9~-TO

A13S0Ll

8.

self-defining terrrs

SDTl
SDT2
SDT3

~.

lccaticn ccunter reference

ASTERISK

EQU

O·

~

LOCTREF

EQU

LENGTHl DC

A (L' * )

~he

length attribute of the location

~ counter reference (L'*) is equal

to the ler;gth attribute of the
instruction in which the L'* a~pears.

On

MACHA
MACHB
MACHC

102

'L!.~

8 I24~80
SO
SO
240
240

•a

L'LOCTREF

L' *
L'LENGTHl
LENGTH2 MVC TO (L '* ) , FROM
L'*
LENGTH3 MVC TO(L'TO-20} ,FROM L'TO

8

0

1

1

eU

SO

For the rerraining asserrbler
instruct~ons, see the specifications
for the individual instructions.

Section C:

Assembler Language Structure

45

C4D -- OTHER ATTRIBUTE REFERENCES
There are other attributes which describe the
characteristics and structure of the data you define in
a program. For exarople, the kind of constant you specify
or the number of characters you need to represent a value.
These other attributes are the type (T'), scaling (S'),
integer (I'), count (K'), and number (N') attributes.
NOTE: You can refer to these attributes only in conditional
assembly instructions and expressions;
for full details, .
see L1B.

C4E -- SELF-DEFINING

TE~S

Purpose
A self-defining term allows you to specify a value
explicitly.
with self-defining terms, you can specify
decimal, binary, hexadecimal, or character data. 7hese
terms have absolute values and can te used as absclute
terms in expressicns to represent bit configurations,
absolute addresses, displacements, length or other
.
modifiers, or duplication factors.

46

Specificaticns

Self-Defining

GENERAL RULES:

Self-defining terrrs:

· Refresent rrachine
O values

Binary
Value

Decimal
Value

language binary

• Are atsclute terrrs; their values
do not change upon prograrr
relocaticn.

assemtler carries the values
represented ty self-defining terms
to 4 tytes or 32-tits; the highorder bit is the sign bit.

~he

•

Self-Defining
Term

15
15
241
241
B'llll'
15
B'11110001'
241
B'100000001'
257
X'F'
15
X'F1'
241
X'101'
257
Call
241
C'A'
193
C'AB'
49,602

0

1111
11110001
1111
11110001
100000001
1111
11110001
100000001
11110001
11000001
1100000111000010

4 bytes
(32 bits)

r

24

L,

16

8

0

I

I

J

I

•

/sign bit

·1

value bits

31 30

/ value bits /

I

1=Negative Va"lue
O=Positive Value

~ECI~AL:
A decirral self-defining
term is an unsigned decimal number.
~he assemtler allows:

O.

High-crder zercs

••

A maximum of 10 decirral digits

•
•

•

'214748364 i

A range of values from 0 througr.

2,147,483,647.

Section C:

Assembler Language Structure

47

EINABY: A tinary self-defining
tern: Irust be ceded in the format
shown in the figure to the right.
'Ihe asserrbler:

O .it

Assembles each tinary digit as
is s{:ecified

__________ apostrophes must enclose digits

\

.

.

B ',110011 ••••• 101'

\

\

binary

1 to 32 binary digits

~.

Allows a maximum of 32 tinary
digits
.
Examples

• Allows a range of values fron:
-2,147,483,648 thrcugh
2,147,483,647.

•

Binary Value

B'101011~_O kno~
NOTE: When used as an absolute
term in expressions, a tinary selfdefining terrr; has a negative value
. if the high-order tit is 1.

e

B'11101010l11'

High-order
~.nbit

B '1011111 ••• 111'
'} 32 digitS.

B
•

48

'Jl!o 0 0 0 • • • 0 09 '
32 digits

III 0101 01111

~\ostroPhes must enclose digit

X I FF ••• F56

"\'

I

~

hexadecimal

1 to 8 hexadecimal digits

LQQ$f!§:§J
Conversion Table:
Hexadecimal
Digit

HEXAtECIMAL: A hexadecimal selfdefining tern must be ccded as sho~n
in the figure to the right. the
asserrtler:

O
•

a
1
2
3
4
5
6
7
8

C
D
E

• Allows a rraxirrurr cf 8 hexadecimal
digits
•

a
1
2
3
4
5
6
7
8
9
A
B

• Assembles each hexadecimal digit
into its 4-tit binary equivalent
(listed in the f~gure to the right)

4-bit
Decimal
Binary
Equivalent Representation

F

9

10
11
12
13
14
15

0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
11011110
1111

Allows a range of values from
through 2,147,483,647.

4It -2,147,483,648

Examples:

Binary Value

XI

NOtE: When used as an absolute
term in an expression, a hexadecirral
self-defining terrr has a negative
• , value if the high-order tit is 1.

10 aaall a1 01

X'A '
X'FFA '

1111111111110101

8di9its8

X I 7FFFFFFF I

X ' 800000o.0 '

•
I

Section C:

Assembler Language Structure

49

Page of GC33-4010-4
Revised Feb. 25, 1975
By TNL: GN33-8193

CHARACTER: A character self-defining
tern nust te ceded as shc~n in the
figure to the right. the asserrtler:

/fstroPhes must enclose characters

C'ABCD'
• Allows any of the 256 punch
combinations when using punched
cards as in~ut.
this includes the
printable characters, that is,
blanks and special characters.

o

\

Examples:
Character
Characters
self-defining
Assembled
term

•
Assembles each character into
its a-bit binary eguivalent.
(A
table of characters and their tinary
equivalents can be found in Appendix
I) •

• Requires that two aro~ersands
or apostrophes be specified in the
character sequence fer each ampersand
~ or apostrophe required in the
asserol::led term.
•

••

~to

4 characters
character Itn),~;~~;;jQ~~1

CiA'

~

C'l'
,
C'
C'I/'
C'@'

1
(blank)
1/

•

C'FOUR'
'-----'

X'Cl'

-8

-

11000001
11110001
01000000
01111011
01111100

01010000
01111101

"

X'.50'
X'7D'
X'D37DC1'
x', 7D7D'

FOUR

X'C6D6E4D9'

@

C'&&'
C'" ,
C'L' 'A'
C"" I'

-

Binary
Value

X'F1'
X' 40'
X'7B'
X'7C'

je Ie
,

Allows a maximum of 4 characters.

Hexadecimal
Value

&

L'A

CS - Literals

Purpose

You can use literals as operands
in order to introduce data into
your program. However, you cannot
use a literal as a term in an
expression. The literal represents
data rather than a reference to
data. This is convenient, tecause
1. The data yeu enter as numbers
for computation, addresses, or
messages to be printed is visil::le
in the instruction in which the
literal appears, and

2. You avoid defining constants
elsewhere in your source module
and then using their symbolic names
in machine instruction operands.

50

L
L

MVC

1,=F'200'
2,=A(SUBRTN)
MESSAGE (16) ,=C'THIS IS AN ERROR'

The,assembler assembles the data
specified in a literal into a
-iiteral pool" (fully described
in H1~. It then assembles the
address of this literal data in
the pool into the object code of
the instruction that contains the
literal specification. Thus the
assembler saves you a programming
step by storing your literal data
for you. The assembler also
organizes literal pools efficiently
so that the literal data is aligned
on the proper boundary alignment
and occupies the minimum amount
of space.

\
)

LITERALS, CONSTANTS, AND SELFDEFINING TERMS: Do not confuse
literals with constants or selfdefining terms. They differ in
three important ways:
1. In, where you can specify them
in machine instructicns, that is,
whether they represent data or an
address of data.

2. In whether they have relocatable
or absolute values.

3. In what is assembled into the
object code of the machine
instruction in which they a~pear.
The figure to the right illustrates
the first two points.

O.

Compare:

A Ii teral represents data.

• A constant is represented by
its relocatable address.
Note tha t
a symbol with an absolute value
does not re~resent the address of
~a constant, but represents immediate
data (see D5D) or an absolute
add"ress.
'

o

A literal with a relocatable address

L
L

3,=F'33'
3,F

DC

F'33'

•

o
•

F33

e

} same effect

A Literal with a self-defining term
and a symbol with an absolute value

1

A self-defining term represents
•
data and has an absclute value.

MVC FLAG,=Xt,
MVI FLAG ,i{i.!.:U,Qa same effect
MVI FLAG,ZEROV
FLAG
ZERO

DS X
EQU X'OO'

•
•

A symbol having an absolute address value
with a self-defining term

LA 4 , LOCORE }
-: 4, !j;Qij. same effect
LOCORE EQU 1000

Section C:

Assembler Language Structure

51

Source Statements
n Hex

The figure to the right illustrates
the third point.

LITERAL

L

RELCON

L

ABSCON

TM

SELFDT

TM

FLAGCON

EQU X'BS '

O·rather
The

address of the literal,
.
than the literal data itself
is assembled into the abject code.

• • The address of a constant is
assembled intc·the object code.
NOte that when a symbol with an
•
absolute va lue represents immedia te
da ta, i t is the absolute value that
is assembled into the abject code.
•

I

• The absolute value of a selfdefining term is assembled into
the object code.

24S F200

DC

F'200'

24C BYTE

DS

X

LTORG
250 loooooocsi

52

F'200'

Literal
Pool

Specifications

Literals

A literal must be ccded as shown
in the figure to the right.

o

I

The literal is specified in the
same way as the operand of a DC
instruction (for restrictions see

Literal Specification

G3C) •

GENERAL RULES FOR LITERAL USAGE:
A literal is not a term and can
be specified only as a complete
operand in a machine instruction.
In instructions with the RX format
they must not be specified in
operands in which an index register
is also specified.

~:

o

Because literals provide "read-only"
data, they rrust not be used:
1. In operands that re~resent the
receiving field of an instruction
that modifies storage

2. In any shift or I/O instructions.

C6 - Expressions
C6A -- PURPOSE

o
•

e

You can use an express·ion to specify:
An address
An explicit length

A duplication factor

•

A complete c~erand
You can write an expression with
a simple term or as an arithmetic
combination of terms.
The assembler
reduces multiterrn expressions to
single values. Thus, you do not
have to ccm~ute these values
yourself.

•

EQU

IX-Y+13-P/Q'

B

MVC

,TO+L'TO-L'FROM I(L'FROM) ,FROM

C

DS

A modifier

•

•

-;I

r--- _ _ _

A

,

Section C:

0/

/

(,X-Y,) XL <,P /Q-10,)

• •
Assembler Language Structure

53

Expressions have absolute or relocatable values. Whether
an expression is absolute or relocatable depends on the
value of the terms it contains. You can use the absolute
Or relocatable ex~ression described in this subsection
in a machine instruction or any assembler instruction ether
than a conditional assembly instruct1on. The assembler
evaluates relocatable and absolute expressions at asserrbly
time. Throughout this manual, the word "expression" refers
to these types of expression.
.
NOTE: There are three types of expression that you can
use only in conditional assembly instructions: arithmetic,
logical, and character expressions. They are evaluated
at pre-asserr.bly time. In this manual they will always
be referred to by their full names; they are described
in detail in L4.

54

C6B -- SPECIFICATIONS

Expressions

The figure below defines both absolute and relocatable
expressions.

~NOTE:
•

The relocatable values that are paired must have
the opposite sign after the resolution of all unary
operators.

Absolute
Expression

Relocatable
Expression

Operators Allowed
Unary: + Positive
Negative
Binary: +
:;:
/

Addition
Subtraction
Multiplication
Division

Abs. Exp = Absolute Expression
ReI. Exp

Section C:

= Relocatable Expression

Assembler Language Structure

55

Absolute and Relocatable Expressions
Source Module
An expression is absolute if its
value is not changed by program
relocation;
it is relocatable if
its value is changed upon program
relocation. A descri~tion of the
factors that determine whether an
expression is absolute or relocatable
follows.

PAIRED RELOCATABLE TERMS: An
expression can be absolute even
though it contains relocatable
terms, provided that all the
relocatable terms are faired. The
pairing of relocatable terms cancels
the effect of relocation. The
assembler reduces paired terms.to
single absolute terms in the
intermediate stages of evaluation.
The assembler considers relocatable
terms as paired under the following
conditions:

o
•
•.

• The paired terms
in the same control
source module ~hat
same relocatability

must be defined
section of a
is, have the
attribute) •

• The paired terms must have
opposi te signs after all unary
operators are resolved. In an
expression, the paired terms do
not have to be contiguous, that
is, other terms can come between
the paired terms.

Can be
paired

Can be
paired

e{
0 {

CSECT

A
B
C
LOCTREF
ABSA
ABSB
ABSC

OOS
OS
OS
EQU
EQU
EQU
EQU

SECOND

CSECT

D
E
F

DS
DS
DS
END

0

F
P
P

X'P'
300

CiA'

x
X

X

Examples:
Paired Relocatable Terms •

•

B-A
C-A
,...--.....
+B-+C'
) B-C
-A--B c:::=;> -A+B
LOCTREF-C
D-E
F-D

Absolute
Expressions

Ie"

A+ABSA-B
D-E+ABSC
P-D+B-C
L..--...J

paired

Unpaired Relocatable Terms

• The value represented ty the
.paired terms is absolute.

&....-.-.J

paired

Relocatable
Expressions
Unpaired

B

'S+ABSA

C

(:J+X'FF'

LOCTREF

iE-5:~

D

56

FIRST

(B-C) •
paired

Abs. Exp.

Source Module

A

.DC.

F'2'

B

DC

F'3'

C

DC

F'4'

ABSA

EQU

100

ABSB

EQU

X'FF'

ABSC

EQU

B-A

CSECT

FIRST

Absolute Expressions

'-----'

Paired

The assembler reduces an absolute
expression to a single absolute
value if the expression:
~ 1. Is composed of a symbol with
an absolute value, a self-defining
term, or a symbol length attritute
reference, or any arithmetic
.
~combination of absolute terms.

8

2. If it contains relocatable terms,
alone or in combination with absolute
terms, and if all these relocatable
.terms are paired.

ABSD

EQU

'*-A'

END
Absolute
Expressions

.{ ~~SA
L'A
~{ABSA+ABSC-ABSC*15

A{~!~
~

Section C:

ABSA+15-B+C-ABSD/(C-A+ABSA)

Assembler Language Structure

57

Relocatable Expressions

Reloc. Exp.
A relocatable expression is one
whose value changes, for example,
ty a 1000, if the object module
into which it is assembled is
relocated 1000 bytes away from its
originally assigned storage area.
The assembler reduces a reloca table
expression to a single relocatable
value if the expression:
1. Is composed of a single
relocatable term, or
2. Contains relocatable terms, alone
or in combination with absolute
terms, and:

o

•

a. All the relocatableterms
but one are paired. Note that
the unpaired term gives the
expression a relocatable value;
the paired reloca table terms
and other absolute terms
constitute increroents or
decrements to the value of the
unpa ired term.
b. The relocatability attribute
of the whole expression is that
of the unpaired term.
c. The sign preceding the unpaired
relocatable term must be positive,
after all unary operators have
been resolved.

COMPLEX RELOCATABLE EXPRESSIONS:
Complex relocatable expressions,
unlike relocatable expressions,
can contain:
a. Two or more unpaired
relocatable terms or
b. An unpaired relocatable term
preceded by a negative sign.
Complex relocatable expressions
can be used only in A-type and Ytype address constants (see G3J) •

58

Source Module

FIRST

CSECT

A

DC

H'2'

B

DC

H'3'

C

DC

H'4'

ABSA

EQU

10

ABSB

EQU

ABSC

EQU

10 ~~(B-A)

END
Relocatable Expresssions:
(Belong to control section named FIRST
and have same relocatable attribute as
A, B a"nd C)

•

__ i~

............. ·A+ABSA+IO
B-+A-f:C-IO*ABSC

O-J e
/

B-A+C+IOO*ABSA+ABSA/(C-A}

~O~

.Rules for Coding Expressions
Operators

The rules fcr coding an absolute
or relocatable expression are:
1. Both unary (operating on one
value) and binary (operating on
two values) operators are allowed
in expressions.

o
•
•

2. An expression can have one or
more unary operatcrs preceding any
term in the expression or at the
beginning of the expression.

5. No blanks are allowed between
an operator and a term nor between
two successive operators.

/

I

6. An expression can contain up
to 19 unary and binary operators
and up to 6 levels of parentheses.
Note that parentheses that are part
of an operand specification do not
count toward this limit.

'6. An expression can cont.ain up

Binary

+, -

I

Unary

0

,~;:,

========..

+ -+ - - ABS

===~t.

/

-ABS

- REL-ABS

.---.....
Binary

I

~~A;4\

Context determines whether
+ or - is unary or binary
operator
c:::::===1~~

A+B

ABS /ABSD+15

===~~

REL ...;ABS

=====9~.

ABSC / ABSD+15
REL-ABS

~-----t»------------------~

I

Multiply

e

I
INVALID
VALID

A' 3
~::+3

--ILocation counterl
I Reference
I

~

~\':, / B
''0../
a-ABSA + ~:,

V

~

to 15ll;pary and ". billary ope:r:ators
andup.to 5 levels of parentheses.
7. A single relocatable term is
not allowed in a multiply or divide
operation. Note that paired
relocatable terms have absolute
values and can be multiplied and
divided if they are enclosed in
parentheses.

+, -

~ABS

3. An expression must not begin
with a binary operatcr, nor can
~ t contain. two binary operators
1n succeSS1cn.

. . 4. An expr:ssion mus:- not contain
~two terms 1n succeSS1cn.

Unary

--'e-/r

'

Context determines whether
an asterisk (':') is the binary
operator for multiplication
or the location counter
reference

~---------------~

Leftmost operator betweel\
[ two terms is binary

x' FF' (10 ~:, A)

l5B'101'

INVALID
VALID
INVALID

--------------------~

-

INVALID

INVALID

8. A literal is not a valid term
and is therefore not allowed in
an expression.

Section C:

Assembler Language Structure

59

Evaluation of Expressions

Value of
Expression

Absolute Expressions

The assembler reduces a multi term
expression to a single value as
follows:
1. It evaluates each term.

A=5
A~:'-

- X'A'

~

••

+50

;

15

"

a.
It performs unary operations
before binary o~erations, and

A=10 {A+10/B ==i'> 10+10/2

b.
It performs the binary
operations of multi~lication
and division befcre the binary
operations of addition and
sul::traction.

B=2

(A+I0) /B ~ (10+10) /2920/2 ~

A=10

A/2

A=11

A/2

. . 3. In division, it gives an integer
... result; any fractional portion is
dropped. tivision by zero gives

o.

o

4. In parenthesized ex~ressions,
the assembler evaluates the inner
most expressions first and then
A. considers them as terms in the next
~outer level of ex~ressions.
It •
. continues this process until the
outermost expression is evaluated.
5. A term or expression's
intermediate value and computed
result must lie in the range of
-2 31 through +231_1.

NO~E:

It is assurred that the
asseml::ler evaluates paired
relccatable terrrs at each level
of expression nesting.

60

§:

~O

2. It performs arithmetic operations
from left to right. However:

o

5::'+ 10

A=1

}e

{1:~2A/2 ~

10 ::< 1/2

9

10

)

5

)

5

)

0

10/2 ...:;

5

Part II: Functions and Coding of Machine Instructions
SECTION 0: MACHINE INSTRUCTIONS

61

Section D: Machine Instructions

This section introduces the main functions of the machine
instructions and provides general rules for coding them
in their symbolic assembler language format. For the
complete specifications of machine instructions, their
object code format, their coding specifications, and their
use of registers and virtual storage (see GLOSSARY) areas
see the principles of Operation manuals:
•

IEM System/360 Principles of Operation, Order No. GA22-

6821

• IB~ System/370 principles of Operation, Order No. GA221000

Dl - Functions
At assembly time, the assembler converts the symbolic '.
assembler language representation of the machine
instructions to the corresponding object code. It is this
object code that the computer processes at execution time.
Thus, the functions described in this section can be called
execution time functions.

J

Also at assembly time, the assembler creates the object
code of the data constants and reserves storage for the
areas you specify in your DC and [S assembler instructions
~ee G3).
At execution time, the machine instructions
can refer to these constants and areas, but the constants
themselves are not executed.

Section D:

Machine Instructions

63

~1A

-- FIXED-POINT

ARI~HMETIC

Purpose
You use fixed-point instructions
when you wish to perform arithmetic
operations on data represented in
binary form.
These instructions
treat all numbers as integers.
If they are to o~erate upon data
representing mixed numbers (such
as 3.14 and 0.235) you must keep
track of the decimal pOint yourself.
For your constants you must ~rovide
the necessary number of binary
positions to represent the fractional
portion of the number specified
by using the scale mcdifier (see

Fixed· Point
Operations

Mnemonic
Operation Codes

Add

AR , A, AH, ALR, AL

Subtract

SR,S,SH,SLR,SL

Multiply

MR,M,MH

Divide

DR,D

Arithmetic Compare
(taking sign into
account)

CR, C,CH

Load into registers

LR,L,LH,LTR,LCR,LPR,LNR,LM

Store into areas

ST,STH,STM
SLA,SRA,SLDA,SRDA

Fixed-point instructions allow you
to perform the operations listed
in the figure to the right.

Arithmetic Shift of
binary contents of
registers to left or
right (retaining
sign)

CVB

Data Constants Used

Convert (packed)
decimal data to
binary

G3B) •

Operations Performed

In fixed-point instructions, you
can refer to the constants listed
in the figure to the right.

Convert binary data
to (packed) decimal
data

Except for the conversion
operations, fixed-point aritlimetic
O NOTE:
is performed on signed binary values.

64

0

CVD

Constants Used

Type

Fixed-Point

Hand F

Binary

B

Hexadecimal

X

Character

C

Decimal (packed)

P

Address

Y, A, S, V and Q

~1E

--

~ECINAL

ARITEMETIC

Furpose
You use the decirral instructions
when you wish to perform arithITetic
cperaticns cn data that has the
binary equivalent of decimal
representaticn, either in packed
or zoned form. These instructions
treat all nurrbers as integers.
For example, 3.14, 31.4, ana 314
are all processed as 314. You rrust
keep track cf the decirral peint
yourself.
. .

Cecirral instructiens allo~ you to
perform the operations listea in
the figure tc the right.

Decimal
Operations

Mnemonic Operation
Codes

Add

AP

Subtract

SP

Multiply

MP

Divide

DP

Arithmetic Compare
(taking sign into
account)

CP

Move decimal data
with a 4-bit offset

MVO

Shift decimal data
in fields to left or
right

SRP

Set a field to zero
and add contents
of another field

ZAP

rata Constants Usea
In decimal instructions yeu can
refer tc the ccnstants listed in
the· figure to the right.
NOTE:

ExceFt fer the ccnversion
arithrretic is
packea aecirral

. operations, decimal
O
performed on signea
values.

Convert zoned to
packed decimal
data
Convert packed to
zoned decimal
data

PACK

\

0

Constants Used

Decimal (packed)
(zoned)

Section D:

UNPK

Type

P
Z

Machine Instructions

65

:C1 C -- FLCATING-FOINT ARI'IHMETIC
Furpose
You use floating-point instructiens
when yeu wish te ferferrr arithmetic
operations on binary data that
represents ccth integers and
fractions. Thus, you do net have
to keep track ef the decirral point
in yeur ccrrfutaticns. Flcatingpoint instructions also allow yeu
to perfcrrr arithrretic cperations
on both very large numters and very
small nurrcers, with greater precision
than with fixed-point instructions.

Floating - Point
Operations

Add

Subtract

J

..

66

ADR, AD, AER, AE, AWR
AW, AUR, AU, AXR
SDR, SO, SER, SE, SWR,
SW, SUR, SU, SXR

Multiply

MDR, MD, MER, ME, MXR,
MXDR,MXD

Divide

DDR,DD,DER,DE

Halve
(division by 2)

HDR, HER

Arithmetic Compare
(taking sign into
account)

CDR, CD, CER, CE

Floating-feint instructiens allow
you to perform the operations listed
in tbe figure tc the right.

Load into floating point registers

LDR,LD,LER,LE,LTDR,
LTER, LCDR, LCER, LPDR,
LPER,LNDR,LDER,LRDR,
LRER

:Cata Constants Used

Store into areas

STD, STE

In floating-point instructions,
you can refer tc the ccnstants
listed in the figure to the right.

Constants Used

Type

Floating - Point

e

Mnemonic Operation
Codes

NOTE: Flcating-peint arithmetic
is performed on signed values that
rrust have a sfecial floating-point
forrrat. The fracticnal pcrtion
Of floating-point numters, when
used in additicn and subtractien,
can have a normalized (no leading
zercs) er unncrrr.alized format.

E, 0, arid L

Logical
Operations

Move

Mnemonic Operation
Codes

MVI, MVC, MVN, MVZ, MVCL

Logical Compare
(unsigned binary
values)

CLR, CL, CLI, CLC, CLCL,
CLM

AND (logical
multiplication)

NR, N, NI, NC

OR (logical
addition)

OR,O,OI,OC

Exclusive OR
(either ........ or,
but not both)

XR, X, XI, XC

Testing binary
bit patterns

TM

Inserting characters
into registers

IC,ICM

Store characters
into areas

STC,STCM

Load address into
register

LA

Logical Shift of
unsigned binary
contents of
registers to left or
right

SLL, SRL, SLDL, SRDL

Replace argument
values by corresponding
function values from
table (translate)

TR,TRT

Edit (packed and
zoned decimal data)
values in preparation
for printing

ED, EDMK

D1D -- LOGICAL OPERATIONS

Purpose
You can use the logical instructions
to introduce data, meve data, or
inspect and change data.

Operations Performed
The logical instructions allow you
to perform the operations listed
in the figure to the right.

Section D:

Machine Instructions

67

Branching
Operations

Mnemonic Operation
Codes

Branch depend;n g )
on the results of
the preceding
operation (that
sets the condition
code)

BCR, BC

a

D1E -- BRANCHING

Purpose
You can use several ty~es of
branching instructions, comtined
with the logical instructions listed
in D1D, to code and control loops,
subroutine linkages, and the sequence
of processing.

Operations Performed
The branching instructions allow
you to perform the operations listed
in the figure to the right.
NOTE:

Additional mnemonics for
~branChinq on conditicn are described
in section C1H below.
.

68

Branch to a
subroutine with a
return link to
current code

BALR, BAL

Branch according
to a count contained in a register
(count is decremented
by one before determining course of
action)

BCTR, BCT

Branch by comparing
index value to fixed
comparand, (index
incremented or decremented before
determining course
of action)
Temporary Branch in
orderto~a

specific machine
instruction

BXH,BXLE

EX

Status Switching
Operations

Mnemonic Operation
Codes

Load program status information

P

LPSW

Load sequence of control registers

P

LCTL

Set bit patterns for condition code
and interrupts for program

C1F -- STATUS SWITCHING

SPM

Set bit patterns for channel usage
by system

P

SSM

~

P

SSK

P

SCK

P

15K

protection ~ for a block of
storage

Set time-of-day clock
Insert protection
into a register

m

for storage

Purpose
Store time-of-day clock

You can use the status switching
instructions to communicate between
your prograrr and the system control
program. However, some of these
instructions are privileged
instructions and you can use them
only when the CPU is in the
supervisor state, but not when it
is in the problem state. The
privileged instructions are marked
with a "p" in the figure to the
right.

Operations Performed
The status switching instructions
allow you to perform the operations
listed in the figure to the right.

STCK

Store identification of channel
or CPU

P

STI DC, STI DP

Store (save) sequence of control
registers

P

STCTL

Call supervisor for system
interrupt

SVC

Call monitor for interrupts depending on contents of
control register

MC

Test bit which is subsequently
set to 1

TS

Write or Read directly to or
from other CPU's

P

WRD, RDD

Set Clock Comparator

P

SCKC

Store Clock Comparator

P

STCKC

Set CPU Ti mer

P

SPT

Store CPU Timer

P

STPT

Store Then AN D System Mask

P

STNSM

Store Then OR System Mask

P

STOSM

Section D:

Machine Instructions

69

D1G -- INPUT/OUTPUT

Purpose
You can use the input/output
instructions, instead of the IBMsupplied system macro instructions,
when you wish to control your input
and output operations rrore closely.

Operations Performed
The input or output instructions
allow you to identify the channel,
or the device on which the input
or output operation is to be
performed. The operations performed
are listed in the figure to the
right. However, these are privileged
instructions, and you can only use
them when the CPU is in the
supervisor state, but not when it
is in the problem state.

Input or Output
Operations

Mnemonic Operation
Codes

Start I/O

SIO, SIOF

Halt I/O

HIO

Test state of channel
or device being used

TIO,TCH

Halt Device

section D:

HOV

Machine Instructions

71

Page of GC33-40tO-O
Reyiscd September 29,1972
By TNL GN33-8148

D1H -- BRANCHING WITH EXTENDED MNEMONIC CODES

Purpose
The branching instructions described below allow you to
specify a mnemonic code for the condition on which a branch
is to occur. Thus, you avoid having to specify the mask
value required by the EC and ECR branching instructions.
The assembler translates the mnemonic code that represents
the condition into the mask value, which is then asserrbled
in the object code of the machine instruction.

Specifications
The extended mnemonic codes are given in the figure on the
opposite page.

o
•

They can be used as operation codes for branching
instructions., re.Placing the BC and BCR machine instruction.
codes. Note that the first operand of the BC andBCR
instructions must not be present in the operand field of
the extended mnemonic branching instructions.

~NOTE:

The addresses represented are explicit addresses;
however, implicit addresses can also be used in this type
of instruction.

72

Meaning

Extended Code

••

B
BR
NOP
NOPR

\02 (X; ,B2)
R2
D2(X2,B2)
R2

Format

(Symbolic) Machine
Instruction Equivalent

0
}
}

Unconditional Branch
No Operation

•

RX
RR
RX
RR·

BC
BCR
BC
BCR

RX
RR
RX
RR
RX
RR
RX
RR
RX
RR
RX
RR

BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR

2,D2(X2,B2)
2,R2
4,D2(X2,B2)
4,R2
8,D2(X2,B2)
8,R2
13,D2(X2,B2)
13,R2
II,D2(X2,B2)
II,R2
7,D2(X2,B2)
7,R2

RX
RR
RX
RR
RX
RR
RX
RR
RX
RR
RX
RR
RX
RR
RX
RR

BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR

I,D2(X2,B2)
I,R2
2,D2(X2,B2)
2,R2
4,D2(X2,B2)
4,R2
13,D2(X2,B2)
13,R2
II,D2(X2,B2)
II,R2
7,D2(X2,B2)
7,R2
8,D2(X2,B2)
8,R2
14,D2(X2,B2)
14,R2

BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR

I,D2(X2,B2)
I,R2
4,D2(X2,B2)
4,R2
8,D2(X2,B2)
8,R2
14,D2(X2,B2)
14,R2
II,D2(X2,B2)
II,R2
7,D2(X2,B2)
7,R2

15,D2(X2,B2)
15,R2
O,D2(X2,B2)
O,R2

Used After Compare Instructions

BH
BHR
BL
BLR
BE
BER
BNH
BNHR
BNL
BNLR
BNE
BNER

D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2

} Branch
} Branch
} Branch

on High

.} Branch
} Branch
} Branch

on Not High

on Low
on Equal

on Not Low
on Not Equal

Used After Arithmetic Instructions

BO
BOR
BP
BPR
BM
BMR
BNP
BNPR
BNM
BNMR
BNZ
BNZR
BZ
BZR
BNO
BNOR

D2(X2,B2}
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2(X2,B2)
R2
D2 (X2 , B2)
R2
D2(X2,B2)
R2

}

Branch on Overflow

}
}

Branch on Plus

}
}

Branch on Not Plus

}

Branch on Not Zero

}
}

Branch on Zero

Branch on Minus

Branch on Not Minus

Branch on No Overflow

Used After Test Under Mask Instructions

BO
BOR
BM
BMR
BZ
BZR
BNO
BNOR
BNM
BNMR
BNZ
BNZR

D2(X2,B2)
R2
D2(X2,B2}
R2
D2(X2,B2)
R2
D2(X2,B2}
R2
D2 (X2 ,B2)
R2
D2(X2,B2)
R2

}
}
}
}
}
}

Branch if Ones
Branch if Mixed
Branch if Zeros
Branch if Not Ones
Branch if Not Mixed
Branch if Not Zeros

RX
RR
RX
RR
RX
RR
RX
RR
RX
RR
RX
RR

D2=displacement,X2=index register,B2=base register,R2=register containing
branch address

section D:

Machine Instructions

73

D11 -- RELOCATION BANtLING

PUrpose
You use the relocation instructions
in connnection with the relocate
feature of IBM System/370.

Operations Performed
The relocation instructions allow
you to perforrr the operations listed
in the figure to the right.
However
~hese in~tructions are privileged
'
1nstruct1ons, and you can use them
only when the CPU is in the
supervisor state, but not when it
is in the problem state.

74

Relocation
Operations

Mnemonic Operation
Code

Load Real Address

LRA

Purge Translation
Lookaside Buffer

PTLB

Reset Reference Bit

RRB

Set Clock Comparator

SCKC

Store Clock Comparator

STCKC

Set CPU Timer

SPT

Store CPU Timer

STPT

Store and AN D System
Mask

STNSM

Store and OR System
Mask

STOSM

D2 - Alignment
Alignment

purpose
The assembler automatically aligns the object code of all
machine instructions on halfword toundaries. For execution
of the IBM Systerr./370 machines, the constants and areas
do not have to lie on specific boundaries to be addressed
by the machine instructions.
However, if the assembler option ALIGN is set, you can
cause the assembler to align constants and areas; for
example, on fullword boundaries. This allows faster
execution of the fullword machine instructions.
If the NOALIGN option is set, you do not need to align
constants and areas. They will be assembled at the next
available byte, which allows you to save space (no bytes
are skipped for alignment).

Section D:

Machine Instructions

75

Specifications

O

Sou rce Statements

Object Code

MACHINE INSTRUCTIONS: When the
assembler aligns machine instructions
on halfword boundaries, it sets
any bytes skipped to zero.
CONSTANTS AND AREAS: One of the
assembler options that can be set
in the job control language (that
initiates execution of the assembler
program) concerns the alignment
of constants and areas; itcan
be specified as ALIGN or NOALIGN.

L.

3'AREA~

3,CONS~

A

CONST

If ALIGN is specified, the following
applies:
•

• The assembler aligns constants
and areas on the boundaries implicit
in their type, if no length
specification is supplied.

• The assembler checks all
4It addresses
expressions that represent storage
to ensure that they are
aligned on the boundaries required
by the instructions. If they are
not, the assembler issues a warning
message.

Full Word
Boundary

AREA

DS

F

xxxxxxxx

CONST

DC

F' 200'

000000C8

If NCALIGN is specified, the
following applies:
• The assembler does not align
• , constants and areas on special
boundaries, even if the length
specification is emitted. Note
that the CCW instruction, however,
always causes the alignment of the
channel command word on a doubleword
boundary.
•

• The assembler does not check
storage addresses for boundary
alignment.

L

3,AREA~

A

3,CONST~
CONST

NOTE 1: The asserr~ler always forces
alignment if a duplication factor
of 0 is specified in a constant
or area without a length modifier
(for an example, see G3N). Alignment
occurs when either ALIGN or NOALIGN
is set.
AREA

DS
DS

CONST DC
DC

76

F'200'}
. 000000C8
FL4' 200' Equiv.

Mnemonic Operation Codes
for Privileged Operations

NOTE 2: When NOAL1GN is s~ecified,
the CNOF assembler instruction can
ce used to ensure the correct
alignment of data referred to ty
the privileged instructions that
require specific boundary alignment.
The mnemonic operaticn codes for
these instructions are listed in
the figure to the right.

Meaning

LPSW

Load program status word

ISK

Insert Storage Key.

SSK

Set Storage Key.

LCTL

Load Control registers.

SCK

Set Clock.

STIDP

Store CPU Identification

STCTL

Store Control registers.

(Diagnose· not handled by assembler)

Section D:

Machine Instructions

77

D3 -- Statement Formats
Length of Object Code
Regu ired for the Assembled
Instruction in Bytes

Format

Machine instructions are assembled
into object code according to one
of the six formats given in the
figure to the right.
When you code machine instructions
you use symbolic formats that
correspond to the actual rrachine
language formats. within each casic
format, you can also cede variations
of the symbolic representation
(Examples of coded rrachine
instructions, divided into groups
according to the six basic formats,
are illustrated in [6 below).

O
•
•

O,

•

78

The assembler converts only the
operation code and the oper and
entries of the assembler language
statement into object code. The
assemcler assigns tc the symbol
you code as a name entry the value
of the address of the leftmost
byte of the assembled instruction.
When you use this same symbol in
the operand of an assembler language
statement, the asserrbler uses this
address value in converting the
symbolic operand into its object
code form. The length attribute
assigned to the symbel de~ends on
the basic machine language format
of the instruction in which the
symbol appears as a name entry
(for details on the length attribute
see C4C) •
A remarks entry is net converted
into object code.

RR

2

RX

4

R8

4

81

4

8

4

88

6

o

(L'LABEL=4)

Example:
Assembler Language Statement

•

LABEL

4,256(5,10)

L

•
RX Format

~ ~----------------Operation Register
Code
Operand

1-·-------

4 bytes

Object Code
(machine language) ot
Assembled Instruction
in Hex

Storage
Operand

------1

". D4 - Mnemonic Operation Codes

Furpose
You rrust s~ecify an c~eraticn code
for each machine instruction
staterrent. !he rrnerrcnic cperaticn
code indicates the type of cperaticn
to te perforrred; fcr e~am~le, "A"
indicates the "addition" cperation.
Appendix IV ccntains a corrplete
list of mnemonic operation codes
and the fcrrrats of the corresponding
machine instructions.

VERB [MODIFIER] [DATA TYPE] [MACHINE FORMAT]

Examples:

Specificaticns
general format of the machine
instructicn c~eraticn ccde is sho~n
in the figure to the right.

~he

o

!he vert rrust always be present.
It usually consists of one or two
characters and s~ecifies the
operation to te perforroed. !he
other iterrs in the c~eration code
are not always present. !hey
include:

8.the'Ihe modifier

which further defines

c~eraticn

• • The type qualifier, which
indicates the type of data used
ty the instructicn in its o~eration,
and
•

• !he fcrrrat qualifier, R cr I,
which indicates that an RR or SI
rrachine instructicn fcrrrat is
assemtled.

o /.

A

T9~1fROM

MVC

e{

AL
-Io-gi-ca-I"'"

"'-1

3,BINl\REA

CVB
1r--bi-n-ar-y"""l

TQiE'ROM

MVC

•

-ch-a-ra-c-te-r"'"

'-1

-

2,FLTSHRT
AD
"- normalized long
floating-point

AR

•

F'IELQ;X 1 Al'

section D:

Machine Instructions

79

D5 -- Operand Entries

Furpose
You rrust s~ecify cne cr mcre o~erands
in each machine instructicn staterrent
to ~rcvide the data cr the location
of the data upon which the machine
operaticn is tc be ~erfcrrred. ~he
operand entries consist of cne cr
rrore fields cr subfields de~ending
on the format of the instruction
teing ccded.
~hey can s~ecify a
register, an address, a length,
and irrrr.ediate data.
You can code an operand entry either
with syrrbcls cr with self-defining
terms. You can omit length fields
or sutfields, which the assembler
~ill compute for you from the ctter
cperand entries.

General Specifications for Coding
Operand Entries
~he

o

rules for coding operand entries
are as fcllcws:

P! comma must separate operands.

~Farentheses rrust enclcse subfields.

O

A corrrra rrust seEarate subfields
enclosed in parentheses.

If a sutfield is crritted because
it is in implicit in a symbolic
address, the farentheses that would
~have enclosed the sutfield rrust
te crritted.

80

0
1/

LM

4, 8, SAVE5

MVI

4 (12),C'F'

MVC

TO (80), FROM

MVC

o (80:S), 240(8)

MVI

4

'e
.,/

•

~

MVI

/

~(,

C'F'

KEY C 'F'

'
Implicit
Address
See D5B

If twc sutfields are enclcsed in
parentheses and separated ty eOITrras,
the fcllcwing a~~lies:

•

•

•

•
•

~\
-.-

If both subfields are orr.itted tecause
they are irr~licit in a sy~bclic
entry, the separating eomrra and
the ~arentheses tha t "culd have
been needed must also te omitted.

L

2,48(4,5)

L

2,FIELD

If the first subfield is
the ~ that separates
the second subfield ITust
as well as the enclosing

L

2,48(4,5)

L

2,48

emitted,
it troIT
be \\ritten
parentheses.

If the seccr.d subfield is oroitted,
the £9!!!.!!@. that separates it trcIT,
the first subfield ITust be omitted,
however, the enclosing parentheses
ITust te written.
~OTE:
Elanks must not appear within
the c~erand field, exce~t as ~art
of a character self-defining terrr
or in the s~ecif1cat1cn cf a
character literal.

~ Implicit
Address
See D5B

(r:s;-

I

Index Register
is omitted

8 a(

MVC

/
Length
32 ( ,1.0) , 4
10 ) Specification
I
is omitted
32 (8,10) ,40 (10)

MVC

32 (16,6) ,48 (6)

MVC

G\
MVC

TO(l 6)

,~F~R~O~M______~

L_I

Base Register
implicit in symbolic
address TO

MVC

32 (C '

I ' ,5) ,=CL6 4 ' AI B '

o

Section D:

e

Machine Instructions

81

~5A

-- REGISTERS
Purpose and Usage
You can specify a register in an
operand for use as an arithmetic
accumulator, a base register, an
index register, and as a general
depository for data to which you
wish to refer over and over.
You must be careful when specifying
a register whose contents have been
affected by the execution of another
machine instruction, the control
program, or an IEM-supplied system
macro instruction.
For some machine instructions you
are limited in which registers you
can specify in an operand.

Registers
Specifications
~he

expressions used to specify
registers must have absolute values;
in general, registers 0 through
15 can be specified for machine
instructions. However, the following
restrictions on register usage
apply:
1. The floating-point registers
(0, 2, 4, or 6) must be specified
~ for floating-point instructions:

2. The even numbered registers (0,
2, 4, 6, 8, 10, 12, 14) must be
specified for the following groups
of instructions:

••
•
A
~

a.

The double-shift instructions

b. The fullword multiply and
divide instructions
c. The move long and compare
logical long instructions.
3. The floating-point registers
and 4 must be specified for the
instructions that use extended
floating-point data:
AXR, SXR, LRDR, MXR, MXDR, MXt.

o

NOTE: The assembler checks the
registers specified in the
instruction statements of the above
groups.
If the specified register
does not comply with the stated
restrictions, the asserrbler issues
a diagnostic message and does not
assemtle the instructicn.

82

Operation Code

REGISTER USAGE BY MACHINE
INSTRUCTIONS: Registers that are
not explicitly coded in the symbolic
assembler language representation
of machine instructions, but are
nevertheless used by the assembled
machine instructions, are divided
into two categories:
1. The base registers that are
implicit in the symbolic addresses
specified. These implicit addresses
are described in detail in D5B.
The registers can be identi fied
by examining the object ccde of
the assembled machine instruction
or the USING instructien(s) that
assigns base registers for the
source module.

O
•

Source Module

START
BALR
USING

Object Code
in Hex

0
12,0

~:: ,12 •

•

L

3,FIELD

IS813lolelxxxi

M

4,TWQ

Ise 141 0 Ie I xxxi

2. The registers that are used by
machine instructions in their
operations, but do not appear even
in the asserrbled object cede. They
are as follows:
a. For the double shift and
fullword multiply and divide
instructions, the odd-numbered
register whose number is one
greater than the even-numbered
register specified as the first
operand.

•
•

b. For the Move Long and Compare
Logical Long instructions, the
odd-numbered registers whose
number is one greater than the
even numbered registers specified
in the two operands.

•

c. For the Branch on Index High
(BXH) and the Branch on Index
Low or Equal (EXLE) instructions;
if the register specified for
the second operand is an evennumbered register, the next
higher odd-numbered register
is used to contain the value
to be used for comparison.

..

MveL

4 6

BXH

3,4,ADRESS

TRT

/86/3/4Ielxxxl

ARGUMENT(10),TABLE

d. For the Translate and Test
(TRT) instruction, registers
1 and 2 are also used.

•

e. For the Load Multiple (LM)
and Store Multiple (STM)
instructions, the registers that
lie between the registers
specified in the first two
operands.

I 98 r3 17 1e Ixxxi

LM

REGISTER USAGE BY SYSTEM: The
control program of the IEM System/370
uses registers 0, 1, 13, 14, and
15.

Section D:

Machine Instructions

83

D5B -- ADDRESSES

purpose and Definition
You can code a symbol in the name
field of a machine instruction
statement to represent the address
of that instruction. You can then
refer to the symbol in the operands
of other machine instruction
statements. The object code for
the IBM Systero/370 requires that
all addresses be assembled in a
numeric ~ase-displacement format.
This format allows you to specify
addresses that are relocatable or
absolute.
You must not confuse the concept
of relocata~ility with the actual
addresses that are coded as
relocatable, nor with the format
of the addresses that are assembled.
DEFINING SY~BOLIC ADDRESSES: You
define symbols to represent either
relocatable or absolute addresses.
You can define relocatable addresses
in two ways:
•

By equa ~ing a symbol to a relocatatle
•

express~on.

•

You can define absolute addresses
(or values) by equating a symbol
to an absolute expression.

o

Symbolic
Addresses
(Defined)

By us ing a symbol as the label in
the name field of an assembler
language statement or

REFERRING TC ADDRESSES: You can
refer to relocatable and absolute
addresses in the operands of machine
instruction statements. Such address
references are also called addresses
in this manual. The two ways of
coding addresses are:
Implicitly: that is, in a form
that the assembler must first convert
into an explicit base-displacement
form before it can be assembled
into object code.

••
•

Address
References

DC

EQU [IU~Tf,t;

Explici tly: that is, in a form
that can be directly assembled into
object code.

3,

L

4 ,;llt1l4t!NQ~

L

4,

B

rr;QAJJ;mO

.'~'~

Relocatable
Addresses

~,~·r!:,:(;·I2:).

EQU

LA

LA

84

l:,(n'i5'f",.".~'
,J'

L

LA

•

3F'370'

Absolute
AddreSses

)'

Relocatability of Addresses
Source Module

Addresses in the base-displacement
form are relocatable, because:
• Each relocatable address is
assembled as a displacement from
a base address and a base register.

8
•

• The base register contains the
base address.

• If the object module assembled
from your source module is relocated,
only the contents of the base
register need reflect this
relocation. This means that the
location in virtual storage of your
base has changed and that your base
register must contain this new base
address.
• Your addresses have been assembled
as relative to the base address;
therefore, the sum of the
'
displacement and the contents of
the base register will ~oint to
the correct address after relocation.
NOTE: Absolute addresses are also
assembled in the base-displacement
form, but always indicate a fixed
location in virtual storage. This
means that the contents of the base
• . register must always be a fixed
absolute address value regardless
of relocation.

START
BALR
USING

Base

Object Code
in Hex

0

Co
LO

c.J

X

...c
II

Q)

...c
II

Q)

E

Q)

E

u

].

~
i:5

~

i:5

co

I Displacement I

TO
DS
FROMDS

CL80
CL240

Register 0 as a base
register is always
considered to contain
the absolute address
location 0

LA

END

Section D:

Machine Instructions

85

Page of GC33-4010-4
Revised July 31, 1976
By TNL: GN33-8207

Specifications

Addresses
~ACHINE

All addresses asserrbled
into the object cede of the IBM System/370 machine.
instructions have the format given in the figurel:elow.

Format

OR OBJECT COrE FORMAT:

Coded or Symbolic
Representation of
Explicit Addresses

Object Code
Representation
of Addresses

8 bits
4 bits 4 bits 4 bits
12 bits
4 bits I 12 bits
Operation
Base Displacement Base Displacement
RegCode
Register
ister

-:-R3-I:cl~,J

RS

D2 (B2)

OPCO-D-E:-j'
,l
- - - - - - -' - - - -' - - - -

SI

DI(BI)

OP CODE: . -- i£ -- -, mI;t'w;mJ:~:~1I

SS

DI (,BI) ,D2 (B2)

RX

D2 (X2 ,B2)

S

-

-

-

-

.. ..

-

.. .. .. ..

.. -

-

~<~: ..' ":~~«,;:"

_".... ~

......,'"

"""'"

""'.... ,"'"«~ttw. <.,.,.....,,,_"~;..A

DI(BIl

R 1 and R3 represent registers
12
represents an immediate value
L
represents a length value

The addresses represented have a value which is the sum
of:

O.
G.
•

86

A displacement and
The contents of a base register.

NOTE: In RX instructions, the address represented has
a value which is the sum of a displacement, the contents
of a base register, and the contents of an index register.

Implicit Address

Source Module

An implicit address is specified
by coding one expression.
The
expression can be relocatable or
absolute.
The assembler converts
all implicit addresses into their
case-displacement form before i t
assembles them into object code.
The assembler converts im~licit
addresses into explicit addresses
only if a USING instruction has
been specified. The USING
instruction assigns both a base
address, from which the assembler
computes displacements, and a base
register, to contain the base
address.
The base register must
ce loaded with the correct base
address at execution time. For
details on how the USING instruction
is used when establishing
addressability, thus allowing
implicit references, see F1.

8
•

,.

START
BALR

AREA

Object Code
in Hex

USING

0
12,0
::~, 12

L

3,AREA

DS

.

F

LA

4,1000

0I I xxx I

158 13 10 C

/\

"

END

~

tDisPlacementl

Base Registerl

0

14 1141010

/

13E81

'"

Always used as
base register for
absolute address
between 0 and
4095

~
Displacement

Explicit Address
An explicit address is specified

by coding two absolute expressions
as follows:

•

•

The first is an absolute expression
for the displacement, whose value
must lie in the range 0 through
4095 (4095 is the maximum value
that can be represented by the 12
binary bits available for the
displacement in the object code) •

LA

4,X'400' (,10)

L

3,AREA(4 )

The second (enclosed in parentheses)
is an absolute expression for the
tase register, whose value must
lie in the range 0 through 15.
If the base register contains a
value that changes when the program
is relocated, the assembled address
is relocatatle.
If the base register
contains a fixed absolute value
that is unaffected by ~rogram
relocation, the assembled address
is acsolute.

•

Source Statement

NOTES (for implicit and explicit
addresses) :
1. An explicit base register
designation must not accorepany an
implicit address.
2. However, in RX instructions an
index register can be coded with
an implicit address as well as with
an explicit address.
3. When two addresses are required,
one address can be coded as an
explicit address and the other as
an implicit address.

Object Code
in Hex

o

L

I IxxxI

1581 3 14 c

[5]l3!4Ic 11001

MVC

8

Section D:

Machine Instructions

87

D5C -- LENGTHS

Purpose
You can specify the length field in an SS-type instruction.
This allows you to indicate explicitly the number of bytes
of data at a virtual storage location that is to be used
by the instruction.
However, you can omit the length
specification, because the assembler computes the numter
of bytes of data to be used from the expression that
represents the address of the data.
Specifications
IMPLICIT LENGTH: When a length subfield is omitted from
an SS-type machine instruction an implicit length is
assemtled into the object code of the instruction. The
implicit length is either of the following:

O

1. For an implicit address (see DSB above), it is the
length attribute of the first or only term in the expression
representing the implicit address.

•

2. For an explicit address (see D5B above), it is the
length attribute of the first or only term in the expression
that represents the displacement.
'
For details on the length attribute of symtols and other
terms see C4C.

e

EXPLICIT LENGTH: When a length sutfield is specified in
an SS-type machine instruction, the explicit length thus
defined always overrides the implicit length.
.
NOTES:

1. An implicit or explicit length is the effective length.
The length value assembled is always one less than the
effective length.
If an assembled length value of 0 is
~desired, an explicit length of 0 or 1 can te specified.

•,

2. In the
allowable
In the SS
allowable

88

SS instructicns requiring one length value, the
range for explicit lengths is 0 through 256.
instructions requiring two length values, the
range for explicit lengths is 0 through 16.

Lengths

Assembler
Language
Statement

Length Attribute
of term (symbols)

Object Code
in Hex
L= Length Value

G

•
L

Implicit Lengths

MVC

LITO

TO,FROM

=

Address

TO

FROM

I D214F Ixxxx IxXXX']

80

0
L

= 80

MVC

TO+80,FROM

LITO

AP

AREA, TWO

L'AREA
L'TWO

0

MVC

IFAI7131 xxxxi xxxxi

\

I D21 00 I AOOO IA050 I

0 ( , 10) , 80 (10 )
I

L

)ROM -TO ( , 10) , 80 (10)

L'FROM

=24Q
I

Explicit Lengths

TO (16Q) ,FROM

I D21 EF I AOAO IA050 I

...

0

.

MVC

L1 L2

= ig!
= )4

L

•

MVC

ID214F)xxxxlxxxxl

LITO

Address

TO

0
MVC

o (80 , 10) , 80 ( 10 )

1

CLC

I
0(1,10) ,256(10)

1

CLC

0(b,10) ,256(10)

1

TO
FROM
AREA
TWO

DS
DS
DS
DC

FROM

I D219FI xxxx Ixxx~

= 80
..

•
•

L

ID214FIAOOOIA0501

•

ID5100lAOOOIA1001

•

ID5100lAOOOIA1001

CL80
CL240
PL8
PL4 1 2 1

Section D:

Machine Instructions

89

D5D -- IMMEDIATE

~ATA

Purpose
In addition to addresses, registers, and lengths, sorr.e
machine instruction operands require immediate data. Such
data is assembled directly into the object code of the
machine instructions. You use immediate data to specify
the bit patterns for masks or other absolute values you
need.
You should be careful to specify immediate data only where
it is required. ~o not confuse it with address references
to constants and areas or with any literals you specify
as the operands of machine instruction (for a compariscn
between constants, literals, and immediate data, see C5).

Specifications
Immediate data must be specified as absolute expressions
whose range of values depends on the machine instruction
for which the data is required.
The immediate data is
~ assembled into its 4-bit or a-bit tinary representaticn
according to the figure on the opposite page.

90

~

'.

I mmed~, Data
';

.'

Machine Instructions
in which immediate
data is required
(Op codes in
Appendix IV)

SRP

(SS)

Range of Values
allowed for
immediate data

o through 9

'...

j,'
'.~ '. ~ ., ~

Object Code
in Hex

Examples

SRP

J

A'B'~
IFOl7131xxxxlxxxxi

~~-S

/
I

Length ofl
Field A

All BCR
All BC

(RR)
(RX)

a through
a through

15
15

BCR

~O

BC

11,AAA 1471 B 1 0 I xxx x 1

(RS)

o through 15

"

107 18 13 1

,

1

ICM
STCM
CLM

Addresses

~

AAA
Address

/0

•

STCM 3,X'F':BBB IBE131F\xxxxl

-----BBB

Address

NI
CLI
XI
MVI
OI
TM
RDD
WRD

(SI)

SVC

(RR)

a through 255

CLI
TM

o through 255

SVC

•
•

SLOT,C'A~

Address

SLOT
~

1 95 1C11 xxxx I

KEY,X'}F:J 19117Fl xxxx

•

i

-..,..........
Address
KEY

I OAI80

Section D:

I

Machine Instructions

91

D6 - Examples of Coded Machine Instructions
The examples in this sutsection
are grouped according to rrachine
instruction format. They illustrate
the varieus ways in which yeu can
code the operands of machine
instructions. Both syrrbolic and
numeric representation of fields
and subfields are shewn in the
examples. You must therefore assurr.e
that all symbels used are defined
elsewhere in the same source module.
'lhe otject cede assembled from at
least one coded statement per group
is also included. A cemplete summary
of machine instruction formats with
the ceded assembler language variants
can be found in Appendix III and
IV.

RR Format
You use the instructiens with the
RR format mainly to move data tetween
registers.
~he operand fields must
th us desig-nate registers, with the
following exceptions:

o

In BCR branching instructions when
a 4-tit tranching rrask re~laces
the first register specification

•

In'SVC instructions, where an
immediate value (tetween a and 255)
replaces both registers .

•

Name

Operation

ALP HAl

LR

1,2

ALPHA2

LR

INDEX,REG2

GAMMA 1

BCR

DELTA1

svc

200

DELTA2

SVC

TEN

Operand

¥

0 8 ,12

0

NOTE: Symbels used in RR
instructions are assumed to be
equated te absolute values tetween
o and 15.
Assembly Examples:
Assembler Language Statement

ALPHAl

LR

Object Code of
Machine Instruction
in Hex

1,2~____------_

RR Format
operationl Register
Operands

lCode

2 bytes

92

I

RX Format
You use the instructions with the
RX format mainly to move data between
a register and virtual storage.
By adjusting the contents of the
index register in the RX-instructions
you can change the location in
virtual storage being addressed.
The operand fields must therefore
designate registers, including index
registers, and virtual storage
addresses, with the following
exception:
branching instructicns a 4bit branching roask, with a value
between 0 and 15, replaces the first
register specification.
In Be

•

NOTES:
•

1. Symbols used tc represent
registers are assumed to be equated
to absolute values between 0 and

Name

Operation

Operand

ALPHA1

L

1,200(4,10)

ALPHA2

L

REG1,200(INDEX,BASE)

BETA1

L

2,200(,10)

BETA2

L

GAMMA 1

L

GAMMA 2

L

DELTA1

L

4 , :::FJ:3:3~i'

LAMDA1

BC

7, DISPL ( , BASE)

LAMDA2

BC

~®~

@'

Literal Specification
See C5

~------I

Assembly Examples:

15.
Assembler Language Statement

•

)

Object Code of
Machine Instruction
in Hex

2. Symbols used to represent implicit
addresses can be either relocatable
or absolute.

3. Symbols used to represent
~ displacements in explicit addresses
are assumed to be equated to absolute
values between 0 and 4095.

ALPHA1

L

l,200(4,lO~

o C

5
Operation
RX Format

Code

5

GAMMA 1

8

II I

Registers
R1

8

Displacement

Base from Base

x

X

xl

2,IMPLICIT(4)

Section D:

Machine Instructions

93

RS Format
You use the instructions with the
RS format mainly to move data between
one or more registers and virtual
storage or to compare data in one
or more registers (see the BXH and
BXLE operations in Appendix IV).
In the Insert Characters under Mask

O

(IeM) and the store Characters Under
Mask (STCM) instructions, when a
4-bit mask, with a value between
o and 15, replaces the second
register specification.

Name

Operation

Operand

ALPHAl

LM

4,6,20(12)

ALPHA2

LM

REG4,REG6,20(BASE)

BETAl

STM

4,6, AREA

BETA2

STM

4,6,DISPL(BASE)

GAMMA 1

SLL

2,15

GAMMA 2

SLL

2,0(15)

DELTA1

ICM

DELTA2

ICM

~8-----

O

o

NOTES:
•

•

o

1. Symbols used to represent
registers are assumed to be equated
to arsolute values between 0 and
15 •
2. Symbols used to represent implicit
addresses can be either relocatable
or arsolute.
3. Symbols used to represent
displacements. in explicit addresses
are assumed to be equated to absolute
values between 0 and 4095.

o

Assembly Examples:
Assembler Language Statement

ALP HAl

RS Format

DELTA1

94

REG3}~S~, IMPLICITO

Object Code of
Machine Instruction
In Hex

Page of GC33-40tO-O
Revised September 29, 1972
ny TNL GN33-8148

SI Format
You use the instructions with the
SI format mainly to move immediate
data into virtual storage.
The
operand fields must therefore
designate iRmediate data and virtual
storage addresses, with the following
exception:
•

Operation

Name

An immediate field is not needed
in the statements whose o~eration
codes are: LPSW, SSM, TS, TeH, and
TIO.

•

ALPHAl

eLI

ALPHA2

eLI

BETAl

eLI

BETA2

eLI

Operand

40(9),X'40'

~DISPL40 (NINE) '1I~~4Q
8-rMPLICIT ,!l.'l;;W...-

8

"KEY ,e 'E'

{GAMMAl

LPSW

0(9)

GAMMA 2

LPSW

NEWSTATE

---0

NOTES:

8
8

1. Symbols used to re~resent
immediate data are assumed to be.
equated to absolute values between
o and 255.

Assembly Examples:

2. Symbols used to represent implicit
addresses can be either relocatable
or absolute.

Assembler Language Statement

3. Symbols used to

ALPHAl

re~resent

~ displacements in explicit addresses

Object Code of
Machine Instruction
In Hex

are assumed to be equated to absolute
values between 0 and 4095.

SI Format

Section D:

Machine Instructions

95

Page of GC33-401O-0
Revised September 29, 1972
By TNL GN33-8148

Mnemonic
Operation
Codes

Description

Assembled
Operation
Code in
Hex

SIO

9COO

Start I/O

SIOF

9C01

Start I/O fast
release

HIO

9EOO

Halt I/O

HDV

9E01

Halt Device

STIDP

8202

Store CPU ID

You use the instructions with the
S format to perform I/O and other
system operations and not to move
data in virtual storage.

STIDC

8203

Store Channel
ID

SCK

8204

Set Clock

The operation codes for these
instructions are given in the figure
to the right. They are asserobled
into two bytes.

STCK

8205

Store Clock

SCKC

8206

Set Clock Comparator

STCKC

8207

Store Clock Comparator

SPT

8208

Set CPU Timer

STPT

8209

Store CPU Timer

PTL8

820D

Purge Translation
Lookaside 8uffer

RR8

8213

S Format

96

'.

Reset- Reference 8it

I

SS Format
You use the instructions with the
SS format mainly to move data between
two virtual storage locations.
The operand fields and subfields
must therefore designate virtual
storage addresses and the explicit
data lengths you wish to include.
However, note the following
exception:
•

In the Shift and Round 'Cecimal (SRP)
instruction a 4-bit irrmediate data
field, with a value between 0 and
9, is specified as a third operand.
NOTES:

•

•

1. Symbols used to represent base
registers in explicit addresses
are assumed to be equated to absolute
values between 0 and 15.
2. Symbols used to represent explicit
lengths are assumed to be equated
to absolute values between 0 and
256 for SS instructions with one
length specification and between
o and 16 for SS instructicns with
two length specifications.

Name

Operation

Operand

ALPHAl

AP

40(9,8) ,30(6,7)

ALPHA2

AP

40 (NINE,BASE8) ,30(SIX,BASE7)

ALPHA3

AP

FIE~l,FIEL~G

ALPHA4

AP

AREA(9) ,AREA2(6)

ALPHAS

AP

DISP40 (,8) ,DISP30 (,7)

".>

102

END

processed as comments
statements if the
LI BMAC option is
set (see J8A)

Page of GC33-401D-4
Revised July 31, 1976
By TNL: GN33-8207

"I:

OS~

/1

only

I
DOS

NOTE: Conditional assembly processing
can determine which of several
substituted END instructions is to be
processed. The conditional assembly
language is described in Section.L.
Only one END instruction is allowed.
The assembler does not process any
instruction that follows the ENe
instruction.

E1A --

~HE

COpy INSTRUCTICN

COpy
Purpose
Source Statement

I

The CCpy instruction allows you
to copy predefined source statements
from a library and include them
in a source module.
Yeu thereby
avoid:
1. Writing the same, often-used
sequence of code over and over

Source Module

START

COpy EQUATES

+

2. Keypunching and handling the
punched cards for that code.
END
.I

First Input
to Assembler
Program

END
Effective
Input to
Assembler
Program

Section E:

Program Sectioning

103

Specifications
The format of the COpy instruction
statement is shown in the figure
to the right.

Narre

Operation

Operard

Blank

COpy

One ordinary
Symbol

Toe symbol in the operand field
must identify a part of a library
called:
A member of a partitioned data
set

Source Module
begin

1

continue

10

16

COpy

CODE2

This member (or beek) centains the
coded source statements to be copied.
The source coding that is copied
into a source module:

~.

Is inserted immediately after
the CCPY instruction

•

•
Is inserted and ~recessed
according to the standard instruction
statement coding forrrat (described
in B1~ , even if an ICTL instruction
has been specified
• Must. not contain either an ICTL
or ISEQ instruction

• • Can contain a COpy instruction.
Up to 5 levels of nesting of the
COpy instruction are allowed.

• • Can con~ain macro definitions
(see Sectl.on J) •
If a source macro definition is
copied into the beginning of a
source module, both the MACRO and
MEND statements that delimit the
definition must be contained in
the same level of copied code.
NOTES:
1. The COpy instruction can also
be used to copy statements into
source macro definitions (see J5C).
2. The rules that govern the
occurrence of assembler language
statements in a source module
also govern the statements copied
into the source module.

104

END

end
71 Columns

Library
(Partitioned
data set)

E1B -- THE END

INSTRUC~ION

Purpose
You use the END instruction to mark
the end of a source module.
It
indicates to the asse~bler where
to stop assembly processing. You
can also supply an address in the
operand field to which control can
be passed when your program is
loaded. This is usually the address
of the first executable instruction
in a source module.

Specifications
~he format of the END instruction
statement is shown in the figure
to the right.

Operation

Name

A sequence
symbol or
blank
If specified, the operand entry
can be generated by substitution
into variable symbols. However,
after substitution, that is, at
assembly time:

o

1. It must be a relocatable
expression representing an address
in the source module delimited
by the END
instruction, or

Operand

END

A relocatable
expression or
blank

Source Module A

A
START
ENTERA BALR
USING
ENTRY

o
12,0
):c,12
ENTERA

~ 2. If i t contains an external symbol,
the external symbol must be the
only term in the expression, or
~ the remaining terms in the expression
must reduce to zero.

END

3. It must not be a literal.

o

ENTERA

Source Module B
B

o

START
BALR
USING
EXTRN

);c,ll
ENTERA

END

ENTERA + (Subexpression)

11,0

• •

Section E:

Program Sectioning

105

This page left blank intentionally.

E2 - General Information About Control Sections
Contrl Sect.

A control section is the smallest subdivision of a prcgram
that can be relocated as a unit. The assembled control
sections contain the object code for machine instructions,
data constants, and areas.

Section E:

Program Sectioning

107

E2A -- AT DIFFERENT PROCESSING TIMES

Consider the concept of a control section at different
processing times.
40tAT CODING TIME: You create a control section when you
write the instructions it contains. In addition, you
establish the addressability of each control section within
the source module, and provide any symbolic linkages between
control sections that lie in different source modules.
You also write the linkage editor control statements to
combine the desired control sections into a load IT,odule,
and to provide an entry point address for the beginning
of program execution.

e
e

AT ASSEMBLY TIME: The assembler translates the source
statements in the control section into object code. Each
source module is assembled into one object module. The
entire object module and each of the control sections it
contains is relocatable.
AT LINKAGE EDITING TIME: According to linkage editor ccntrol
statements, the linkage editor combines the object code
of one or more control sections into one load module.
It also calculates the linkage addresses necessary for
communication between two or more control sections frcIT
different object modules. In addition, it calculates the
space needed to accommodate external dummy sections (see
E4) •

e

AT PROGRAM FETCH TIME: The control program loads the load
module into virtual storage. All the relocatable addresses
are converted to fixed locations in storage.

e

AT EXECUTION TIME: Ihe control program passes control
to the load module now in virtual storage and your program
is executed.
NOTE: You can specify the relocatable address of the
starting point for program execution in a linkage editor
control statement or in the operand field of an END
statement.

108

CODING
TIME

ASSEMBLY
TIME

Source
Modules

LINKAGE
EDIT
TIME
Object
Modules

PROGRAM
FETCH
TIME

EXECUTION
TIME

Load
Modules

X'23000'

First
Program

X'40000'

Second
Program

~III

Section E:

Program Sectioning

109

E2B -- TYFES

Executable Contrcl Sections

o

An executable control section is
one you initiate by using the START
or CSECT instructions and is
ass embled into object code. At
execution time, an executable control
section contains the binary data
assembled from your coded
instructions and constants and is
therefore executable.
Assembly
Time

An executable control section can

also be initiated as "private code",
without using the S~AR~ or CSECT
instruction (see E2E) •

Execution
Time

Source Module

Object Module

I

EXEC START

EXEC

Reference Control Sections

4It

I')L

•

•

110

I

A reference control section is one
you initiate by using the DSEC~·,
COM, orOXO instruction and is not
assembled into object code. You
can use a reference control section
either to reserve storage areas
or to describe data to which you
can refer from executable centrol
sections. These reference control
sections are considered te be empty
at assembly time, and the actual
binary data to which they refer
is not entered until execution time.

Load Module

~.
' - - - -.....

REFER COM

.--:8·
I

Lr---

•

I

Empty of data

E2C -- LOCATION

COUN~ER

SET~ING

The assembler maintains a separate
location counter for each control
section. The location counter
setting for each centrel section
starts at O. The location values
assigned to the instructiens and
other data in a control section
are therefore relative to the
location counter setting at the
beginning of that centrol section.
However, for executable control
sections, the location values that
~appear in the listings do not restart
~at 0 for each subsequent executable
control section. They carryon
from the end of the ~revious centrel
section. Your executable control
sections are usually loaded into
storage in the order you write them.
You can therefore match the source
statements and object code produced
from them with the centents of a
dump of your program.

O

Listed Location

Source McxJule

in hex

o

o

ONE

DOS For executable contrel sections,
the location values that appear
in the listings always start from
0, except the control section
initiated by a START instruction
with a non-zero operand entry.

e

For reference contrel sections,
the location values that appear
in the listings always start from

END

O. Q.

Section E:

Program Sectioning

111

Location
in Hex

o

•
os

You can continue a control section
that has been discontinued by anether
control section and thereby
intersperse code sequences from
different control sections.
Note
that the location values that appear
in the listings for a contrel
section, divided into segments,
follow from the end of ene segment
to the beginning of the subsequent
segment.

oniyThelccatien yalueslistedfor the
. .,........·.·,.ne xt control sectiondefinedl:;egin
• . after the last loca ticn value
assignedto.the.preceding control
section ..

112

Source Module

E2D -- FIRST CONTROL SECTION ; SPECIFICATIONS
I

Any Machine Instruction
The Following Assembler Instructions:

The specifications below apply to
the first executable centrol section,
and not to a teference control
section.

•

INSTRUCTICNS THAT ESTAELISH THE
FIRST CONTROL SECTION: Any
instruction that affects the location
counter or uses its current value
estaclishes the beginning of the
first executable control section.
The instructions that establish
the first control section are listed
in the figure to the right.

o

The statements copied into a source
module by a COpy instruction, if
specified, determine whether or
not it will initiate the first
control section.

as

NOTE: The J:SECT, COM, and tXD
instructions initiate reference
control sections and do net establish
the first executable control section.

only

CCW
CNOP
(COPY)
CSECT
CXD
DC
DROP
DS
END
EQU
LTORG
ORG
START
USING

'\

/
These instructions are always
considered a part of the control
section in which they appear.

First Contrl Sect.
Source Module

~

ICTL
WHAT MUST COME BEFORE THE FIRST
CONTROL SECTION: The following
instructions or groups of
instructions, if specified, must
appear before the first control
section, as shown in the figure
to the right.

OPSYN

MACRO
MACl
MEND

• The ICTL instructien, which,
if specified, must be the first
statement in a source module

os

•

only

.

O

•

MACRO
MAC 2

The OPSYN instruction

MEND

Any source macro definitions
(see J1 B)

MACRO
MAC 3

• The COpy instruction, if the
code to be copied contains only
OPSYN instructions or complete macro
definitions.

These instructions or
macro definitions belong
to a Source Module, but
must appear before the
first control section.

MEND
.:

FIRST
..:..
.

..

:

...

.

.

START

First control
section

Section E:

. ..

....

Program Sectioning

113

WHA~ CAN CF~ICNALLY COV-E EEFORE
THE FIRST CON~ROL SEC~ION: ~he
instructions or groups of
instructions that can c~tionally
be s~ecified before the first control
section are shown in the figure
to the right.

O
•

Source Module

Any instructions cc~ied by a COpy
instruction or generated by the
process ing of a macro instruction
before the first control section
must belong exclusively to one of
the groups of instructions shown
in the figure to the right.
NOTES:

•
•·

1. The EJECT, ISEQ, PRINT, SPACE,
or TI~LE instructions and comments
statements must follow the ICTL
instruction, if specified. However,
they can precede or appear between
source macro definitions.
The OPSYN
instruction must (1) follow the
ICTL instruction, if s~ecified,
and (2) precede any source macro
definition specified.
2. All the other instructions of
the assembler language must follow
any source macro definitions
specified.

•

3. All the instructions or groups
of instructions listed in the figure
to the right can also appear as
part of a control section.

DXD
EJECT
ENTRY
EXTRN
ISEQ
PRINT
PUNCH
REPRO
SPACE
TITLE
WXTRN
Comments Statements

These instructions or groups
of instructions
belong to a
Source
Module, but
are not considered as part
of an executable
control
section.

I

I
Dummy Control Sections I

Common Control Sections

External Dummy Control Sections

I

Any Conditional Assembly Instruct.§]

114

E2E -- THE UNNAMED CONTROL SECTION
/.

The unnamed control section is an
executable .control section that
can be initiated in one of the
following two ways:

o

1. By coding a START or CSECT
instruction without a name entry

Type Code
Assigned for
External Symbol
Dictionary

PC

2. By coding any instruction, other
than the START or CSEC~ instruction,
that initiates the first executable
control section.

•

The unnamed control section is
sometimes referred to as private
code.

,

VSTART
J

.
END

-"'1\

PC

Notes

Unnamed Control
Sections in separate
Source Modules

l'

Unnecessary unless
dictated by specific
programming purpose

CSECT

.

All control sections ought to be
provided with names so that they
can be referred to symbolically:

END

1. within a source module
2. In EXTRN and WXTRN instructions
and linkage editor control statements
for linkage between source modules.
NOTE: Unnamed common control sections
or dummy control sections can be
defined if the name entry is omitted
from a COM or DSECT instruction.

4~ ~ BALR

PC

12,0
USING :::,12
END

)

Inadvertent and inadvisable initiation
of first control section: instead, precede
with a named
START instruction

PC signifies "private cade"

as Qnlyunnamed C=0Itlmon.control sections
(ini.tia ted .•. • by t:he .. COM. instruction)
.andnameddum1pY>control sections
(initiateclby .the ·:CSECTinstruction)

'ax:. ~~llow.ed.

Location
in hex

Source

Modul~

E2F -- LITERAL POOLS IN CONTROL
SECTIONS
Literals, collected into pools by
the assembler, are assembled as
part of the executable control
section to which the pools belong.
If a LTORG instruction is specified
at the end of each control section,
the literals specified for that
section will be assembled into the
~POOI starting at theLTORG
instruction. If no L~ORG instruction
is specified, a literal pool
containing all the literals used
in the entire source module is
assembled at the end of the first
control section. This literal pool
appears in the listings after the
• END instruction.

O

=A(ADR}

NOTE: If any control section is
divided into segments, a LTORG
instruction should be specified
at the end of each segrr.ent to crea te
a separate literal pool for that
segment.
(For a complete discussion
of the literal pool see H1B.)

END

section E:

Program Sectioning

115

E2G -- EXTERNAL SYMBOL DICTIONARY
ENTRIES

Name
Entry

The assembler keeps a record of
each control section and prints
the following information about
it in an External Symbol rictionary.

Instruction

START

optional

1. Its symbolic name, if cne is
specified
2. Its type code
3. Its individual identification
optional

4. Its starting address.

0

Type code entered into external
symbol dictionary

SD} itn.~e
SD

entry IS
present

CSECT
START

PC } itn.me

CSECT

PC

Any instruction that
initiates the unnamed
control section

PC

COM

CM

DSECT

none

EXTRN

ER

entry is
omitted

The figure to the right lists:

O

1. The assembler instructions that
define control sections and dununy
control sections or identify entry.
and external symbols,
2. The type code that the assembler
assigns to the control sections or
dummy control sections and to the
entry and external symbols.

•

NOTE: The total number of entries
identifying separate control
sections, dummy control sections,
entry symbols, and external symbols
in the external symbol dictionary
must not exceed 399. External
symbols identified in a Q-type
address constant and specified as the
name entry of a DSECT instruction are
counted twice in determining this
total.

•.

•

[··oos •.~.l1e·.··•.····.~~}ii~llxii . .•.~.~·~~9f:.·.~·.~·.~ ~~#~I· ·~~b~l
c;1 i c: ti()na:r:Y ·. ent~i.~~ .. ~C'?~¥I:'~~~er.~~l.l\lstrat:es
l?C:CltionC:?\ln.~~;->~E!~tingswhen . . using

the . . . as /VSassembler.)

120

Object Module

Hex

END

a

E3C --

THE DSECT INSTRUCTION

Purpose
You can use the DSECT instruction
to initiate a dummy control section
or to indicate its continuation.

A dummy control section is a
reference control section that
allows you to describe the layout
of data in a storage area without
actually reserving any virtual
storage.

How to Use a Dummy Control Section
~he

figure to the right illustrates
a dummy control section.

4Dt
~

•

A dummy control section (dummy
section) allows you to write a
sequence of assembler language
statements to describe the layout of
unformatted data located elsewhere in
your program. The assembler produces
no object code for statements in a
dummy control section and it reserves
no storage for the dummy section.
Rather, the dummy section provides a
symbolic format that is empty of
data. However, the assembler assigns
location values to the symbols you
define in a dummy section, relative
to the beginning of that dummy
section.
~herefore,

to use a dummy section

you must:

O.unformatted
Reserve a storage
data

area for the

Loc
in
Dec

Source Module

FIRST

START

. { LA

Object Module

0
10 ,BUFFER

US~N'O:UMMY ,10

•

~

o
o

1

4
24

44
54

62
68

o

CLI

KEY,C'X'

BUFFER

DSECT
KEY
DS
C
//
CODE
DS
CL3,/"/
NAME
DS
C~((
ADDR
DS .............. CL20
WAGES
D~/
CLIO
HRS
. . . . 11S
CL8
DEDuerf DS
CL6
P-AY
DS
CL12
END

• Ensure that this data is loaded
into the area at execution time
• Ensure that the locations of
the symbols in the dumrry section
actually correspond to the locations
of the data being described
• • Establish the addressability
of the dummy section in combination
with the storage area (see F1A) •

A

V

You can then refer to the unformatted
da ta symbolically by using the
symbols defined in the durr,my section.

S~ction

E:

Program Sectioning

121

Specifications
The DSECT instruction identifies
the beginning or continuation of
a dummy control section (dummy
section). One or more duromy sections
can be defined in a source module.
The DSECT instruction can be used
anywhere in a source module after
the ICTL instruction, or after any
source macro definitions that may
be specified.
The format of the J:SEC'I instruction
statement is given in the figure
to the right.

DSECT
Name
Any Symbol
or blank

Operation

Operand
Not required

DSECT

DOS
Or~jp~r'f
Symbotor

Variable
SYm~ol

•
•

The symbol in the name field, if
specified, identifies the dummy
section. If several J:SEC'I
instructions within a source module
have the same symbol in the name
field, the first occurrence ini tia tes
the dummy section and the rest
indicate the continuation of the
dummy section.

Location in

Hex

Source Module

FIRST

START

NOTE: A DSECT instruction with
a blank name field either initiates
or indicates the continuation of
the unnamed dummy section.
The symbol in the name field
represents the first location in
the dummy section and has a length
attribute value of 1.
The location counter for a dummy
section is always set to an initial
~value of O.
However, the
continuation of a dummy section
•
begins at the next available location
in that dummy section.

A

END

122

0

START

o

USING

DUMMYl,10 or USING A,10

DUMMY!
A '
B
C

DSECT
DS
OS
DS

H
H

SECOND

CSECT

ADCON

DC

FIRST

O

The source statements that follow
a DSECT instruction belong to the
dummy section identified by that
DSECT instruction.

G

CL30

0

o

NOTES:
1. The assembler language statements
that appear in a dummy control
section are not assembled into
object code.

e
•

~

A (FROM-TO

2. When establishing the
addressability of a dummy section,
the symbol in the name field of
the DSECT instruction or any symbol
defined in the dummy section can
be specified in a USING instruction.

3. A symbol defined in a dummy
section can be specified in an
address constant only if the syml:ol
, is paired with another symbol from
the same durrmy section, and if the
symbols have the opposite sign.

8

END

Section E:

Program Sectioning

123

E3C

THE COM INSTRUCTION

purpose
You can use the COM instruction
to initiate a cornmon control section
or to indicate its continuation.
A common control section is a
reference control section that
allows you to reserve a storage
area that can be used by two or
more source modules.

How to Use a COffmon Ccntrol Section
The figure to the right illustrates
a common contr.ol section.

O
•

Loc
in
Dec

A

A common control section (cornmon
section) allows you to describe
a common storage area in one or
more source modules.
When the separately assembled object
modules are linked as one program,
the required storage space is
reserved for the corrrr.on control
section. Thus, two or more modules
share the common area.
Only the storage area is provided;
the assembler does not assemble
the source statements that rrake
up a common control section into
object code. You must provide the
data for the common area at execution
time.

The assembler assigns locations
to the symbols you define in a
common section relative to the
beginning of that corr.mon section.
This allows you to refer symbolically
•
to the data that will be loaded
at execution time. Note that you
~must establish the addressability
of a common control section in every
-source module in which it is
specified (see F1A).
If you code
identical common sections in two
or more source modules, you can
communicate data symbolically cetween
these modules through this common
section.
NOTE: You can also code a common
control section in a source module
written in the FORTRAN language.
This allows you to communicate
tetween assemtler language modules
and FCRTRAN modules.

START 0
~{L lO,=A(AREA)

•

USING AREA,lO
ST

3,SUM

~o

60

0
B

START 0
~{L

8,=A(AREA)
USING AREA,8

•

124

Source Modules

L

~o
60

0
END

•

3,SUM

Object Modules

Page of GC33-4010-()
Rev iscd September 29, 1972
By TNL CN33-8148

Specifications

The COM instruction identifies the
beginning or continuation of a
common control section (common
section) •
One or more comrr:cn sections can
be defined in a source module.
Only. OIle common section can be
defined.

COM

The COM instruction can be used
anywhere in a source module after
the ICTL instruction, or after any
source macro definitions that may
be specified.

Name

Operation

Any Symbol
or blank

The format of the COM instruction
statement is given in the figure
to the right.

Operand
Not required

COM

OOS.Ml.Jst~

.~.~t~nl(

Source Modules

Location in
Decimal

os The symbol··· in the name field, if
only. specified,identifiesthe common
control section. IfseveralCOM
instructions within a source module
have th~same$ymbol.inthename
. field,.the first occurrence .
,

START

A

0
Reserved Storage
for common control
section XYZ when
modules A and B
are linkage edited

!~~t~:;~." i~~~c~~~~eSd6~~i~ua~~on
of.the common.section.

NOTE: A COM instruction with a
blank name field either initiates
or indicates the continuation of
the unnamed common section.
The symbol in the name field
represents the address of the first
byte in the common section and has
a length attribute value of 1.

•

The location counter for a common
section is always set to an initial
value of O. However, the
continuation of a COIT.Irion secticn
begins at the next availacle location
in that common secticn.

If a common section with the same
name (or unnamed) is specified in
two or more source modules, the
~ amount of storage reserved for this
common section is equal to that
required by the longest common
section specified.

•
0
0
80

START

B

0

1200

•
bytes

XY

TO
FROM

COM
DS
DS

Section E:

CL80
CL240

Program Sectioning

125

•

The source statements that follow
a COM instruction belong to the
common section identified by that
COM instruction.

Source Module

FIRST

NOTES:
1. The assembler language statements
that appear in a common control
section are not assembled into
object code.
~
~

START
USING

2. When establishing the
addressability of a common section,
the symbol in the name field of
the COM instruction or any symbol
defined in the common section can
be specified ina USING instruction.

•.

DO~·• . ·.··~da..~~.~·t~~·.· ri~~'?{EiP~~Y<>f···.·• t:~~··N·c6~f·•. ·•

i.'

•. . . . . . .·• .·~.~~i~~~i~nt~~~~~~~:~~i~ris~~~;
.j
.asthexbaseaqdress.·.• Nin•. ···.··a.(.·.'>,<,
~.··used··.·

OSINGinstruction...

"

END

126

o.

COMMON,1l

•

or USING A,ll

,E4 - External Dummy Sections
os

only

PUrpose
external dummy section is a reference control section
that allows you to describe storage areas for one or rrcre
source modules, to be used as:
An

1. Work areas for each source rr,odule or

2. Communication areas between two or more source modules.
When the assembled object modules are linked and loaded,
you can dynamically allocate the storage required for all
your external dummy sections at one time fro~ one source
module (for example, by using the GETMAIN macro
instruction). This is not only convenient but you save
space and prevent fragmentation of virtual,storage.
To generate and use external dummy sections, you need to
specify a combination of the following:
1. The DXD or DSECT instruction

2. The Q-type address constant

Source Module

3. The CXD instruction.

FIRST START 0

.{ ~IAB=====D=XD====3D==~
DXD
2FL4
Generating an External

Curr~y

•

offset to A

Section
EXT
El
E2

An external dummy section is
generated when you specify a CXC
instruction or a DSECT instruction
in combination with a Q-type address
A constant that contains the !lli1!!.§.
~of the DSECT instruction.

I
I

Area allocated to
contain external
dummy sections

You use the Q-type address constant
to reserve storage for the offset
to the external dummy section whose
name is specified in the operand.
This offset is the distance in bytes
from the beginning of the area
allocated for all the external dummy
sections to the beginning of the
external durrmy section specified.
You can use this offset value to
address the external dummy section.
The Q-type address constant is
described in G3M.

E4

DSECT
DS
DS
DS
DS

10H
20F

QA
QB
QEXT

DC
DC
DC

Q(A)
Q(B)
Q(EXT)

E3

e{

LB:ttOB

3C
lC

offset to
EXT

•

DUMMY DSECT
Dl
DS
F
DS
D2
2D

Not an external
dummy section

END

Section E:

Program Sectioning

127

How to Use External turrrry Sections
~o

use an e~ternal dummy section, you rrust de the fcllcwir.g
(as illustrated in the figure telow) :

4Dtldentify and define the external durrmy section. ~he
asserrbler w1l1 ccm~ute the length and alignrr.ent requixed.

~provide a Q-type ccnstant fcr each e~ternal dummy section
defined.
Use the ext instructicn tc reserve a fullword area into
which the linkage editor or loader will insert the tctal
~length of all the e~ternal durrrry secticns that are specified
in the source modules of your program. ~he linkage editcr
computes this length frcm the lengths cf the individual
external durr.my sections supplied ty the asserrtler.
~

4mtAllocate a stcrage area using the ccmputed total length.
4Etroad the address of the allocated area into a registex
(for this exarrple, register 11). Ncte that register 11
rrust contain this address throughout the whole ~rcgrarr •
•

Add, to the address in register 1.1, the cffset into the
allocated area of the desired external durrrry secticn.
The linkage editcr inserts this cffset into the fullwcrd
area reserved by the appropriate Q-type address ccnstar.t.

4itEstatlish the addressatility of the external durr~y section
in corrbination with the portion of the allocated area
reserved for the external durrcrry section •
•

You can now refer symbolically to the locations ir. the
external durrrry secticn.
Note that the source statements in an external durrrry secticn
are not asserr.tled intc cbject code. lhus, at execution
time you rr.ust insert the data described into the area
reserved for the external durrrry sections.

128

OS only

Source Modules

Area to contain
external dummy

(_"---"'::"~_ _--r- 4 - -

-I

B
ITEM
NO
SUM

DSECT
DS
DS
DS

F
F
F

~/

/

II /

.... /
::::8r /
0/

START

TWO

a

/

/

O{~R

8

Double word
Boundary

•

BOFFS

USING

100
bytes

200
bytes

3,BOFFS
3,11
B,3 __ /

;

I

DC

Q(B)O

ST

9,SUM

END

8

Section E:

Program Sectioning

129

ES .- Defining an External. Dummy Section
as

only

E5A

THE DXD

INS~RUCTION

Purpose
~he DXD instruction
ident~fy and define

allows you to
an external

dummy section.

Specifications
The DXD instruction defines an
external durrmy secticn.
~he DXD
instruction can be used anywhere
in a source module, after the ICTL
instruction or after any source
macro definitions that may be
specified.
NOTE: The DSECT instruction also
defines an external dummy section,
but only if the symbol in the name
field appears in a Q-ty~e address
constant in the same source module.
Otherwise, a DSECT instruction
defines a dummy section.

o

The format of the tXt instruction
is given in the figure to the right.
The symbol in the name field must
appear in the operand of a Q-type
address constant. This symtol
represents the address of the first
byte of the external dummy section
defined' and has a length attribute
value o:f 1.

"

The linkage editor or loader uses
the information provided by the
assembler to compute the total
length of storage required for all
external dummy sections specified
in a program.
NOTE:
If two or more external dummy
sections for different source modules
have the same name, the linkage
editor uses the most restrictive
alignment and the largest section
to compute the total length.

130

DXD
~
~

Name

Operation

Operand

A symbol

DXD

Same format as the operand
of a DS instruction

~The subfields in the oFerand field
are specified in the same way as
in the DS instruction. The assembler
computes the amount of storage and
the alignment required for an
external dummy section from the
area specified in the operand field.

'<'~

Example:

A

DXD

AOFFSET

DC

l

lOFL3

8.
Q(A)

\

...

.....

OS

!~hIY
ESB -- THE CXD INSTRUCTION

purpose
The CXD instruction allows you to
reserve a fullword area in storage.
The linkage editor or loader will
insert into this area the total
length of all external dummy sections
specified in the source modules
that are assembled and linked
together into one I=rcgram.;

.

Specifications

~~r~~:r~~~~b<: ~~'~
.~ < ~ .~ l

•

,..

f

";~

'

""
,

-:,'"CXD'

The CXD instruction reserves a
fullword area in storage, and it
can appear in one or more of the
source modules assembled and combined
by the linkage editor into one
program.

..' .
Name

Operation

Operand

A symbol
or blank

CXD

Not required

The format of the ext instruction
statement is given' in the figure
to the right~

•

•

The symbol in the name field, if
specified, represents the address
of a full word area aligned on a
fullword boundary. This symbol
has a length attribute value of
4. The linkage editor or loader
inserts into this area the total
length of storage required for all
the external dummy sections specified
in a prograrr••

Object Code
in Hex
boundary

I

Example:

LENGTH

O--..I...

CXD

4 bytes

·1

XXXXXXXX

I

.~
Section E:

Program Sectioning

131

This page left blank intentionally

\Section F: Addressing
;

This section describes the techniques and instructions
that allow you to use symbolic addresses when referring
to data. You can address data that is defined within the
same source module or data that is defined in another
source module. Symbolic addresses are more roeaningful
and easier to use than the corresponding object code
addresses required for machine instructions. Also, the
assemtler can convert the symbolic addresses you specify
into their object code form.

FI - Addressing Within Source Modules: Establishing Addressability

O
4It

By establishing the address ability
of a control section, you can refer
to the symbolic addresses defined
in it in the operands of machine
instructions. This is much easier
than coding the addresses in the
tase-displaceroent ferm required
by the System/370. The symbolic
addresses you code in the instruction
operands are called implicit
addresses, and the addresses in
the base-displacement form are
called explicit addresses, both
of which are fully described in

o

FIRST

I
LA

The assembler will convert these
implicit addresses for you into
the explicit addresses required
for the assembled object code of
the machine instruction. However,
you must supply the assembler with:

•

•

1. A base address from which i t
can compute displacements to the
addresses wi thin a control section
and
2. A base register to hold this
tase address.

D.,

la,ADDRESS

40

A
V

•
\

ADDRESS DC

1411 A 1a 1/co 401

•
,

Equivalent ~

eSB.

•

START a

Explicit
Address

C 'SAMPLE ,

END

Section F:

Addressing

133

How to Establish Addressability
To establish the addressability
of a control section, you must,
at coding time:

O.the Specify
a base
assembler can

FIRST

address from which

Object Code
in Hex

Source Module

Location
in Hex

BEGIN

START 0
BALR
USING
BEOOS

•
•
•

EXTRN OTHER

A . T'hey must te used alcne and
,., cannct be paired when used in an
expression (fcr ~airing of terrrs
see C6) •
The asserrtler lists each external
symbcl identified in a source module
in the External Syrrtcl Cictionary
along with entries for entry symtols,
commen control secticns, and external
contrcl sections. The maximum
numter of External Syrrtcl Dictionary
entries for each source module is

a

Entry in External.
Symbol Dictionary

OTHER

START

ENTRY SUBRTN

·

SUBRTN

DS

·

OH

v-ty~e

END

Section F:

Addressing

151

F2C - THE

WX~RN

INS~RUCTICN

Purpose
~he WXTRN instruction allows you
to identify symtcls refer~ed tc
in a source module but defined in
another scurce rrcdule.
~he "XTRN instruction differs from
the EXTRN instructicn as follc~s:

EXTRN instruction causes the
linkage editor to rrake an autorratic
search of libraries to find the
module that ccntains the external
symbcls that you identify in its
operand field. If tbe rrodule is
found, linkage addresses are
resolved; then the rrcdule is linked
to ycur module, which contains the
EXTR~ instruction.
~he

~he ~XTRN instructicn su~~resses
this autcmatic search cf libraries.
The linkage editor will only resolve
the linkage addresses if the external
symbcls that you identify in the
WXTRN operand field are defined:

1. In a module that is linked and
loaded along with the cbject rrcdule
asserrbled fro~ your source module
or

2. In a module brought in from a
library due tc the ~resence of an
EXTR~ instruction in another module
linked and leaded with yours.

WXTRN

Specificaticns

o
•

EXTERNAL SYMEOLS: ~he external
symbols identified by a WXTRN
instruction have the sane prc~erties
as the external symbols identified
by the EXT'RN instructicn. However,
the type code assigned to these
external syrrbcls differs.

~OTE:
If a symbol, specified in
~a v-type address constant, is also
identified by a WXTRN instruction
in the sane scurce recdule, it is
assigned the same type code as the
symbol in the WXTRN instruction.

If an external symbol is identified
by both an EXTRN and WXTRN
instruction in the same source
module, the first declaration takes
· frecedence, and subsequent
declarations are flagged with warning
messages.

O
152

Operand

Operation

Name

The format cf the WXTRN instructicn
statereent is shown in the figure
to the right.

Sequence
symbol
or blank

One or more relocatable
symbols separated by
commas

WXTRN

Source Module-

FIRST START 0

8

EX:RN OUT,A--e ..

~WXTRN WOUT,~

•

".".WARNING ••

VCON

.

DC

END

V(WOUT)

Entry in External
Symbol Dictionary
Symbol

Type Code

FIRST

SD

OUT

ER

r-- :p.

ER

WOUT

WX

WOUT

WX

Section G: Symbol and Data Definition

This section describes the assembly time facilities which
you can use to:
1. Assign values to symbols

2. Define constants and storage areas
3. Define channel command words.
By assigning an absolute value to a symbol and then using
that symbol to represent, for example, a register or a
length, you can code machine instructions entirely in
symbolic form.

Gl - Establishing Symbolic Representation

e

•

You define symbols to be used as
elements in your programs. This
symtolic representation is superior
to numeric representation because:
• You can give meaningful names
to the elements;
• You can debug a program more
easily, because the symbols are
cross-referenced to where they are
defined and used in your program.
The cross-referenced statement
numbers containing the symbols are
printed in your assembly listing.

••
••o
•

• You can maintain a program more
easily, because you can change a
symbolic value in one place and
its value will be changed throughout
a program.
Some symbols represent absolute
values, while others represent
relocatable address values.
The
relocatable addresses are of:
instructions
constants
storage areas.
You can use these defined symbols
in the operand fields of instruction
statements to refer to the
instructions, constants, or areas
represented by the symbol.

Source Module

FIRST

START

DATAREG
EIGHTY
TW040
BASREG

EQU
EQU
EQU
EQU

RELOC

EQU

••

·

·

BALR

10
80
240
12

•

12,0

*

0

USING *,BASREG

•
•
0

·
·

INSTR

B

INSTR _ _ _ _ _ _ _

MVC

TO'FROM~

L

DATAREG,DATACON

·

DATACON

DC

F'3'

TO

DS

CL(EIGHTY)

FROM

DS

CL (TW040)

··

D

END

Section G: Symbol and Data Definition

153

Assigning Values
You can create symbols and assign
them absolute or relocatable values
anywhere in a source module with
an EQU instruction (see G2A). You
can use these symbols instead of
the numeric value they represent
in the operand of an instruction.

Defining and Naming Data
DATA CONSTANTS: You can define
a data constant at assembly time
that will be used by the machine
instructions in their operations
at execution time. The three steps
for creating a data constant and
introducing it into your program
in symbolic form are:

O.

define the data

••

provide a label for the data

••

refer to the data by its label.

•·
•

Source Code

•----

Object Code
in Hex

5,LABEL
Equi valent {:

,OOOOOOCA,

5,=F'202'

o

DC

F'202'

T

The symbol used as a label represents
the address of the ccnstanti it
is not to be confused with the
assembled o1:ject code of the actual
constant.

•
,

•
•

Defining data constants is discussed
in G3.

•

LITERALS: You can also define data
at its point of reference in the
operand of a reachine instruction
by specifying a literal.
Literal constants are discussed
in G3C.
STORAGE AREAS: You ~ust usually
reserve space in virtual storage
at assembly time for insertion and
manipulation of data at execution
time. The three steps for reserving
virtual storage and using it in
your prograro are:

8.

define the space

••

prov ide a labe I f cr the space

~.

refer to the space by its label.

ST
.SPACE

Defining storage areas is discussed
in G3N.

154

DS

I

~IO-O-O-O-O-O-oc-A
.....

•

5,SPACE

o
F

,

CHANNEL COM~AND WORDS: When you
define a channel command word at
assembly time you create a command
for an input or out~ut operation
to be performed at execution time.
You should:
• define the channel command word
• provide a label fer the word.
Channel cerrrrand wcrds are discussed
in sUbsection G3C.

G2 -- Defining Symbols
G2A --

~HE

EQU

INS~RUCTION

INSTR

Purpose
~he

o

E~U instruction allows you to
assign absolute or relecatable
values to symbols. You can use
it for the following ~ur~eses:

....-_ _""""'- ABS

I.----L

HEXA2

BALR

12,0

EQU

X'A2'

EQU

1. To assign single absolute values
to syrr,bols
BEGIN

8

o

ABS

}

INSTR •

2. ~o assign the values of previously
defined syrotols or ex~ressiens te
new symbols, thus allowing you to
use different mnerrenics fer different
~urpeses.

~3. To com~ute ex~ressicns whese
values are unknown at coding time
or difficult to calculate.
~he
value of the expression is then
, assigned to a syrrbel.

O

8 EXPR

EQU

•

,A- (B+C) /33-D,

Section G: Symbol and Data Definition

155

Specifications

EQU
The EQU instruction can be used
anywhere in a source module after
the ICTL instruction, or after any
source macro definitions that may
be specified. Note, however, that
the EQU instruction can initiate
an unnamed control section (private
code) if it is specified before
the first control section (initiated
by a START or CSECT instruction)~·
The format of the EQU instruction
statement is given in the figure
to the right.

Expression 1 represents a value. It
must always be specified and can have
a relocatable or absolute value. The
assembler carries this value as a
signed four-byte (32-bit) number:
all four bytes are printed in the
program listings opposite the symbol.

's~'~~~~~~r
!v attribut

'~t>~g~.,~.•~'.~
V'.9-.~U.~·········'f~"x~~~'i,·.~.i:l.l1St.~·
6,.~,·I§~,?f;'·.·•.~xI?X:~.~~;~n.
~Y.~~Cl.:t:~ril?\l~~~?~~
.;~(··.• . E)~.~p;.~f~g..~·~~~t:
~~:t'~,~ftl:¥)~value i
t:P:r;P~9!l.·.'~.??.~

Any symbols appearing in these three
expressions must have been previously
defined.
EXPRESSION 1 (VALUE): The assembler
assigns the relocatable or absolute
value of expression 1 to the symbol
in the name field at assembly time.

156

Name
An ordinary
symbol or
a variable
symbol

Operatio,n

Operand

EQU

Indicates the
absence of
Expression 2

If expression 2 is omitted, the assembler also assigns
a length attribute value to the symbol in the name field
according to the length attribute value of the leftmost
(or only) term of expression 1. The length attribute value
(described in C4C) thus assigned is as follows (see figure
on following page) :
1.

If the leftmost terre is a lccation ccunter reference

(*), a self-defining term or a symtol length attritute

~value reference, the length attribute value is 1. Note
that this also applies if the leftI'(l,ost terrr is a syrrl:cl
that is equated tc any cfthese values.

'0

2. If the leftmost term is a symbol that is used ~n the name
field of a DC or US instruction, the length attribute value
is equal to the implicit or explicit length of the first (or
only) constant specified in the DC or DS operand tield.

3. If the leftmost term isa symbol that is used in the
name field of a machine instruction, the length attribute
~value is equal to the length of the assembled instruction.

O·

I
I

4. Symbols that name assembler instructions, except the DC
and DS instructions, have a length attribute value of one.
However, the name of a CCW instruction has a length
attribute value of eight.
NOTE: The length attribute value assigned in cases 2-4 only
applies to the assembly-time value of the attribute. Its
value at pre-assembly time, during conditional assembly
processing, ~s always 1.
,

Further, if expression 3 is omitted, the asserrl:ler assigns
a type attril:ute value cf nUn tc the syrrl:cl in the narre
field.

Section G: Symbol and Data Definition

157

Value
assigned
to
symbol
is:

•

At Assembly Time

SECTA

START

0

RR
RX
SS

LR
A
MVC

3,4
3,FULL
TO ,FROM

FULL
AREA
TO
FROM

DC
DS
DS
DS

P'33'
XL2000
CL240
CLBO

ADCONS

DC

AL1(A) ,AL2(B) ,AL3(C)

ADCCW

CCW

2,READER,X'48' ,80

A
B
C
D

EQU
EQU
EQU
EQU

X'FF'
L'FROM
*+4
A*10

Relocatable E
Relocatable F
Relocatable G
Absolute
H
Relocatable I

EQU
EQU
EQU
EQU
EQU

PULL
AREA+1000
TO
FROM-TO
ADCONS

Relocatable J
Relocatable K
Relocatable L

EQU
EQU
EQU

RR
RX
SS

Relocatable

M

EQU

SECTA

Relocatable

N

EQU

ADCCW

Absolute
Absolute
Relocatable
Absolute

158

Length Attribute Value
assigned to symbol
in name field:

Source Module.

·

·

·
·

·

•

At Pre-assembly Time

0

1
1
1

1
1
1
1

].

4
2000
240
80
1

1
1
1
1
1

Ie

2
4

•

1

6

1
1
1

1

1

8

1

OS EXPRESSION 2 (LENGTH-ATTRIBUTE VALUE) : If expression 2 is
specified, the assembler assigns its ~alue as a length
attribute value to the symbol in the name field. This value
overrides the normal length attribute value implicitly
assigned from expression 1.

o~y

O

•

If expression 2 is a self-defining term, the assembler also
assigns the length attribute value to the symbol at
pre-assembly time (during conditional assembly processing).

'OS' EXPRESSIO~3(TYPE~A~~R~B~TE'\7~tJE1':I~ expre~sion 3 is
specified, it must be a' self";defining 'term. The assembler
A 'assigns its EBCDIC value as a type attribute value to the
~ symbol in the name field.
This value overrides the normal
type attribute value implicitly assigned from expression 1.
Note that the type attribute value is the EBCDIC character
~ equivalent of the value of expression 3.

only

Type Attribute
Value assigned

Length Attribute
Value assigned

Source Module

Value
assigned

At PreAt
Assembly assembly
Time
Time

,t' .l.t{~'i'

XL2000

SDT

·
·
EQU

ASTERISK

EQU

*

EQU

AREA,lOOO

AREA

Value of
AREA

}A

255
Value of
}
Location
Counter at
ASTERISK

START

DS

·

X'FF'

Implicit

Attribute
Values

! •

e{

2000

2000

X

1

1

U

1

1

U

1000

1000

U

4

4

U

4

4

U

1
1
1

~}e

B

EQU

SDT,4

C

EQU

ASTERISK,4

D
E
F

EQU
EQU
EQU

AREA"C 'F'
SDT"C 'N'
ASTERI SK, , C ' A '

G

EQU
EQU
EQU

AREA,lOOO,C'l' 1000
SDT,4,C'F'
4
ASTERISK,4,C'A'
4

EQU

AREA, 100 ,19S/

H

I
J

2000
1
1

,.,,--100

\

1000
4
4

1
F
A

~U ~ ~F
100

Section G: Symbol and Data Definition

159

Using Preassembly Values

You can use the preassembly values assigned by the assembler
in conditional assembly processing.
If only expression 1 is specified, the assembler assigns a
preassembly value of 1 to the length attribute and a
preassembly value of U to the type attribute of the symbol.
These values can be used in conditional assenlbly (although
references to the length attribute of the symbol will be
flagged). The absolute or relocatable value of the symbol,
however, is not assigned until assembly, and thus may not be
used at preassernbly.

160

THE SYMECL IN THE NAME FIELC: The asserrtler assigns an
absolute or relocatatle value, a length attritute value,
and a type attritute value to the symbol in the name field.
The absolute or relocatable value of the symtol is assigned
at assembly time, and is therefore not available for
conditional assembly processing at pre-asserntly tirre.

?S

The type'and length attribute values of the symbol are
pnlyavailable for conditional assembly processing under the
following ccnditions:
1. Thesyrobol in the name field IrlUst be an ordinary

symbol~

2. EXPfessiol'lf and Expression 3 must tesingleself.d,e +~rij,~g.t.~~1TS ..

G3 - Defining Data
This section descrites the CC, [5, and CCW instructicns;
these instructions are used to define constants, reserve
storage and specify the contents of channel eorrrrand wcrds
respectively. You can also previde a label for these
instructions and then refer to the data syrrtolically in
the operands of rrachine and asserrbler instructions. 1his
data is generated and storage is reserved at asserrtly tirre,
and used by the machine instructions at execution tirre.

Section G: Symbol and Data Definition

161

G3A -- THE CC INSTRUCTION

Purpose
You specify the DC instruction to
define the data constants you need
for program execution. The CC
instruction causes the assembler
to generate the binary representation
of the data constant you specify,
into a particular location in the
assembled source module; this is
done at assembly time.
TYPES OF CONSTANTS: The CC
instruction can generate the
following types of constants:

0

o

Binary constants -- to define bit
patterns

•

Character constants -- to define
character strings or messages

•

Hexadecimal constants -- to define
large bit patterns

••

{FCON

L
DC

3,FCON
F'lOO'

Fi.xed-Point constants -- for use
by the fixed-point and other
instructions of the standard set

• {peON
AREA

AP
DC
DS

AREA,PCON
P'IOO'
P

•

Decimal constants -- for use by
the decimal instructions

0

{ ECON

LE
DC

2,ECON
E'IOO.SO'

•

Floating-Foint constants -- for

•

{ADCON

L
DC

S,ADCON
A (SOMWHERE)

e'

~use by the floating-~oint instruction

set
•

162

Address constants -- to define
addresses mainly for the use of
the fixed-point and other
instructions in the standard
instruction set.

•

FLAG

DC

B'OOOIOOOO'

CHAR

DC

C'STRING OF CHARACTERS'

PATTERN DC

X'FFOOFFOO'

G3B -- GENERAL SFECIFICATIONS FOR
"CONSTANTS

Name
Any Symbol
or blank

Operand

Operation

DC

In the format
described in the
next figure

general format of the CC
instructions staterrents is shc~n
in the figure to the right.

~he

The symbol in the name field
represents the address cf the first
byte of the assembled constant.
~ If several eperands are sFecified,
the first censtant defined is
~ addressatle ty the syrrtel in the
.., name field. ~he other constants
can te reached ty relative
addressing.
•

IFIRSTCON

8FIRSTCON

DC

•

r
,
F'2',X'Al',C'HUM'

D

Logical Equivalent

DC
DC
DC

F'2'
X'Al'
C'HUM'

LA

3,FIRSTCON

CLI

5,4(3)

•

Each operand in a rc instruction
staterrent censists cf feur subfields.
~he fermat of a CC instruction
operand is given in the figure tc
the right.
.
The first three sutfields descrite
the constant, and the fourth sutfield
specifies the norrinal value of the
constant to be generated.
Required Order
if all subfields
are specified

Section G: Symbol and Data Definition

163

Rules for the DC Operand

o

~

1. The type subfield and the nominal
value must always be s~ecified.

DC

3. When multiple operands are
specified, they can be of different
types •.

. . 4. When multiple noroinal values
~are specified in the fourth subfield,
they must be separated by commas
and be of the sarne.type.

OPRNDS

DC

SEVERAL

DC

A(FIRST,SECOND,THIRD)

IVALUES

DC

F'lOO,200,300'

•

5. The descriptive subfields apply
to all the nominal values.

SEVERAL
VALUES

NOTE: Separate constants aIe
generated for each separate· operand
and nominal value specified.
IMIXED

MIXED

o

C'FIRST' ,H'99' ,FL3'lOl'

D

Multiple
nominal
values not
allowed for
character
constant

DC
DC
DC
DC
DC
DC

A(FIRST)
A (SECOND)
A(THIRD)
F'lOO'
F'200'
F'300'

DC

AL3(ONE,TWO) ,2F'1,2,3'1

DC
DC
DC
DC
DC
DC
DC
DC

••

a.

Between subfields

b.

Between multiple operands

c. Within any subfields -unless they occur as part of
the nominal value of a character
constant or as part of a character
self-defining term in a modifier
expression or in the duplication
factor subfield.

~.~

D

logical Equivalent

AL3 (ONE)
AL3 (TWO) .
F'l'
F'2'
F'3'
F'l'
F'2'
F'3'

BETWEEN

DC

lOFL3'+456'

SEVERAL

DC

C'BOO HOO' F'95' H'2'

II I

If
WITHIN

•

Logical Equivalent

6. No blanks are allowed:

~

164

F'200'
----'

2. The duplication factor and
modifier subfields are optIonal •
•

•
•
r~~

MUST

p,

1/

DC

C'MESSAGE HAS BLANKS'

DC

XL(A+B-C'N 0'+3) 'FO'

I

•
•

•

Information arout Constants

Source Code

SYMBOLIC ADCRESSES OF CONSTANTS:
Constants defined by the DC
instruction are assembled into an
object module at the location where
the instruction is specified.
However, the type of ccnstant being
defined will determine whether
the constant is to be aligned on
a particular storage boundary or
not.
(seerelow under Alignment
~Of Constants) • The value of the
symbol that names the DC instruction
~iS the address of the leftmost byte
(after alignment) of the first or
only constant.

Object Code
in Hex

XL7 I AD '

DC

HEXCON

~ OOOOOOOOOOOO~D I
FULLCON

DC

F' 81

MANYCONS

DC

iC~A~

~~i

Type of
constant

THE LENGTH ATTRIEUTE VALUE OF SYMEOLS
NAMING CONSTANTS: The length
attribute value assigned to the
symbols in the name field of
constants is equal to:
~The implicit length of the constant
when no explicit length is specified
in the operand of the constant,
or
~The

explicitly specified length
of the constant.

NOTE: If more than cne oFerand
is present, the length attribute
value of the symbol is the length
in bytes of the first constant
specified, according to its
implicitly or explicitly specified
length.

Implicit
Length 1

Examples

, C I B I ,C I C I ,C I D I

C2 C3 c41

Value of Length
Attribute 2

B

0

as needed

DC B ' I0010000 '

1

C

as needed

DC CIWOW I
DC CL8 I WOW '

3
8

X

as needed

DC
DC

3
2

H
F

2
4

DC H ' 321
DC FL3 1321

2
3

P

as needed

Z

as needed

E
D
L

8

DC Y(HERE)
DC ALI (THERE)

2
1

2

16

Y

2
4

S

2
4
4

Q

4
3
10

4

A

V

P ' 123 1
PL4 1123 1
Z ' 123 1
ZL10 ' 123 1

DC
DC
DC
DC

1 Depends on type
2Depends on whether or not an explicit length is specified in constant

Section G: Symbol and Data Definition 165

Type of Implicit
Constant Boundary
Alignment'

o

e

ALIGNMENT OF CONSTAN1S: ~he
assembler aligns constants on
different boundaries according to
the following:
On boundaries implicit to the type
of constant, when no length
specification is supplied.
On byte boundaries when an explicit
length specl.fl.catl.on is made.

Bytes that are skipped to align
a constant at the proper boundary
are not considered part of the
constant. They are filled with
zeros. Note that the automatic
alignment of constants and areas
does not occur if the NOALIGN
assembler option has been specified
in the job control language which
invoked the assembler.
NOTE: Alignment can be forced to
any boundary by a preceding DS (or
DC) instruction with a zero
duplication factor (see G3N). This
occurs when either the ALIGN or
NOALIGN option is set.

166

Examples

Boundary
Alignment

B

byte

C

byte

X

byte

H

halfword

DC H'25'
DC Hr.;3'25'

F

fullword

DC F'225'

~

DC FL7'225'
p

byte

Z

byte

DC P'2934'
DC Z'1235'
DC ZL2'1235'

E

fullword

DC

E'1.2S'

DC EL5'1.25'
D

doubleword

.~

1;

halfword
byte
fullword
byte
byte
byte
byte
fullword
byte

DC BD'95'

doubleword

DC BDL7'95'

byte
doubleword

L

doubleword

DC L'2.57E65'

y

halfword

A

fullword

DC Y(HERE)
DC AL3(THERE)

S

halfword

V

fullword

Q

fu II word
1'"oependS ontype

I)

D

I

halfword
byte

Page of GC33-40 10-5
As Updated 28 Ike 1981
By TNL GN20-9372

Fadding and

~runcation

of Values

The nominal values s~ecified fer censtants are assembled
into storage. The amount of space availatle for tte r.crrir.al
value of a constant is deterrrined:
1. Ey the e~~licit length specified in the second
sutfield, or

e~erand

2. If no e~~licit length is s~ecified, by the implicit
length according to the type of constant defined (see
Appendix VI) •

If rrore s~ace is available
PADDING:
than is needed to accommodate the
binary representation of the nominal
value, the extra space is ~?dded:
Source Code

Object Code

~ With- binary zeros on the left for
(B), hexadecimal (X),
(H,F), packed decimal
(P), and all address (A, Y , S, V ,Q)
constants

2 bytes

the l:inary

o --------+-----'

fi~ed-point

I

DC BL2'101'

Binary
Digits

~With EBCDIC zeros cn the left

I•

(X'PO') for the zoned decimal (Z)
constants

Hexadecimal
Digits

With EBCDIC blanks on the right
(X'40') for the character (C)
constant

DC X'PPA'

NOTE:
Floating-point constants
(E, D, L) are also padded on the right
with zeros (see G3I) •

DC FL3'255'

DC XL3'PPAl'

DC H'255'

0

DC P'1234'
DC PL4'123'
DC AL3 (512)
DC ZL4'123'
DC ZL4'3'

}e

DC C'POUR'
DC CL5'POUR
DC CL5'A'

Section G: Symbol and Data Definition

167

o

TRUNCATION:
If less srace is
available than is needed to
accommodate the nominal value, the
nominal value is truncated and part
of the constant is lost.
Truncation
of the nominal value is:

. Truncation

Source Code

On the left for the binary (B),
hexadecimal (X), decimal (P and
~ , and address
(A and Y) constants.

1 byte

DC
•
•

On the right for the character
constant •

Object Code

(C)

BLl'OOOlOOOOlOl~>';~Rr'~~~~

Binary
Digits

However, the fixed-point constants
(H and ~ will nct be truncated,
but flagged if significant bits
would be lost through truncation.
NOTE:
Floating-point constants
(E,e,L) are not truncated; they
are rounded (see G3I).

DC XL3'FFIIFOFO'

NOTE:
The above rules for padding
and truncation also apply when the
tit-length specification is used
(see below under Subfield 3:
Modifiers) •

DC ZL3'1234S'

DC PL2'1234S'

Hexadecimal
Digits

~

0

~

I..

1 byte

DC AL2(l31012)

}&
}.

DC CL2'FOUR'
DC CLl'ABCDE'
DC H'
DC

ie

* ERROR* *

* *ERROR* *

Nominal Values
too large for
space provided

Subfield 1: Duplication Factor

o
•

The duplication factor, if specified,
causes the now-inal value or multiple
nominal values specified in a
constant to be generated the number
of times indicated by the factor.
It is applied after the nominal
value or values are assembled into
the constant.

The factor can be specified by an
.unsigned decirr.al self-defining term
or by an absolute expreSS10n enclosed
, in parentheses.

O

The expression should have
value or be equal to zero.

~

,

Duplication

Object Code
in hex

I oOF 010 OF 010 OF 01

SINGLE

DC~'

MULTIPLE

DC 3FLl'3,4,S'

EXPR

DC (A-B+IO-3)A(ADDR)

positive

Any symbols used in the expression
must te previously defined.

168

,.

240'

•

••

103040510 3 04 0510 304 051

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

NOTES:

o

1. The value of a location counter
reference in a duplication factor is
the value before any align to
boundaries, according to the type of
constant specified.
DC

ZERODUP

Halfword
boundary

OH'3'

2. A duplication factor of zero

is permitted with the following
results:
a.

o

No value is assembled.

NOALIGN

DC _

t. Alignment is fcrced according
to the type of constant s~ecified,
if no length attribute is present
(see atove under Alignment of
Constants) •

•

L' ZERODUP=2

~3'3'

. . L'NOALIGN=3

c. The length attritute of the
symbol naming the constant is
•
established according to the
implicitly or explicitly specified
length.

3. If duplication is specified for
an address constant containing a
location counter reference, the
value of the location counter
reference is incre~ented by the
length of the constant before each
duplication is performed (for
examples, see G3~ •

Subfield 2: Type
The type subfield must be specified.
It defines the type cf constant
to be generated and is specified
ty a single letter ccde as in the
fiqure to the right.
The type specificaticn indicates
. to the assembler:

•

•

1. How the no~inal value(s) specified
in subfield 4 is to be assembled;
that is, which binary representation
or machine format the cbject code
of the constant must have.

Type
Code

Type of Constant

Machine Format

C
X
B
F

Character
Hexadecimal
Binary
Fixed-point

H

Fixed-point

E

Floating-point

D

Floating-point

L

Floating-point

P
Z
A
S

Decimal
Decimal
Address
Address
Address

V

Address

8-bit code for each Character
4-bit code for each hexadecimal digit
Binary format
Signed, fixed-point binary format;
normally a fullword
Signed, fixed-pqint binary format;
normally a halfword
Short floatin~-point format; normally a
fullword
Long floating-point format; normally a
doubleword
Extended floating-point format; normally
two doublewords
Packed decimal format
Zoned decimal format
Value of address; normally a fullword
Value of address; normally a halfword
Base register and displacement value;
a halfword
Space reserved for external symbol
addresses; each address normally a
fullword
Spacet~serY.!# for~~ternal dummy section

y

p

.'

....

IdMr... "~··,··.·.
'~~
'~"-.

I

· . .·i>.·.·

.........

.•.

offset

:00

ooty

,

2. At what boundary the assembler
aligns the constant, if no length
specification is present.
3. How much storage the constant
is to occupy, according to the
implicit length of the constant,
if no explicit length specification
is present (for details see above,
under Padding and Truncation of
Constants) .

0 .
:!:

Object Code
in hex

Examples:

DC P'+234'
DC C'ABC'
DC X'FO'
DC H'2'

1234cI

IClC2C31
IT]]
/00021

Section G: Symbol and Data Definition

169

Subfield 3: Modifiers
~he

three modifier~ that can be
specified to describe a constant
are:

4Dt The
length
explicitly

0

,...--....

LENGTH

DC

XL10'FF'

SCALE

DC

FSB'3S.92'
.--.-

EXPON

DC

EE3'3.4l4'

~LL3

DC

D.hleJ~'

modifier (1), which
defines the length in
bytes desired for a constant.

•

~he

scale modifier (S), which is
only used with the fixed-point or
floatingpoint constants (for details
see below under Scale Modifier) •

~The exponent rr.odifier eE), that
is only used with fixed-point or
floating-point constants, and which
indicates the power of 10 by which
the constant is to be IDultiflied
before conversion to its internal
binary format.

e

4Dt A decimal

Length

DC

FL3'9999'

EXPR

DC

XL(SYMBO~D)'F7A'

self-defining term

atsolute expressicn enclosed
in parentheses. It must have a
positive value and any symbols it
~ contains must be previously def~nEd.

o

DECSDT

An

170

2. 71B2'

If multiple modifiers are used,
they must appear in the sequence:
length, scale, exponent.
LENGTH MODIFIER: The length modifier
indicates the number of bytes of
storage into which the constant
is to be assembled. It is written
as Ln~ where n is either of the
following:

•

••
•

•

Object Code
in hex

Source Code

PADTRUNC

DC

0

CL3'ABCDE'

Two bytes
truncated

l\ .
r.'i.

J

")/

y

C1C2C3 I·¢J~

o

When the length modifier is
specified:
Its value determines the number
of bytes of storage allocated to
a constant.
It therefore determines
whether the nominal value of a
constant must be Fadded or truncated
to fit into the space allocated
(see above under Padding and
Truncation of Constants).

4mtNo

boundary alignment, according
to constant type, is provided (see
above under Alignment of Constants).

~Its value must not exceed the maximum
length allowed for the various types
of constant defined.
(For the
allowable range of length modifiers,
see the specifications for the
individual constants and areas from
G3C through G3N.)

IMPLICIT

DC

C'ABCDE'

CIC2C3C4CSJ
For character constant: when no
length is specified, the whole constant is assembled into its implicit
length

4 - Fullword

eboUndary

NOALIGN

DC

~ 0002011

FL3'S13'
......

I

Assembled at the next
available (byte) boundary

TOOLONG

DC

." I'·
(

•

FL9'10' **LENGTH ERROR**

Section G: Symbol and Data Definition

171

~he length rrodifier can be
specified tc indicate the nurober cf bits intc which a
constant is to be assembled. ~he tit-length specificaticn
is written as L.n, where n is either of the follo~ing:

BI~-IENG~H SFECIFIC~TICN:

~

decimal self-defining term

An absolute expression enclosed in parentr.eses. It rrust
have a positive value and any syrrbcls it contains must
be previously defined.
value of n Rust lie bet~een 1 and the nurrber of bits
(a multiple of 8) that are required to rrake up the rraxirrurr
number of bytes allo~ed in the type of constant being
defined. Tte bit length-specification cannot be used ~ith
the S, V, and ~-type constants.

~he

Source Code

Object Code
Binary digits

HEXCHAR DC

XL.4'F'
byte

When only one operand and one nominal
value are specified in a tC
instruction, the following rules
apply:
1. The bit-length specification
field intc which a
to be assembled •

allocates a
O constant
is
•
•
•

•

172

The field starts at a byte boundary,
and can run over one or more Eyte
boundaries, if the bit-length
specified is greater than 8.
If the field does not end at a byte
boundary, if the bit-length specified
is not a multiple of 8, the remainder
of the last byte is filled with
zeros.

HEX3CHAR

DC

•

XL.12'FFF'
byte

byte

Object code

Source Code

binary digits

PADC DC

o
•
•

2. The nominal value cf the constant
is assembled into the field:
Starting at the high order end for
the C, E, D, and L type ccnstants.

PADF

Starting at the low order end for
the remaining types of constants
that allow bit-length s~ecification.

DC

FL.l3'579'
byte

The nominal value is padded or
truncated to fit the field (see
above under Padding or Truncation
of Constants) •
~ Padding of character constants is
with hexadecimal blanks, X'40';
other constant types are ~added
with zeros.

NOTE: The length attribute value
of the symbol naming a DC instruction
with a specified bit-length is equal
to the minirrum number of integral
bytes needed to contain the bitlength specified for the constant.
L'TRUNCF is equal to 2. Thus, a
~reference to TRUNCF would address
the entire two bytes that are
assembled.

•

Section G: Symbol and Data Definition

173

o

L 'VALUES=2

Source VALUES
Code

DC

FL.10'161,21,57'

When rrore than one c~erand is
specified in a rc instruction or
more than one norrinal value in a
rc o~erand, the above rules atout
tit-length specificaticns also
apply, except:

O
•

1. lhe first field allccated starts
at a byte bcundary, but the
succeeding fields start at the next
available bit.

byte

•

~.

tytes that ~ould te needed to contain
the bit-length specified for the
first constant tc te asserrbled.

/ Fill

i8
OL'OPERANDS=l

Source OPERANDS DC FL. 7' 8' ,CL .10' AB' ,XL .14' C4'
Code
)

NOlE: If duplicaticn is specified,
filling with zeros occurs once at
the end of all the fields occu~ied
by the duplicated constants.
3. lhe length attribute value cf
O· the
symbol naming the CC instruction
is equal to the nurrber cf integral

'"-"

Object
Code

2. After all the constants have
teen asserrbled intc their respective
fields, the bits remaining to make
up the last byte are filled \o4i th

byte

Object
Code

byte

F=i~~~~~~==4~~~~

Truncation of
B at ri~ht

174

byte

8

STORAGE REQUIREMENT FOR CONSTANTS:
~he total amount of storage required
to assemble a DC instruction is
the sum of:

SPACE

1. The requirerrents for the
individual DC operands specified
in the instruction.

_(

OPERAND 1
OPERAND 2

•

ALIGNMENT

o

••
•
A

The requirement of a DC operand
is the product of:

DC

10H'3,4,5' ,10FL3'6,7,S'

Space for

Storage Requirements

i

iJ

x;3'~

x

'lO(

3)

j

x

101

x'3'

• •

b. The number of ncrr-inal values,
and

2.

TOTAL

different operands.

11501
Bytes

ALIGN DC

The number of bytes skipped

~for the coundary alignrrent between

o

Second operand not
aligned due to presence
of length specification

a. The length (implicit or
explicit) ,

c. The duplication factor, if
specified.

60
90

C'ABC',F'9,10,11'

_(

OPERAND 1
OPERAND 2

•

ALIGNMENT

ttnJt . ·:

3

~~;l X;~J !'(?5':,;',:f.ll

12

x

;1:1 ;(.~ \.7:.~'

0-3
First operand can
end on any byte
boundary

TOTAL

lIS-lsi
Bytes

SCALE MODIFIER: The scale modifier
specifies the amount cf internal
scaling that is desired:

Scale

Binary digits for fixed-point (H,F)
constants

o
•

-

Hexadecimal digits for floatingpoint (E,D,l) constants

Examples:

It can only be used with the above
types of constant.

DC

The scale modifier is written as
Sn, where n is either:

DC

HS3~

DC

FS (A+B-C{~3) , 2.3'

Allowable Range for
Scale Modifier

HS-132'5.55'

A decimal self-defining term or

Fixed-point
Constants

(H,F)

- 1B7
through
+346

Floating-point
Constants

An absolute expression enclosed
in parentheses.

hOS'A#Y.·• ·~YxUbo~f:i.·.·us~~··.·.·Iijr·tl-le>~lli>~~~.~·io~j

DC

ES12'19.3"'

Both types of specification can
be preceded by a sign; if no sign
is present, a plus sign is assumed.

DC

LS22'3.414'

(E,D)

o through 14

(L)

o through 28

m\lf3't:: •• 1:;)e··~!~Y~c)ll~~Y;. 4.~J!~~,gr"'·

1

Section G: Symbol and Data Definition

175

Object Code
Binary digits

DC H'2'

OOOOOOO~OOOOOO}
000000001000010.001

o
•
•

176

SCALE MODIFIER FOR FIXED-POINT
CONS'IANTS: The scale modifier for
fixed-point constants sFecifies
the power of two by which the fixedpoint constant must be multiplied
after its nominal value has been
converted to its binary
representation, but before it i,S
assemc1ed in its final "scaled"
form. Scaling causes the binary
point to move from its assumed f~xed
position at the right of the
rightmost bit positicn.

OOOOOOO~OOOOl~
000000001000010.011

Object Code

Source Code
Converted to Binary
Representation

Binary digits

Binary
point

DC

o
Converted to Binary representation

NOTES:

O

•

1. when the scale rrcdifier has a
~ositive value, it indicates the
nurober of binary positions to te
occu~ied ty the fracticnal ~crticn
of the binary number.

_ _ _-. Binary
point

2. When the scale rrcdifier has a
negative value, it indicates the
number of binary positions to te
deleted frorr the integer Eorticn
of the binary number.

3. When ~csitions are lest because
of scaling (or lack of scaling) ,
~ rounding occurs in the leftmostbit of the lost ~crticn. The
rounding is reflected in the
~ rightrrost ~csiticn saved.

Converted to Binary representation

- -..---J_

Binary
point

Converted to Binary representation

Binary
point

section G: Symbol and Data Definition

177

O
•

•

•

e

o

SCALE MODIFIER FOR FLOATING~POIN'I'
CONSTANTS: The scale modifier for
floating-point constants must have
a posi ti ve value. It speci fies
the number of hexadecimal positions
that the fractional portion of the
binary representation of a floatingpoint constant is to be shifted
to the right. ' The hexadecimal point
is assumed to be fixed at the left
of the left~ost position in the
fractional field. When scaling
is specified, it causes an
unnormalized hexadecimal fraction
to be assembled (unnormalized is
when the leftmost positions of the
fraction contain hexadecimal zeros).
The magnitude of the constant is
retained because the ex~onent in
the characteristic port1on of the
constant is adjusted u~ward
accordingly. When hexadecimal
positions are lost, rounding occurs
in the leftmost hexadecimal position
of the lost portion. The rounding
iS reflected in the rightmost
position saved.

DC E'4'

EXPONENT MODIFIER: The exponent
mOdifier specifies the power of
10 by which the noroinal ~alue of
a constant is to be multiplied
before it is converted to its
internal binary representation.
It can only be used with the fixedpoint (H,F) and floating-point
(E,D,Ll constants. The exponent
modifier is written as En, where
n can be either of the following:
A

decimal self-defining term.

i:f,"oOS;Atlysynibolsusedin (f.heexpr essi()n
,
'7;nustbe : previously def~ned.

..L

DC ES2'4'

The decimal self-defining term or
the express ion can be preceded by
a sign: if no sign is present, a
plus sign is assumed. The range
for the exponent modifier is -85
through +75.

I

1'43101014 000

I

DC E'3.3'

Unnormalized
Fraction

141134CCCD
,

I

.
/

143f)034cqcD

'8

:

Exponent
I

Source
Code

•
•
•

Decimal Value
before conversion to binary
form

DC H'4'

DC HE2'4'

DC FE

.--

(A-B~:3)

DC HE-2'400'

118

••
•
I

ROUND DC ES2'3.3'

A An a.bsolute expression enclosed
V in parentheses.

•

Object Code
in Hex

Source Code

,4

Object Code
Binary digits

4

10 000000 010 00 0010 01

400

10 a 00 a 00 11100100001

4

10 a a a a a a 010 a a a a 1 a a

I

NOTES:

•

4Dt 1.
•

A
~

•
•

e

~he exponent modifier is not
to be confused with the expcnent
that can be specified in the nominal
value subfield of fixed-};:oint and
floating-point constants (see
sections G3G and G3I) •
'l'he exponent modifier affects each
nominal value specified in the
operand, whereas the ex};:onent written
as part of the nominal value subfield
only affects the ncroinal value it
follows. If both types of exponent
specification are };:resent in a DC
operand, their values are
algel:raically added together before
the nominal value is converted to
binary form. However, this sum
must lie within the permissible
range -85 thrcugh +75.
2.

DC

Values Assembled
in decimal

~~'2'25'~

225,2.25,2.25

DC EE+2'2.25,2.25,225'

225,225,22500

DC

225

The value of the constant, after

any exponents have been applied,
O must
be contained in the implicitly

o

or explicitly specified length of
the constant to be assembled.
DC FE-20'2.25E+80'

Nom. Value
Formats of Nominal
Value Subfields

Subfield

ij:

Nominal Value

The nominal value subfield must
always be specified. It defines
the value of the ccnstant (or
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 s};:ecifying nominal
values are described in the figure
to the right.
DOSOnly one nominal value is allowed
in binary (E) and hexadecima~o(X)
constants.
How nominal values are specified
and interpreted by the assembler
is explained in the subsections
that describe each individual
constant, beginning at G3r.

Constant
Type

Single
Nominal
Values

Multiple
Nominal
Values

c

'Value'

Not allowed

'Value'

'~' value, ...... val ue:

B~

X
H

F
p

Z

A}
e
Y

1

multiple values must
be separated by commas

I

E
D
L...

\

Address

Constants (Valuel

(V~.

value........valuel

Section G: Symbol and Data Definition

179

Page of GC33·401Q-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
above) also apply to 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 constants differ
from DC operands in the following
ways:

· Literals
must
O equal
sign.

be preceded by an

~. Multiple operands are net allowed •

•

180

• 'I-he duplication factor must not
be zero.
.

L

•

3,=F'32'

Data Constants
G3B -- BINARY CONS1AN1

(B)

Fur~cse

The tinary ccnstant a11cws yeu tc s~ecify the ~recise bit
~attern yeu want assemt1ed into storage.
Specificatiens
The censtants cf the subfie1ds defining a binary ccnstant
are described in the figure te1ow.
~NOTE:

Each binary ccnstant is asserrb1ed intc the integral
number of bytes required to contain the tits specified.
Binary Constants
3. Constant Type

Subfield

Binary (B)
1. Duplication Factor

2. Modifiers
Implicit Length: (Length
Modifier not present)

Alignment:
(Length Modifier not present)

Yes

As needed

B DC B'10101111'

L'B

C DC B'101'

L'C

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:

Apostrophes

Exponent allowed:

No

Number of Values per
Operand:

Multiple

Padding:

With zeros
at left

Truncation of
Assembled Value:

At left

Section G: Symbol and Data Definition 181

G3E -- CHARAC1ER CONS1AN1 (C)
Fur~ose

The character constant allows you tc s~ecify character
strings such as error messages, identifiers, or cther text,
that the·asserrbler will convert into their tinary (EECtIC)
representation.
Specificaticns
1he ccntents of the sutfields defining a character
are descrited in the figure cn the c~~csite ~age.

cc~stant

4Dt Each

character s~ecified in the ncrrinal value subfield
is assembled into one tyte.

Multi~le norrinal values are
is s~ecified in the nominal

net allcwed, because if a comma
value sutfield, the asserrtler
4Etconsiders the comma a valid character and therefore
asserrtles it intc its tinary (EBCDIC) re~resentatien.

•

182

NOTE: When a~ostro~hes or ampersands are to be included
in the asserrbled ccnstant, doutle a~ostre~hes or dcutle
ampersands rrust te s~ecified. 1hey are asserrbled as single
apostro~hes and am~ersands.

\

c

.\

Character Constants
Subfield

3. Constant T~ee
Character (C)

1. Duplication Factor
allowed

Yes

2. Modifiers

As needed

Implicit Length: (Length
Modifier not present)

C DC C'LENGTH'

Alignment:
(Length Modifier not
present)

Byte
><;l!

•

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
Represented by:

L'C

=

6

DC CiA' 'B'
Characters (All 256
8-bit combinations)

A'BA
A&B ~

Assembled

DC C'A&&B'
Enclosed by:

Apost rophes

Exponent allowed:

No

Number of values per
Operand:

One

DC C'A,B'
Assembled

A,~

Object Code (hex).

I cll7DI c21
IClisoIC21

Icll6BI c21
I

With blanks at right
Padding:

(X'40')

Truncation of
Assembled value:

At right

Section G: Symbol and Data Definition

183

G3F -- HEXArECIMAL CCNS1ANT (X)

Fur~ose

You can use hexadecirral ccnstants to generate large tit
rr.ore conveniently than ~ith binary constants.
Also, the hexadecimal values you specify in a scurce ncdule
allow you tc corr~are therr. directly ~ith the hexadecimal
values generated for the otject code and address lccaticns
printed in the ~rcgrarr listing.
~atterns

Specificaticns
The contents of the sutfields defining a hexadecinal
constant are descrited in the figure on the o~posite

~age.

4Dt sutfield
Each hexadecimal digit specified in the norrinal value
is asserrtled intc four bits (their binary

~atterns

•
•

184

can be found in C4E). The implicit length in tytes cf a
hexadecimal ccnstant is then half the nurr.ber of hexadecimal
digits specified (assuming that a hexadecirral zerc is added
to an odd nurrter cf digits) •

"

\

X
,-

.

Hexadecimal Constants
Subfield

3. Constant Type
Hexadecimal (X)

1.Duelication Factor
allowed
2.Modifiers
Implicit Length: (Length
Modifier not present)

Alignment:
(Length Modifier not present)

Yes
As needed

X DC X'FFOOA2'
Y DC X'FOOA2'

L'X =
L'Y =

~:::e

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

Hexadecimal digits (0
through 9 and A through

.-

Represented by:

0:\

F)

Object Code (hex)

DC X'lF'
DC X'91F'

Enclosed by:

Apostrophes

Exponent allowed:

No

Number of Values
per Operand:

Multiple

Padding:

With zeros at left

Truncation of
Assembled value:

At left

I:·
10001111111

10000 10011000111111J

•

1~1 byte~1

Onlyona

DOS

Section G: Symbol and Data Definition

185

G3G -- FIXEC-FaINT CCNSTANTS (E ANt F)

Purpose
Fixed-point constants allow you to introduce data that
is in a fcrrr suitatle fcr the cfeiaticns cf the fixed-~oint
rr-achine instructions of the standard instruction set.
The ccnstants you define can alsc be autcroatically aligned
to the ~roper fullword or halfword toundary for the
instructicns that refer tc addresses on these boundaries
(unless the NCALGN option has teen specified; See (2) •
You can perform algetraic functicns using this ty~e of
constant because they can have positive or negative values.
Specificaticns
The contents cf the sUbfields defining fixed-point constants
are described in the figure on the opposite ~age.

4Dt 1he

nominal value can be a signed (plus is assumed if the
number is unsigned) integer, fraction, or rrixed number.
follo~ed by an exponent (positive or negative). 1he
•
exponent must lie within the perrnissitle range. If an
• , exponent rrodifier (see G3E) is alsc specified, the algebraic
~ cf the exponent and the exponent modifier rrust lie
•
within the ~errnissitle range~

186

H or F
Fixed-Point Constants
3. Constant T~ee

Subfield

Fullword(F)
1. Duelication Factor
Allowed

Halfword (H)

Yes

Yes

2. Modifiers
2 bytes

Implicit Length: (Length
Modifier not present)

4 bytes

Alignment:
(Length Modifer not present)

Full word

Half word

Range for Length:

1 through 8 (byte length)
.1 through .64 (bit length)

1 through 8 (byte length)
.1 through .64 (bit length)

Range for Scale:

- 187 through

Range for Exponent:

- 85 through

-

-

+ 346

+ 75

..
4. Nominal Value
Represented by:

Exponent allowed:

- 85 through

+ 346

+ 75

DC HE+90'2E-88'
value = 2xlO 2 A

Decimal digits (0 through 9) Decimal digits (0 through 9)

DC F'-200'
DC FS4'2.25'
Enclosed by:

•
•
•

- 187 through

Apostrophes
Yes

DC F'2E6'

0

....

DC H'+200'
DC HS4' .25'
Apostrophes
Yes

DC H '2E-6'

Number of Values
per Operand:

Multiple

Padding:

With zeros at left

With zeros at left

Truncation of
Assembled value:

Not allowed

Not allowed

Multiple

(error mes~age issued)

section G: Symbol and Data Definition

187

Some examples of the range of values
that can be assembled into fixedpoint constants are given in the
figure to the right.

O

•

Length

The range of values depends on the
implicitly or explicitly specified
length (if scaling is disregarded) •
If the value specified for a
particular constant does not lie
within the allowable range for a
given length, the constant is not
assembled but flagged as an error.
A fixed-point constant is asserrbled as

Range of Values that
can be Assembled

8

_2 63 through 2 63 _1

4

_2 31

.

2 31 _1

2

-2

15

2 15 _1

1

_2 7

..
..

fcllo~s:

1. ~he specified numcer, multiplied cy any exponents,
is converted to a cinary numcer.

2. Scaling (see G3E) is perforrred, if sFecified. If a
scale modifier is not provided the fractional portion of
the number is lost.
3. The cinary value is rcunded,if necessary. ~he
resulting number will not differ from the exact nurrter
specified cy rrore than cne in the leaSt significant bit
Fosition at the right.
4. A negative nurrcer is carried in 2··s corrplement forrr.

5. Cuplication is
asserrbled.

G3H -- CECIMAL

CONS~AN~S

aF~lied

after the constant has been

(P AND Z)

Furpose
The decimal constants allcw you tc introduce data that
is in a forre suitable for the operations of thedecirral
feature machine instructicns. ~heFacked decimal constants
(P-tYFe) are used for processing tythe decirral instructicn
set. The zcned decirral ccnstants . (Z-tYFe) are in the form
~BCCIC representation) that you ~an use a~ a print inage
(exceFt the digits in the rightmost tyte).
Specifications
The contentsof·the sutfields defining decimal constants
are described in the figure on the opposite ~age.

o

~he nominal value can ce a signed (Flus is assumed if the
nureber is unsigned) decimal number. A decirral Foint can
be written anywhere in the numter~ tut it does not affect
the assembly of the constant in any way. ~he specified
digits are assurr,ed tc ccnsti tute an integer. Decimal
constants are assemtled as follows:

PACKEt CECI~AI CCNS~AN~S: Each digit is converted into.
its 4-bit binary eguivalent. ~he sign indicator is
asserrbled into the rightmost four tits of the constant.

•

e

ZONEC DECIMAL CONS'IAN'IS:". Each.. dig.it. is converted into A
. its 8-bit EECtIC representation. The sign indicatcr
~
replaces the first fcur cits of'the lo~-order byte of the
constant.

188

27_1

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

P or Z
Decimal Constants
Subfield

3. Constant Type
Packed (P)

1. Duplication Factor
Allowed

Zoned (Z)
Yes

Yes

2. Modifiers
Implicit Length: (Length
Modifier not present)

As needed

p DC P'+S93 1
LiP = 2

Alignment:
(Length Modifer not present) Byte

As needed

Z DC Z'-S93 1
L' Z = 3

Byte

Range for Length:

1 through 16 (byte length)
.1 through .128 (bit length)

1 through 16 (byte length)
.1 through. 128 (bit length)

Range for Scale:

Not allowed

Not allowed

Range for Exponent:

Not allowed

Not allowed

4. Nominal Value

Decimal digits (0 through 9)

Decimal digits (0 through 9)

Represented by:

I

.DC pl+SSSI

oX

IsisisI c t8

DC ZI-SSSI

~

~51FlslDlsl

8

Enclosed by:

Apostrophes

Apostrophes

Exponent allowed:

No

No

Number of Values
per Operand:

Multiple

Multiple

With Binary zeros
at left

With EBCDIC zeros

Padding:

(X

DC pIS.SI

10 Isisic.
DC plSSI

'FO')

at left
Truncation of
Assembled value:

At left

At left

section G: Symbol and Data Definition

189

~he

range of values that can be
assembled into a decireal constant
is shown in the figure to the right.

G3I --

FLOAlING-POIN~

CONS~ANlS

Type of Decimal
Constant

Range of Values that
can be Specified

PACKED

10

ZONED

10 16 _1 through _10 16

(E, D, and L)

Floating-~oint

constants allow you to introduce data tr.at
is in a forrr suitatle fcr the e~erations ef the fleating~oint feature instruction set.
These censtants have tr.e
following advantages cver fixed-~cint censtants.

1. Yeu do net have to consider the fractional perticn cf
a value yeu s~ecify, ncr ~orry ateut the ~csitien cf tr.e
deciffial ~eint when ~a1gebraic o~erations are to be ~erfermed.

2. Yeu can specify both much larger and rruch smaller values.

3. You retain greater ~rocessing ~recisien, that is, yeur
values are carried in more significant figures.

Specificaticns
~he

ccntents of the subfields defining floating-~cint
constants are described in the figure cn the o~~osite

~age.

~ ~he neminal value can be a signed (plus is assurred if the
number is uns igned) integer, fracticn, er rrixed number.
fol1e~ed by an exponent (~ositive or negative).
lhe
~exponent must lie within the perffiissitle range. If ar.
exponent rrodifier (see G3E under ~cdifiers) is also
specified, the algebraic sum of the exponent and the
exponent modifier must lie within the perrrissible range.

190

31

-1 through _10 31

D, E or L
Floating Point Constants
Subfield

3. Constant T~~e
SHORT eE)

LONG (D)

EXTENDED (L)

Yes

Yes

Yes

4 Bytes

B Bytes

16 Bytes

FuJI Word

Double Word

Double Word

Range for Length:

1 through B (byte length)
.1 through .64 (bit length)

1 through 8 (byte length)
.1 through .64 (bit length)

1 through 16 (byte length)
.1 through .128 (bit length)

Range for Scale:

othrough 14

o through 14

o through 28

Range for Exponent:

- 85 through + 75

- 85 through + 75

- 85 through + 7.5

4. Nominal Value

Decimal Digits

Decimal Digits
( 0 through 9)

Decimal Digits
( 0 through 9)

DC 0,2525'
DC 0'+.001'.

DC L'525'
DC L'3.414' ___

1. Duelication FCictor
Allowed
2.~

Implicit Length:
(Length Modifier Not
Precend

Alignment:
(Length Modifier Not
Present)

(Othrou9~

Represented by:

DC.E'+525'
DC E'·5. 25' •

Enclosed by:

Apostrophes .

Exponent Allowed:

Yes

DC E'lE+60'
Number of Values per
Operand:

Multiple

Padding:

Truncation of Assembled
Value:

•

Apostrophes

Apostrophes

Yes

Yes

DC D'-2.5E10'.

~

DC L'3.712E-3'

Multiple

Multiple

With hexadecimal zeros at
right

With hexadecimal zeros at
right

With hexadecimal zeros at
right

Not applicable
(Values are·rounded)

Not Applicable
IValues are Rounded)

Not applicable
(Values are Rounded)

Section G: Symbol and Data Definition

191

The range of values that can be
assembled into floating-point
constants is given in the figure
to the right.

Type of
Constant

If the value specified for a
particular constant does not lie
within these ranges, the constant
is not assembled but flagged as
an error.

Range of Magnitude (M)
of Values (Positive and
Negative)

E

16- 65 ~M ~ (1-16- 6 ) x 16 63

D

16- 65 ~M ~ (1-16- 14 ) x 16 63

L

16- 65 S.M S.(l-16- 28 ) x 16 63

(For all Three)
Approxim,ately

5.4

FORMAT: The format of the floatingpoint constants i~ d~scrited below.
The value of the constant is
represented by two parts:

Type

Called

E

Short
FloatingPoint
Number

10-79<;M~7.2 x 10 75

X

Format

31

78

Bits 01

~ 1. An exponent portion, followed
by
•

2. A fractional portion.

•

A sign bit indicates whether a
positive or negative number has
been specified. The number specified
must first be converted into a
hexadecimal fraction, before it
can be assembled into the proper
internal format.
The quantity
expressed is the product of the
fraction and the number 16 raised.
to a power.

•

D

L

Long
FloatingPoint
Number

Extended
FloatingPoint
Number

7-bit
56-bit
+ Characteristic
Fraction
1r:>~;;iio;.~~wmWJ!:is '1~--:-~~3f
Bits 01

63

78

High-order half of
112-bit Fraction

7-bit

+ . Characteristic
Bits 0 1

78
7-bit

63

Low-order half of
112-bit Fraction

.

~e_r_is_t_iC ~
__

16E

_____________________

[~+E..+~+
•• •• ]
3
2
16

16

16

where a,b,c .... are hexadecimal digits, and E is
an exponent that has a positive or negative value
indicated by the characteristic

192

BINARY REPRESENTATION: The assembler
assembles a floating-point constant
into its binary representation as
follows:

o
•

~

O

Binary Representation

The specified number, multiplied
by any exponents, is converted to
the required two-part format.
The
value is translated into:

Source Code

1. A fractional portion represented

DC D'-9.7S'

Object Code
in Hex

l:y hexadecimal digits and the sign

indicator. The fraction is then
entered into the leftmost part of
the fraction field of the constant
(after rounding) •
2. An exponent portion represented
by the excess 64 binary notation,
which is then entered into the
characteristic field of the constant.
The excess 64 binary notation is
when the value of the characteristic
between +127 and +64 represents
the exponents of 16 between +63
and 0 (by subtracting 64) and the
value of the characteristic between
+63 and 0 represents the exponents
of 16 between -1 and -64.
NOTES:
1. The L-type floating-point constant
resembles two contiguous D-type
constants. The sign of the second
doubleword is assumed to be the
same as the sign of the first.
The characteristic for the second
doubleword is equal to the
characteristic of the first
doubleword minus 14 (the number
of hexadecimal digits in the
fractional portion of the first
doubleword) •

Hexadecimal
7F
7E

.

G[ill

Decimal

Decimal

127
126

40
3F
3E

65
64
63
62

00

a

Values Expressed
in Characteristic

+63
+62

-64

1+11
a

-1
- 2

-64
Exponent of 16
expressed by
Characteristic

Excess 64 Binary Notation

2. If scaling has been specified,
hexadecimal zeros are added to the
left of the normalized fraction
(ca using it to become unnormalized)
and the exponent in the
characteristic field is adjusted
accordingly.
(For further details
on scaling see G3E under Modifiers).
3. Rounding of the fraction is
performed according to the implicit
or explicit length of the constant.
The resulting number will not differ
from the exact number specified
l:y more than one in the last place.
4. Negative fractions are carried

in true representation, riot in the
2's complement form.
S. Duplication is applied after
the constant has been assembled.
section G: Symbol and Data Definition

193

~his

subsection and the three following sutsections describe
how the different ty~es of address constants are asse~bled
from expressions that usually represent storage addresses,
and how the constants are used for addressing wittin ar.d
tetween source rrcdules.

Furpose
In the A-ty~e and y-ty~e address ccnstanti ycu can s~ecify
any of the three types of assemtly-time expressions (se~
C6) , whose value the asserrbler then corr~utes and asserrtles
into cbject code. You use this expressicn cc«putatic~·
as follows:
1. Relocatable expressions for addressing
2. Absolute expressions for addressing and value
computation.
3. Ccreplex relocatable expressions to relate
in different source ncdules.

addresse~

Specificaticns
ccntents cf the sutfields defining tte A-type· and Y~
type address constants are described in the figure on the
opposite page.

~he

o
•

NOTES:

1 •. Nc bit-length specification is allowed when a relocataJ:le
or corrplex relocatatle eXI:ression is s!=ecified. ~hecnly
explicit lengths that can be specified with theseaddr~sses
are:

a.

3 or 4 bytes for A-type constants

b.

2 bytes for y-type constants.

2. The value of the lccaticn ccunter reference (~).hen
specified in an address constant varies froro const~nt tc
constant, if any cf the fcllcwing cr a ccrrtinatiol'l of the
following are specified:
a.

~ultiple

cperands

•

t.

Multiple ncninal values

•

c.

A duplication factor.

lccation counter is incremented with the length cf
the previcusly asserrtled constant.

~he

3. ~hen the location counter reference occurs in a literal
address constant, the value of the location counter is
the address of the first tyte of the instruction.

194

I

Address Constants:
~

.

.

A orY
Address Constants (A and Y)
Subfield

1. Duelication Factor
allowed

3. Constant Type
A - Type

Y - Type

Yes

Yes
Object Code in Hex _

4 bytes

2 bytes

Full word

Half word

0
A.DC SALl (':< -A}
0001020304

2. Modifiers
Impl icit Length: (Length
Modifer not present)
Alignment:
(Length Modifier not present)

0

1 through 2 (byte length)
.1 through .16 (bit length)

Range for Length:

1 through 4 (byte length)
.1 through .32 (bit length)

Range for Scale:

Not allowed

Not allowed

Range for Exponent:

Not allowed

Not allowed

4. Nominal Value

Absolute, relocatable, or}

Represented by:

comple~ relocatable

,

{ Absolute, relocatable, or .
•

comple~ relocatable

expressions

expressions

DC A (ABSOL+lO)

DC Y (RELOC+32)

Enclosed by:

Parentheses

Parentheses

Exponent allowed:

No

No

Number of Values
per Operand:

Multiple

Multiple

With zeros at left

With zeros at left

At left

At left

•

A DC Y ('::.-A I '::.±4 )

0

At£)'

values

Padding:
Truncation of
Assembled value:

Section G: Symbol and Data Definition

195

CAU~ION:
S~ecificaticn of Y-ty~e address constants with
relocata'ble eJepressions should be avoided in ~rograms that
are to be eJeecuted en rrachines having rrore than 32,767
bytes of stcrage ca~acity. In any case, Y-type relccatable
address constants should not be used in ~rograrrs te be
executed under IEM 5ysterr/370 centrel.
A-ty~e and Y-type address constants are ~rocessed
as follows: If the nerrinal value is an absolute eJe~ressien,
it is com~uted to its 32-cit value and then truncated en
the left to fit the implicit or explicit length of tr.e
constant. If the nerrinal value is a relecatable er cero~leJe
relocatable eJepression, it is not completely evaluated
until linkage edit tirre when the ebject rredules are
transformed into load modules. ~he 24-bit (er srraller)
relocated address values are then placed in the fields
set aside fer therr at assembly tirre by the A-type and Ytype constants.
~he

G3K --

~HE

S-~YPE A~~RESS CONS~AN~

Fur~ose

You can use the S-tYfe address censtant te assemble an
explicit address (that is, an address in base~disflaeenent
form). You can specify the eJe~licit address yourself er
allow the assembler to compute it from an im~licit address,
using the current base register and address in its
computation (for details cn irr~licit and eJeplicit addresses,
see r:5B) •

Specificatiens
The contents ef the subfields defining the S-type address
constants are described in the figure on tbe op~osite ~age.
The nominal values can be specified in twe ways:

4Dt1.

~n

As one absolute or relocatable expression representing
im~licit address

~2. As two absolute eJeEressions, the first of which
A
V

196

represents the displacement and th,e second, the base
register.

0

,

I

• .

"~"t,

\

,
,~

S

[,

Address Constants (S)
Subfield

3. Constant Type
S - Type

1. Duelication Factor
Allowed

Yes

2. Modifiers
Implicit Length:
(Length Modifier not
present)

2 bytes

Alignment:
(Length Modifier not
present)

Half word

Range for length:
(in bytes)

2 only (no bit length)

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

0
}8

4. Nominal Value

Absolute or
}
relocatable expression

Represented by:

Two absolute
expressions

Enclosed by:

Parentheses

Exponent allowed:

No

Number of Values
per operand :

Multiple

Padding:

Not applicable

Truncation of
Assembled value:

Not applicable

DC S(RELOC}
DC S(10/8~
DC S(512(12})

IC XXXJ
10 4001;
[Base

DiSPlace,T~h!'J

IC 2001--""

Section G: Symbol and Data Definition

197

G3L -- THE V-TYPE

A~~RESS

CONSTANT

Pur~cse

The V-ty~e address constant allows you tc reserve stcrage
for tbe address cf a lccaticn in a contrcl section that
lies in another source module. You should use the V-ty~e
address ccnstant cnly tc tranch tc the e~ternal address
specified. This use is contrasted with another rrethcd,
that is: of specifying an external syrrtcl, identified
by an EXTRN instruction, in an A-type address ccnstant
(for a corrparison, see F2).
Because you specify a symbol in
.a V-type address constant, the
assembler assumes that it is an
external symbol. A value of zero
is assembled into the space reserved
A for the V-type constant; the correct
~relocated value of the address is
inserted into this s~ace by the
linkage editor before your object
program is loaded.

o

Source
. Module

Object Module
in Hex
A

DC V (OUTSIDE) . .

~oooooooo
B

OUTSIDE

Specificaticns
The contents cf the sutfields defining the V-ty~e address
constants are descrited in the figure on the o~~csite ~age.

The symtcl s~ecified in the ncrrinal value subfield dces
not ccnst1tute a det1nition of the symtol for the scurce
module in wbich the V-ty~e address constant a~pears.
The symbcl specified in a V-type constant rrust nct
external data in an cverlay ~rcgrarr.

198

A.

A START 0

END

o

Load Module
in Hex

re~resent

X' 3000' OUTSIDE

v
--

- ---

Address Constants (V)
Subfield

3. Constant Type
V - Type

1. Duelication Factor
allowed

Yes

2. Modifiers
Implicit l.ength: (Length
Modifier not present)

4 bytes

Alignment: (Length
Modifier not present)

Full word

Range for Length:
( in bytes)

4 or 3 only
(no bit length)

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

4. Nominal Value
Represented by:

A single relocatable
symbol

Enclosed by:

Parentheses

Exponent allowed:

No

Number of values
per Operand:

Multiple

Padding:

With zeros at left

Truncation of
assembled value:

Not applicable

DC

v (MODA)

DC

v (EXTADR)

0

Seqtion G: Symbol and Data Definition

199

Page of GC33-4010-0
Rev ised S~ptember 29, 1972
By TNL GN33-8148

r~os

!6hiy

;G3M .····.~.,;;··.TB:E ·Q~r.tY:J?EAr;i5REss cONS'iANT
Furpcse
You use this constant tc reserve sterage fer the effset
into a storage area of an external durrrry secticn~ ~hE
offset is entered intc this space by the linkage editcr.
~hen the offset is added to the address of an overall tlcck
of storage set aside fer external durrmy sections, it allows
you tc address the desired section.
(For a descripticr.
of the use ef the Q-type address ccnstant in corr.binaticn
with an external dummy section, see E4.)
Specificaticns
The contents cf the subfields defining the Q-type address
constant are described in the figure belcw.

~~he symbcl specified in the ncrrinal value subfield must
be previously defined as the label of a rxr cr rSEC~
staterrent.
Address Constants (0)
Subfield

3. Constant Type
a-Type

1. Duplication Factor
allowed

Yes

2.~

4 bytes

Implicit Length: (Length
Modifier not present)

Alignment: (Length
Modifier not present)

Fullword

Range for Length:
(in bytes)

1-4 bytes
(no bit length)

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

4. Nominal Value

200

Represented by

A single relocatable
symbol

Enclosed by:

Parentheses

Exponent allowed:

No

Number of Values per
Operand:

Multiple

Padding:

With zeros at left

Truncation of
Assembled Value

At left

DC Q(DUMM~EXT10
DC Q(DXDEXT}

G3N -- TEE [S INSTRUCTICN
Pur~ose

The [S instruction allows you to:
1. Reserve areas cf stcrage
2. Previde latels fcr these areas
3. Use these areas by referring to the syrotols defined
as latels.
Tlle [S instruction causes no data tc be asserrbled. Unlike
the DC instruction (see G3E) , you do nct have tc s~ecify
the nominal value (fcurth subfield) of a DS instructicn
operand. Therefore, the rs instruction is tte test way
of synbolically defining storage for work areas,
input/out~ut buffers, etc.

Named (Mnemonic) Areas Aligned on
Areas for F ixedBoundary
Point Instructions

How to Use the DS Instruction
TO RESERVE STORAGE; If yeu wish
to take advantage of automatic
toundary alignment (if the ALIGN
•
option is specified) and implicit
~ length calculation, you should not
supply a length modifier in your
operand specifications. You should
specify a type subfield that
corresponds to the type of area
you need for your instructions
(See individual ty~es in sections
G3D through G3M) •

•

Length Attribute of
Symbols Naming Areas
same as Implicit
Length of Areas

•

FAREA DS F

Full word

HAREA DS H

Half word

AAREA DS A

Full word

4

DUPF}?!

t:ull word

L'DUPF=4

.,:«« iF ..

4
2

Juplication has no
effect on implicit
length

10 full words of
storage reserved

Named Areas for
F loati ng-Po i nt
Instructions

\

~

EAREA DS 3E

Full word

DEAREAS~R
...... c

c>b

I H2B --

THE ISEQ

o

INS~RUCTION

80

73

Purpose

Compares made

G

ISEQ 73,80

O
•
•

ONE with TWO

I

TWO

TWO with THREE

\

I

THREE

THREE with FOUR

I

I

FOUR

FOUR with FIVE

L

You can use the ISEQ instruction
to cause the assembler to check
if the statements in a source module
are in sequential order. In the
ISEQ instruction you specify the
columns between which the assembler
is to check for sequence nurobers.

I

\
}

assembler begins sequence
checking with the first sta tement
line following the ISEQ instruction.
The assembler also checks
continuation lines.
~he

•

) I

ONE

)

trION

CARD

l~

Sequence numbers on adjacent
statements or lines are compared
according to the 8-bit internal
EBCDIC collating sequence. When
the sequence number on one line
is not greater than the sequence
number on the preceding line, a
sequence error is flagged, and a
warning message is issued, but the
assembly is not terminated.

FIVE

-

and so on

1

NOTE: If the sequence field in the
preceding line is blank, the
assembler uses the last preceding
line with a non-blank sequence field
to make its comparison.

ISEQ
Specifications
Operation

Name

The ISEQ instruction initiates or
terminates the checking of the
sequence of statements in a source
module.
.

Operand

ISEQ

Blank

I, r
or blank

I)

format of the ISEQ instruction
is shown in the figure to the right.

~he

8
.
•
•
•

Specifies

Column

The first option in the operand
entry must be two decimal selfdefining terms. This format of
the ISEQ instruction initiates
sequence checking, beginning at
the statement or line following
the ISEQ instruction. Checking
begins at the column re~resented
by 1 and ends at the column
represented by r . The second
option of the ISEQ format terminates
the sequence checking operation.

•
•

leftmost column of
field to be checked

I~

Rules for interaction
ISr

I must not be
greater than r

r~1

r must not be
less than I

.........
I and r not allowed
to lie between begin
and end columns

.r ..-----

rightmost column
of field to be checked

Section H: Controlling the Assembler Program

221

Ii

NOTE: The assembler checks only
those statements that are specified
in the coding of a source module.
This includes any COpy instruction
statement or macro instruction.

Source Module

FIRST

START

0

ISEQ

73,80

T

However, the assembler does not
check:

checking
occurs

1. Statements inserted by a COpy
instruction

+

ISEQ

T

2. Statements generated from model
statements inside macro definitions
or from model statements in open
code (staterrent generation is
discussed in detail in section J)

checking
does not
occur

ISEQ

73,80 "

3. Statements in library macro
definitions.

T

checking
resumed

END

~

H3 .. Listing Format and Output
The instructions described in this
section request the assembler to
produce listings and identify output
cards in the object deck according
to your special needs. They allow
you to determine printing and page
formatting options other than the
ones the assembler program assumes
by default. Among other things,
you can introduce your own page
headings, control line spacing,
and suppress unwanted detail.
H3A -- THE PRINT INSTRUCTION
Hierarchy

Purpose
The PRINT instruction allows you
to control the amount of detail
you wish printed in the listing
of your programs.
The three options
that you can set are given in the
figure to the right.
'They are listed in hierarchic order;
if OFF is specified, GEN and CATA
will not apply.
If NOGEN is
specified, CATA will not apply to
constants that are generated.
The
standard options inherent in the
assembler program are ON, GEN, and
NODATA.

222

1

2

Description
A listing is printed

ON

No listing.is printed

OFF

All statements generated by the
processing of a macro instruction
are.winted

GEN

Statements generated by the
processing of a macro instruction
are not Rrinted (Note: The
MNOTE instruction always causes
a message to be printed)

3

PR I NT options

Constants are printed in full in
the listing
Only the leftmost eight bytes of
constants are printed in the
listing

NOGEN

DATA

NODATA

Specifications

PRINT
~he

o

format of the PRINT instruction
statement is shown in the figure
to the right.

Name

At least one of the oFerands must
be specified, and at most one of
the options from each group.
The
PRINT instruction can be specified
any number of times in a source
module, but only those print options
actually specified in the instruction
change the current print status.

Operation

Operand

A sequence
symbol or
blank

PRINT

{[ON ] [GEN ] [ NODATAl
,.,,~,:.:..~NOGEN ,DATA

PRINT options can be generated by
macro processing, at pre-assembly
time.
However, at assembly time,
all options are in force until the
assembler encounters a new and
opposite option in a PRINT
instruction.

as
only

The PUSH. and POP instructions;
described in H6 ,also influen~e
theiJ?RI N.T options by saving .•. . and
restoring the PRINT status.
NOTE: The option specified in a
PRINT instruction takes effect after
the FRINT instruction. If PRINT
OFF is specified, the PRINT
instruction itself is printed, but
not the statements that follow it.
If the NOLIST asserobler option is
specified in the job control
language, the entire listing fer
the assembly is suppressed.

Section H: Controlling the Assembler Program

223

Page of GC33-401O-S
As Updated 28 Dec 1981
By TNL GN20-9372

TITLE ' THIS IS A HEADING'

Program Listing

H3B -- THE TITLE INSTRUCTION

e

THIS IS A HEADING

Purpose
The TITLE instruction allcws you
to:

~ 1. provide headings for each fage
of the assembly listing of your
source modules.

•
•

2. Identify the assembly output
cards of your object rocdules. You
can specify up to 8 identification
characters that the assembler will
punch into all the output cards,
beginning at column 73.

•

·PROG

TITLE

'heading'

DOS ·.Up.~()4i<3entif~c~~ion ch

areiallowed;.

•

The assembler punches sequence
numbers into the columns that are
left, up to column 80.

PROG 0003
PROG 0002
73

, Object Deck

80

e.

PROG 0001

NOTE: The name field of the TITLE
instruction is generated throughout
the assembly listing, preceding the
generation of the operand data from
any TITLE instruction.

Specifications
The format of the TITLE instruction
statement is given in the figure
to the right.

\

---'-----

Any of the five options can be
specified in the name field.

~ 'Ihe first three options for the

name field have a special
significance only for the first
TITLE instruction in which they
are specified. For subsequent TITLE
instructions, the first three opticns
do not apply •.

224

TITLE

Name

Operation

Operand

.2lltion

e{;
4
5

A string of alphameric characters
A variable symbol
A combination of
1 and 2
A sequence symbol
blank

TITLE

A character
string up to .
100 characters, enclosed in
apostrophes

o

For the first TITLE instruction
of a source module that has a nonblank name entry that is not a
sequence symbol, the follcwing
applies:

Object
Deck

Up to eight alphameric characters
can be specified in any combination
in the name field.

DOS Up to four a+phameric characters
;canbe, specified.

•

•

Examples of TITLE instructions
in separate source modules:

These characters are punched as
identification, beginning at column
73, into all the out~ut cards from
the assembly, except those produced
by the PUNCH and REPRO instructions •
The assembler SUbstitutes the current
value into a variable Symbol and
uses the generated result as
identification characters •
If a valid ordinary symbol is
specified, its appearance in the
name field does not constitute a
definition of that symbol for the
source module.
It can therefore
be used in the name field of any
other staterrent in the same source
module.

Source Statement

Value of
variable symbol

Punched into cards
beginning at col. 73

&ID~~T_I_T_L_E__-+___M_O_D_9_9_A
____~___M
__
O_D_9_9_A____~
PGM&N1

TITLE

1234

TITLE

•

SYMBOL TITLE

200

PGM200

1234
SYMBOL

Section H: Controllling the Assembler Program

225

o

The character string in the operand
field is printed as a heading at
the top of each page of the assembly
listing. The heading is printed
beginning on the page in the listing
following the page on which the
TITLE instruction is specified.
A new heading is printed when a
subsequent TITLE instruction appears
in the source module.
Each TITLE statement causes the
listing to be advanced to a new page
(before the heading is printed)
except when PRINT NOGEN is in use.
Any printable character specified
will appear in the heading, including
blanks. Variable symbols are allowed.
However, the following rules apply
to ampersands and apostrophes:

TITLE 'HEADING OE~

~HEADING

____

ONE '

V

L - - -_ _

Examples of headings:
Source Statement

•

TITLE 'HEADING &N'
•

e

• A single ampersand initiates
an attempt to identify a variable .'
symbol and to SUbstitute its current'
value.
0
Double ampersands or apostrophes
specified, print as single ampersands
or apostrophes in the heading.

~.

A single apostrophe followed
by one or more blanks simply
terminates the heading prematurely.
If a non-blank character follows
a single apostrophe, the assembler
issues an error message and prints
no heading.
Only the characters printed in the
heading count toward the maximum
of 100 characters allowed.
NOTE: The TITLE statement itself
is not printed in an assembly
listing.

226

TITLE 'HEADING

TITLE' HEADING FOU.,
, FIVE'

TITLE 'HEADING FOUR'REMARKS
"'*ERRORn

Value
Printed Heading
of
Variable
Symbol

TWO HEADING TWO
HEADING & '

HEAD ING FOUl

H3C -- THE EJECT INSTRUCTION

Purpose
The EJECT instruction allows you
to stop the printing of the assembly
listing on the current page and
continue the printing cn the next
page.

EJECT
Specifications

.

Name

The format of the EJECT instruction
statement is shown in the figure
to the right.
The EJECT instruction causes the
next line of the assembly listing
to be printed at the top of a new
page. If the. line before the EJECT
instruction appears at the bottom
. of a page, the EJECT instruction
has no effect. An EJECT instruction
immediately following another EJECT
instruction causes a blank page
in the listing.

o
•

A sequence
symbol or
blank

NOTE: The EJECT instruction
statement itself is not printed
in the listing.

.

...

- ..

Operand

Operation

Not required

EJECT

Source Module

Listing

Page
Previous statementBoundary - - - ~;E~;.

--........ ,

Page
Boundary

Source Text
I

_ _ _ _ _ _ __

Page
Boundary

Section H: Controlling the Assembler Program

227

H3D -- THE SPACE

INS~RUCTION

Purpose
You can use the SPACE instruction
to insert one or more blank lines
in the listing of a source module.
~his allows you to separate sections
of code on the listing ~age.
SPACE

Specifications
The format of the SPACE instruction
statement is given in the figure
to the right.

Name

Operation

Operand

A sequence
symbol or
blank

SPACE

A decimal
self-defining term
or blank

The operand entry s~ecifies the
number of lines to be left blank.
A blank operand entry causes one
blank line to be inserted. If the
operand specified has a value greater
than the number of lines remaining
on the listing page, the instruction
will have the same effect as an
EJECT statement.
NOTE: The SPACE instruction itself
is not listed.

H4 - Punching Output Cards
The instructions described in this section produce punched
cards as output from the assembly in addition to those
produced for the object module (object deck) .•
H4A -- THE FUNCH INSTRUCTION

PUrpose
The PUNCH instruction allows you to punch source or other
statements into a single card. With this feature you can:
1. Code PUNCH statements in a source module to produce
control statements for the linkage editor. The linkage
editor uses these control statements to process the otject
module.
2. Code PUNCH statements in. macro definitions to ~roduce,
for example, source statements in other computer languages
or for other processing phases.
The card that is punched has a physical position irrmediately
after the PUNCH instruction and before any other TXT cards
of the object decks that are to follow.
228

Specifications

Object Module
(Card Deck)

Source Module

The PUNCH instruction causes the
data in its oferand to be punched
into a card. One PUNCH instruction
produces one punched card, but as
many FUNCH instructions as necessary
can be used.

O
•
•

MACRO
MACDEFI
MEND
MACRO
MACDEF2

The PUNCH instruction statement
can appear anywhere in a source
module except before and between
source macro definitions.
If a
PUNCH instruction occurs before
the first control section, the
resultant card punched will precede
all other cards in the object deck.

•

MEND
PUNCH

FIRST START

0

~The

cards punched as a result of
~a PUNCH instruction are not a logical
part of the object deck, even though
they can be physically interspersed
in the object deck.

PUNCH
PUNCH

END

PUNCH
The format of the PUNCH instruction
statement is shown in the figure
to the right.
All 256 punch combinations of the
IBM System/370 character set are
allowed in the character string
of the operand field. Variable
symbols are also allowed.

Name

Operation

Operand

A sequence
symbol or
blank

PUNCH

A character string of
up to 80 characters,
enclosed in apostrophes

Section H: Controlling the Assembler Program

229

PUNCH

position
O The
specified in

of each character
the PUNCH statement
~corresponds to a column in the card
to be punched.
However, the
following rules apply to ampersands
and apostro}:hes:

o

Position

1. A single ampersand initiates
an attempt to identify a variable
~symbol and to sUbstitute its current
value.

1234567

13 15

21

PUNCH
This position - - '
is always
column 1

ampers~nds

2. Double
or apostrophes
punched as s1ngle ampersands
0 orare
apostrophes.
3. A single aEostrophe followed
blanks simply
string of characters
punched.
If a non-blank character
follows a single apostrophe, an
error message is issued and nothing
is punched.

one or more
8 by
terminates the

1234567

Only the characters punched,
including blanks, count toward the
maximum of 80 allowed.

Examples:

NO'I'ES:

Source
Statement

1. No sequence number cr
identification is punched into the
card produced.

2. If the NCCECK option is specified
in the EXEC statement of the job
control language for the assemtler
program, no cards are punched:
neither for the PUNCH or REPRO
instructions, nor for the object
deck of the assembly.

PUNCH 'CHARS

PUNCH 'CHARS

13 15

•
•
•

&VAR'

/\

&& '"

PUNCH 'CHARS A' B'

!

•

21

Column

Value of
Variable
Symbol

Characters
Punched

ABC

CHARS ABC

CHARS &'

CHARS A

PUNCH 'CHARS A'REMARKS
;!: ;',: ~:: ERROR;:: :;: :;:

PUNCH 'CHARS A' REMARKS

2'30

CHARS A

n4B -- THE REPRO

INS~RUCTION

Source Module

purpose
~he

REPRO instruction causes the
data specified in the statement
that follows to be punched into
a card.
Unlike the PUNCH
instruction, the REPRO instruction
does not allow values to be
substituted into variable symbols
tefore the card is punched.

Repro appears before
start of first control
section; punched card
will precede object
deck

IMACDEF2
REPRO
data 1
FIRST

START

o

REPRO
data 2
REPRO
data 3
Specifications
~he REPRO instruction
on the statement line
it to be punched into
corresponding columns
One REPRO instruction
punched card.

•

END
causes data
that follows
the
of a card.
produces one

The REPRO instruction can appear
anywhere in a source .module exceFt
before and between source macro
A
definitions. The Funched cards ~
are not part of the object deck,
even though they can be physically
interspersed in the object deck.

" ,-" ' '""I
'

"I

;

~ ~ r~

~

',"f'

RERR0

The format of the REPRO instruction
statement is shown in the figure
to the right.

-"'I!

~~J

'

J

.

Name

The line to be reproduced can contain
any of the 256 punch characters,
including blanks, ampersands, and
apostrophes. No substitution is
performed for variable symbols.

A sequence
symbol or
blank

Operation

REPRO

I

,',

Operand
Not required

NOTES:
1.
No sequence numbers or identification is punched in
the card.

2. If the NODECK option is specified in the job control
language for the assembler program, no cards are punched:
neither for the PUNCH or REPRO instructions, nor for the
object deck of the assembly.
Section H: Controlling the Assembler Program

231

Jls.·
. •.••·• 1U@~~#}9·.·• ·.·~y~~ii~··. ··()~~t~~qit•·.•· .¢dd.es
as
only

H5A -- THE OPSYN INS'I'RUCTION

Purpose
The OPSYN instruction allows you
to define your own set of symbols
to represent operation codes for:
1. Machine and extended mnemonic
tranch instructions.

2. Assembler instructions including
conditional assembly instructions.
You can also prevent the assembler
from recognizing a symbol that
represents a current operation code.

OPSYN
Specifications
Name

The OPSYN instruction wust be written
after the ICTL instruction and can
be preceded only by the EJEC~, ISEQ,
PRINT, SPACE, and TITLE instructions.
The CFSYN instruction must precede
any source macro definitions that
may be specified.
The OPSYN instruction has two basic
formats as shown in the figure to
the right.

o

•

Any
symbol or
operation
code

Operation

Operand

An operation
COde.

OPSYN

or

An
operation
code

blank

OPSYN

The operation code specified in
the name field or the oFerand field •
must represent either:
1. The operation code of one of
the machine or assembler instructions
as described in PARTS II, III, and
PART IV of this manual, or

2. The operation code defined by
a previous CFSYN instruction.

A

The OPSYN instruction assigns the
of the operation code
specified in the operand field to
the symbol in the name field. A
~ tlank in the operand field causes
the operation code in the name field
to lose its properties as an
operation code.
~properties

232

NEW

OPSYN

OPSYN

MVC

•

No longer recognized
by the assembler as
a valid operation code
in current source module

o

LR

Both now possess the
properties of the LR
machine instruction
operation code

NOTE: The symbol in the name field

can represent a valid operation
O code.
It loses its current

•
•

properties as if it had been defined
in an OPSYN instruction with a blank
operand field.
Further, when the
same symbol appears in the ~
field of two OPSYN instructions
the latest definition takes
precedence.

STOB.Ef

OPSYN

ST

STH •

Now represents
STH machine
operation

Section H: Controlling the Assembler Program

233

t{6i±--.§aYill9dand
.• . Rest()ring.Progra#tt'ni1\g . ~vir()ri1'll~ntfJ
.
OS~

The instructions described in this subsection can save
and restore the status of PRINT options and the base
register assignment of your program.
H6A -- THE PUSH INSTRUC'rION
Purpose
The PUSH instruction allows you to save the current PRINT
or USING status in "push-down" storage on a last-in, firstout basis. You can restore this PRINT and USING status
later, also on a last-in, first-out basis, by using a
corresponding POP instruction.

PUSH

Specifications
The format of the PUSH instruction
statement is shown in the figure
to the right.
One of the four options for the
operand entry must be specified.
The PUSH instruction does not change
the status of the current PRINT
or USING instructions; the status
is only saved.

Name

Operation

Operand
Options

A sequence
symbol or
blank

PUSH

PRINT
1
USING
2
PRINT,USING 3
USING,PRINT 4

NOTE: When the PUSH instruction
is used in combination with the
POP instruction, a maximum of four
nests of PUSH PRINT - POP PRINT
or PUSH USING - POP USING are
allowed.
H6B -- THE POP INSTRUCTION
purpose
The POP instruction allows you to restore the PRINT or
USING status saved by the most recent PUSH instruction.

I

POP

Specifications
The format of the POP instruction
is given in the figure to the right.

Name

One of the four options for the
operand entry must be sFecified.
The PCP instruction causes the
status of the current PRINT or USING
instruction to be overridden by
the PRINT or USING status saved
by the last PUSH instruction.

A sequence
symbol or
blank

NOTE: When the POP instruction
is used in combination with the
PUSH instruction, a maximum of four
nests of PUSH PRINT - POP PRINT
or PUSH USING - POP USING are
allowed.
234

Operation

Operand
Options

POP

PRINT
1
USING
2
PRINT,USING 3
USING,PRINT 4

Page of GC33·4010·4
Revised Feb. 25, 1975
By TNL: GN33·8193

H6C-- COMBINING PUSH AND POP

as

Source Module

~n.lV

MACRO
NEW
PUSH

USING

USING

BASENEW,12

POP
, MEND

Storage Stack
for saved
USING status

USING

FIRST START
USING

O

BASE,12

In the opposite exarn~le, you c a n .
see how the USING environment i.s
saved and restored by a combination
of PUSH and PCP instructions.

LJ

NO'I'E: The PUSH instruction does
change the current USING status;
~you must do this yourself.
~not

BASENEW, 12

Section H: Controlling the Assembler Program

235

236

Part IV: The Macro Facility
SECTION I: INTRODUCING MACROS
SECTION J: THE MACRO DEFINITION
SECTION K: THE MACRO INSTRUCTION
SECTION L: THE CONDITIONAL ASSEMBLY LANGUAGE

237

This page left blank intentionally.

Section I: Introducing Macros

This section introduces the basic macro concept; what you
can use the macro facility for, how you can prepare yeur
own macro definitions, and how you call these macro
definitions for processing by the assembler.
Read this section straight through before referring to
the detailed descriptions identified by the cross-reference
arrows.
NOTE: IBM supplies macro definitions in system libraries
for input/output and other control program services, such
as the dynamic allocation of main storage areas. To ~rccess
these macro definitions yeu only have to write the macro
instruction that calls the definition.

Section I: Introducing Macros

239

Page of GC33-4010-4
Revised Feb. 25. 1975
By TNL: GN33-8193

Using Macros
FOR TEXT INSERTION: The main use of macros is to insert
assembler language statements into a source prog.ram.

Pre-assembly
or macro processing time

Source Module

Macro Definition

BEFORE

Source Module

AFTER
Name=TEXTIN

D

E
F

G
J

H

K

I

L

K

L

You call a named sequence of statements (the macro
by using a macro instruction, or macro call.
~he assembler replaces the macro call by the statements
from the macro definition and inserts them into the source
module at the point of call. The process of inserting
the text of the macro definition is called macro generation
or macro expansion. The assembler expands a macro at ~re­
assembly tiroe.

~definitiOn)

a

~he expanded stream of code then becomes the input for
processing at assembly time, that is, the time at which
the assembler translates the machine instructions intc
object code.

240

FOR TEXT MOPIFICATION: You may want to modify the
statements in a macro definition tefore they are generated.

8

You can do this by supplying character string values as
operands in a macro call. These values replace parameters
in the statement to be generated. This means that you
can change the content of the generated statements each
time you call the macro definition.

Source Module

Macro Definition

GlseeK3)
8lseeJ3)

Generated Result

G

!c

___

M9P~t.X·.··.·.E~

The Basic Macro ConceEt
To use the complete macro facility provided by the assembler
you must:
•

Prepare a macro definition and

•

Call this definition using a macro instruction.

Prototype

These statements
establish limits of
a macro definition

0 ___,,-________

Body of a
macro
definition

r
)

Sequence of
Statements

MEND

Macro Instruction

[fJ

MAC NAME

You can create a macro definition ty enclosing any sequence
of assembler language statements between the MACRO and
~MEND statements, and by writing a prototype statereent in
which you give your definition a name. This name is then
~the operation code that you must use in the macro
instruction to call the definition.

oI

SeeJ2C

>

~ I seeK2B)

Section I: Introducing Macros

243

~When you write a macro instruction in your source rrodule,
you tell the assembler to process a particular macro
~definition. The assembler produces assembler language
statements from this macro definition for each macro
instruction that calls the definition.
Source Module

Definition

Generation of
assembler
language statements

I

MANY

I

By using the macro facility you reduce programming effort,
because:

1. You write and test the code a macro definition contains
once. You and other programmers can then use the same
code as often as you like by calling the definition; which
means that you do not have to reconstruct the coding logic
each time you use the code.
2. You need write only one macro instruction to call for
the generation of many assembler language statements froIT:
the macro definition.
When you are designing and writing large assembler language
programs, the above features allow you to:
• Prepare macro definitions, containing difficult code,
for your less experienced colleagues. They can then call
your definitions to generate the appropriate statements,
without having to learn the code in the definition.
• Change the code in one place when updating or making
corrections, that is, in the macro definition. Each call
gets the latest version automatically, thus providing
standard coding conventions and interfaces.
• Describe the functions of a complete macro definition
rather than the function of each individual statement it
contains, thus providing more comprehensible documentation
for your source module.
244

81
_I

>

See SECTION K )

See SECTION J

Defining a Macro
Defining a macro means preparing the statements that
constitute a macro definition. To define a macro you must:
1. Give it a name
2. Declare any parameters to be used
3. write the statements it contains.
4. Establish its boundaries

...... MACRO
Prototype

MACID &PARAMl, &PARAM2

•
•
•I •
•
.... \

~

I

Body of Macro

• MEND

Macro Instruction

MACrD OPERANDl,OPERAND2

4Dt The

MACRO and MENC instructions establish the boundaries
of a macro definition.

I
·

you use the prototype statement to name the macro and to
declare its parameters.
In the operand field of the macro
instruction, you can assign values to the parameters
declared for the called macro definition.

4EtThe body of a macro definition contains the state~ents
that will be generated when you call the macro. These
statements are called model statements; they are usually
interspersed with conditional assembly statements or ether
processing statements.

••
••

See J2D
See J3
SeeK2C
See J2 E

>
>
>
>

Section I: Introducing Macros

245

WHERE YOU CAN PLACE A MACRO DEFINITION: You can include
a macro definition at the beginning of a source module.
This type of definition is called a source macro definition.

•

•

You can also insert a macro definition in a systerr. or user
library (located, for example, on disk) by using the
appropriate utility program. This type of definition is
called a library macro definition. The IBM-supplied macro
definitions mentioned earlier are examples of library rracro
definitions.

Generated Result

Source Module

A
B

SOUR,CE

C'

D

Macro Library

o

o

MACRO

MACRO

MEND

MEND

•

LIB2

LIB2

LIB2

Source
Module II
Source
Module III

Source
Module I

Calling a Macro

~YOu
•·
246

can call a source macro definition only from the source
module in which it is included. You can call a library
macro definition from any source module.

0

1 See

J 1B

>

O

WHERE YOU CAN CALL A MACRO CFFINITION: You can call a
macro definition by specifying a macro instruction anywhere
in a source module, except before or between any source
macro definitions that may be specified.

Source
Module

Macro Definitions

MACRO

8

8

1 SeeK1B

>

Generated
Result

MACRO

A
B

OUTER""
C

D

You can also call a macro definition from within another
'A macro definition. This type of call is an inner macro
'~call; it is said to be nested in the macro definition.

8

1

SeeK6A ' )

Section I: Introducing Macros

247

The Contents of a Macro

~efinition

The body of a macro definition can contain a combination
of model statements, processing statements, and comments
statements.

Generated Statements

Model Statements

o

A

A

•
X=A
Y=B
Z=C

MODEL

STA~EMENTS:

You can write assemtler language
as model statements. The assemtler copies them
exactly as they are written when it expands the macro.
You can also use variable symbols as points of sutstitution
in a model statement.
The assembler will enter values
in place of these points of substitution each time the
macro is called.

4Dt statements

8

1m m@1

0

I ~eJ4

248

r

>

The three types of variable symbol in the assembler language
are
1. Symbolic parameters, declared in,the prototype statement
2. System variable symbols (see J7)
3. SET symbols, which are part of the conditional assembly
language (see L1A).
The assembler processes the generated statements, with
or without value substitution, at assembly time.
PROCESSING STATEMENTS: Processing statements perform
functions at pre-assembly time when macros are expanded,
but they are not themselves generated for further processing
at assembly time. The processing statements are:
1. Conditional assembly instructions
2. Inner macro calls
3. The MNOTE instruction
4. The MEXIT instruction.

Pre-Assembly Time

Assembly Time

Macro
Definition

Message printed
in program
listings

4Dt The

o

•

81

MNOTE instruction allows you to generate an error
message with an error condition code attached, or to
generate comments in which you can display the results
of pre-assembly computation •

•

The MEXIT instruction tells the assembler to stop processing
a macro definition.
The MEXIT instruction therefore
provides an exit from the middle of a macro definition.
The MEND instruction not only delimits the contents of
a macro definition but also provides an exit from the
definition.

1 SeeJ50 , )

See J 5 E

>

Section I: Introducing Macros

249

STATEMENTS: One type of comments statement
describes pre-assembly operations and is not generated.
The other type describes assembly-time operations and is
therefore generated (for details see J6).
COM~ENTS

The Conditional Assembly Language
The conditional assembly language is a programming language
with most of the features that characterize such a language.
For example, it provides:
1. Variables
2. Data attributes
3. Expression computation

4. Assignment instructions
5. Labels for branching
6. Branching instructions
7. Sul:string operators that select characters from a string.

You can use the conditional assembly language in a macro
definition to receive input from a calling macro
instruction. You can produce output from the conditional
assembly language by using the MNOTE instruction.
You can use
language to
their order
that affect

the functions of the conditional assembly
select statements for generation, to determine
of generation, and to perform computations
the content of the generated statements.

The conditional assembly language is fully described in
Section L.

250

.11

Section J: The Macro Definition

This section describes macro definitions: where they can
ce placed in order to be available to call, how they are
specified, and what they can contain.

Jl -- Using a Macro Definition
J1A -- PURPCSE

A macro definition is a named sequence of statements which
you can call with a macro instruction. When it is called,
the assembler processes and usually generates assembler
language statements from the definition into the source
module. The statements generated can ce:
1. Copied directly from the definition,
2. Modified by parameter values before generation, or
3. Manipulated by internal macro processing to change
the sequence in which they are generated.
You can define your own macro definitions in which any
combination of these three processes can occur. Some rracro
definitions do not generate assembler language statements,
but perform only internal processing, like some of the
macro definitions used for system generation.

Section J: The Macro Definition

251

J1B -- SPECIFICATIONS

Where to Define a Macro In a Source
Module
A macro definition within a source
module must be specified at the
beginning of that source module.
This type of macro definition is
called a source macro definition.
A macro definition can also reside
in a system library; this type
of macro is called a library macro
definition. Either type can be
called from the source module by
the appropriate macro instruction.
NOTE: A source macro definition
can be entered into a library and
thereby become a library macro
definition. A library macro
definition can be included at the
beginning of a source module and
thereby become a source macro
definition.
Some control and comments statements
can appear at the beginning of a
source module along with the source
macro definitions. They can be
used:
•

Eefore all macro definitions.

•

Between macro definitions.

•

After macro definitions and before
open code

Open Code
Source Module

Corrunents

Corrunents

All other statements of the assembler
language must appear after any
source macro definitions that are
specified.

Open Code
•

252

Open code is that part of a source
module that lies outside of and
after any source macro definition.
Open code is initiated by any
statement of the assembler language
that appears outside of a macro
definition, except the ICTL, OPSYN,
ISEQ, EJECT, PRINT, SPACE, or TITLE
instruction, or a comments statement.

•

At coding time, it is important
to distinguish between source
statements that lie in open code
and those that lie inside macro
definit ions.
NOTES:
1. The ISEQ, EJECT, PRINT, SPACE,
and TITLE instructions, and one
or more comments statements, can
appear between source macro
definitions and the start of open
code •. However, in this position,
the above instructions must not
contain any variable symbols.
2. After the start of open code,
variable symbols are allowed in
any statement.

Macro Defn

3. A macro definition must not be
specified after the start of open
code.
.

The Format of a Macro Definition
The general format of a macro
definition is shown in the figure
to the right.

MACRO

(Header Statement)

ANYNAME

(Prototype Statement)

Body of Macro

The four parts are described in
detail below.
MEND

(Trailer Statement)

Section J: The Macro Definition

253

J2 -- Parts of a Macro Definition
J2A -- THE

~ACRO

DEFINITION HEADER

Purpose
The macro definition header
instruction indicates the beginning
of a macro definition.

Header
Specifications
The MACRO instruction is the macro
definition header; it must be the
first statement of every macro
definition. Its format is given
in the figure to the right.

Name
Not used,
must not be
present

Operation

MACRO

Operand
Not required

J2B -- THE MACRO DEFINITION TRAILER

purpose
The macro definition trailer
instruction indicates the end of
a macro definition.
It also provides
an exit when it is processed during
macro expansion.

Trailer

Specifications
The MEND instruction statement is
the macro definition trailer; it
must be the last state~ent of every
macro definition. Its format is
given in the figure to the right.

254

Name
A sequence
symbol, or
not used

Operation

MEND

Operand
Not required

J2C -- THE MACRO PROTOTYPE STATEMENT: CODING

purpose
The prototype statement in a macro
definition serves as a model
(prototype) of the macro instruction
you use to call the rr.acro definition.

Specifications
The prototype statement must be
the second statement in every macro
definition. It comes immediately
after the MACRO instruction.
The format of the prototype statement
statement is given in the figure
to the right.
The maximum number of symbolic
parameters allowed in the operand
field is not fixed. It depends
on the amount of virtual storage
available to the program.

Prototype

Name
A name
field
parameter
or blank

Operation

Operand
Zero or more
symbolic
parameters
separated by
commas

~Q&~('jnlY{··.~QO.• )P.a.rarn~t~;-siarE!.allowed.·.'.·.·in·
;;L, (>the.•·. . PPeX'and•. . ·. . field.,
If no parameters are specified in
the operand field, remarks are
allowed, if the absence of the
operand entry is indicated by a
comma preceded and followed by one
or more blank s •

Section J: The Macro Definition

255

Prototype Statements

Alternate Ways of Codinq the
prototype Statement

standard value for
column after End
column is 72

The prototype statement can be
specified in one of the following
three ways:
O'Ihe normal way, with all the sym1:olic
parameters preceding any remarks.

4Bt An
alternate 'way, allowing
for each parameter.
•

remarks
after each parameter
except last

A combination of the first two ways.
MOVE

NOTES:

•

•
•

1. Any number of continuation lines
is allowed. However, each
continuation line must be indicated
by a nonblank character in the column
after the end column on the preceding
card.
2. For each continuation line, the
operand field entries (symbolic
parameters) must begin in the continue
column otherwise the whole line and
any lines that follow will be
considered to contain remarks.

•o

FIELD TO
FROM, FLD. FROM WHICH
LENGTH, MOVE LENGTH
INDEXl
INDEX2

!

PARAMl5
REMARKS CONTINUED
ON NEXT LINE,
NEXT

Column 16
One or more
blanks required

\
•

MOVE

Comma required
after each

x

I

TO,
ATA MOVED TO
FROM, DATA MOVED FROM
LENGTH, NO OF BYTES
x
PARAMl, &PARAM2, &PARAM3, ...... .
PARAM15 REMARKS CONTINUED

.~~_:_:_;_:t_I:_:t___.~ON

LAST LINE

o
J2D -- THE MACRO PROTOTYPE STATEMENT: ENTRIES

The Name Entry

Purpose
You can write a name-field parameter similar to the sywbclic
parameter, as the name entry of a macro prototype statement.
You can then assign a value to this parameter from the
name entry in the calling macro instruction.

256

•

x

Specifications

I

If used, the name entry must be
a variable symbol.
If this parameter
also appears in the body of a macro,
it will be given the value assigned
to the parameter in the name field
of the corresponding rnacrc
instruction. Note that the value
assigned to the name field parameter
has special restrictions that are
listed in K2A.

•

Source Module

MOVE
The Operation Entry
MVC

Purpose
The operation entry is a symbol
that identifies the macro definition.
When you specify it in the operation
field of a macro instruction, the
appropriate macro definition is
called and processed by the
assembler.

~
HERE

MEND
START

•

The symbol in the operation field
of the prototype statement
establishes the name by which a
macro definition must be called •
This name becomes the operation
code required in any macro instruction that calls the macro.

0

MOVE FIELDA,FIELDB

,

HERE

Specifications
•

&TO,&FROM

MVC FIELDA,FIELDB

END

OSOOT.E.: ..... UnlElssopercJ,tioh ···.·codes . • • ba ve
(ll')JY~~P9l?:~ng~~.:pYi't7l'1~ .•·. ()I>9X~

·instruction, the operation code
specified in the prototype statement
must not be the same as that
specified in:
1. A machine instruction.
2. An assemtler instruction.
3. The prototype statement of another
source (or library) macro definition.

section J: The Macro Definition

257

The Operand Entry
Purpose
The operand entry in a prototype statement allows you to
specify positional or keyword parameters. These parameters
represent the values you can pass from the calling macro
instruction to the statements within the body of a macro
definition.

Specifications
The operands of the macro prototype statement must be
symbolic pararoeters separated by commas. They can be
positional parameters or keyword parameters or both (see
J3) •

NOTE: The operands must be symbolic parameters; parameters
in sublists are not allowed. For a discussion of sublists
in macro instruction operands, see K4.

258

J2E -- THE BODY OF A MACRO DEFINITION

Purpose
The body of a macro definition
contains the sequence of statements
that constitutes the working part
of a macro. You can specify:
1. Model statements to be generated.

2. processing stateITents that, for
example, can alter the content and
sequence of the statements generated
or issue error messages.
3. Comments statements, some of
which are generated and others which
are not.

4. Conditional assembly instructions
to compute results tc be displayed
in the message created by the MNOTE
instruction; without causing any
assembler language statements to
be generated.

Specifications
The statements in the body of a
macro definition must appear between
the macro prototype statement and
the MEND statement of the definition.
The three main types of statements
allowed in the body of a macro are:

Result of Macro
Expansion
Machine
Instructions

•

Assembler
Instructions
Statements with
variable symbols
in
Name,Operation
and/or Operand
Fields

~ • Model statements (see J4) ,
• • processing statements (see J5) ,
and

~ • Comments statements (see J6) •
NOTE: The cody of a macro definition
can be empty, that is, contain no
st at ements •

Conditional
Assembly
Instructions
Macro (Inner)
Instructions
MNOTE
Instruction
MEXIT
Instruction

Internal
Ordinary

Section J: The Macro Definition

259

J3 -- Symbolic Parameters

Source Module

Purpose
Symbolic parameters allow you to

values into the body of a macro
O pass
definition from the calling macro
•
•
•,

MVC

instruction. You declare these
parameters in the macro prototype
statement. They can serve as points
of substitution in the body of the
macro definition and are replaced
by the values assigned to them by
the calling macro instruction.

:l[

r

.,",".I:\.rU·Jl.J.. ,

&PARAM2

MEND
OPEN START

By using symbolic parameters with
meaningful names you can indicate
the purpose for which the parameters
~r substituted values) are used.
Generated
Result

MVC

END

General Specifications

Ampersand

d

,r . / - - - - Alphabetic

.o

Symbolic parameters must be valid
variable symbols, as shown in the
figure to the right •

They have a local sccEe: that is,
the value they are assigned only
A applies to the macro definition
~in which they have been declared.
'Ihe value of the parameter remains
constant throughout the processing
of the containing macro definition
for every calIon that definition.

•

260

NOTE: Symbolic parameters must
not be multiply defined or identical
to any other variable symbols within
the given local scope. This applies
to the system variable symbols
described in J7, and local and
global SET symbols described in
L1A.

character
0 to 6 alphameric character

~

1&lplA R A M\

.prototype

\ MACRO
~DEFINE
&PARAMl,&PARAM2,&PARAM311
GBLA &A}8/"
LCLC

MEND

&C

or

D

:source Module

II

Macro
Definition

I

I

Prototype

The two kinds of symbolic parameters
are:

o.

8.
•
•·

I

Positional parameters
Keyword parameters.

Each positional or keywcrd parameter
used in the body of a roacro
definition must be declared in the
prototype statement.

I

Macro
Instruction

• •

DEFINED

0-- .

MVC

&TO,&FROM

MEND
START

0

MACRO

&TO,&FROM=

~

J DEFINED

I

FIELDA,FROM=FIELDB

MVC

FIELDA,FIELDB

END

Source Module

Subscripted Symbolic Parameters
Subscripted symbolic parameters
must be coded in the format shown
in the figure to the right.

Format:

MACRO
SUBLISTS

&POS, &KEY=

MVC

&POS(3)'&KEY(3~

~he

subscript can be any arithmetic
O expression
allowed in the operand

field of a SETA instruction
(arithmetic expressions are discussed
in L4~. The arithmetic expression
can contain subscripted variable
symbols. Subscripts can be nested
up to 5 levels of nesting.

The value of the subscript must
be greater than or equal to one.
~ ~he subscript indicates the position
of the entry in the sub1ist that
is specified as the value of the
•
subscripted parameter (sub1ists
as values in macro instruction
operands are fully described in

MEND

• ~

START

o

SUBLISTS

(A,B,C,D),KEY=(E,F,G,H)

e

K4) •

MVC

C,G

END
Section J: The Macro Definition

261

J3A -- POSITIONAL PARAMETERS

Purpose
You should use a positional parameter
in a macro definition if you wish
to change the value of the parameter
each time you call the macro
definition. This is because it
is easier to supply the value for
a positional parameter than for
a keyword parameter.
You only have
to write the value you wish the
parameter to have in the proper
position in the operand of the
calling macro instruction.
For keyword ~escribed below)
parameters, you must write the
entire keyword and the equal sign
that precedes the value to be passed.
However, if you need a large number
of parameters, you should use keyword
pa rameters.
'l'he keywords make it
easier to keep track of the
individual values you must specify
at each call, by reminding you which
parameters are being given values •.

POSe Paramo
Specifications

O
•

The general specifications for
symbolic parameters described in
J3 also apply to positional
parameters.
Note that the
specification for each positional
parameter declared in the prototype
statement definition must be a valid
variable symbol.
Values are assigned
to the positional parameters by
the corresponding positional operands
specified in the macro instruction
that calls the definition.

Source Module

MACRO
Macro

O~O:O·_

Definition I--_:_:_:_AR
___

START

Macro
Instruction

POSPAR

END

262

-----4

ONE ,TWO, THREE

•

J3B -- KEYWORD PARAMETERS

purpose
You should use a keyword parameter
in a macro definition for a value
that changes infrequently. Ey
specifying a standard default value
to be assigned to the keyword
parameter, you can oroit the
corresponding keyword operand in
the calling macro instruction.
Keyword parameters are also
convenient recause:
1. You can specify the corresponding
keyword operands in any order in
the calling macro instruction.

Key. Paramo

2. The keyword, re~eated in the
operand, reminds you which parameter
is being given a value and for which
purpose the parameters is being
used.

/

Format:

Specifications
~he

general specifications for
symbolic parameters described in
J3 also apply to keyword parameters.
Each keyword parameter must be
in the format shown in the figure
to the right.

O

The actual parameter must be a valid
variable symbol.

value is assigned to a keyword
parameter by the corresponding
~keyword operand through the na~e
of the keyword as follows:

a-----"~___,

Sta,ndard Value
Keyword Parameter
Specification

•

Keyword Operand
Specification

lKEYWORDf= VALUE
Example:

A

If the corresponding keyword
operand is omitted, the standard
~value specified in the prototype
statement becomes the value of the
parameter for that call (for full
details on values ~assed see K5).

L-/

Equal Sign

&lliEYWORDI= DEFAULT

Source Module

MACRO

A

4mt1.

/G/

Variable Symbol

Prototype

KEYS

&KEYWORD=ABC,&KEY2=(A,B,C)

MEND
START

o
Standard value of

KEYWORD

A

2. If the corresponding keyword
is specified, the value
after the equal sign overrides the
standard value in the prototype
A and becomes the value of the
~parameter for that call (see K5).

~operand

Section J: The Macro Definition

263

•

•

NO'l'E: A null character string can
be specified as the standard value
of a keyword parameter, and will
be generated if the corresponding
keyword operand. is omitted.

Source Module

Null character
string

MACRO
FXDPT
L&TYPE ®,AREA
A&TYPE ®,CONST
ST&TYPE ®,SUM
MEND
OPEN

LH
AH
STH

END

264

3,AREA
3,CONST
3,SUM

J3C -- COMBINING POSITIONAL AND
KEYWORD PARAMETERS
Purpose
By using positional and keyword
parameters in a prototy~e statement,
you combine the benefits of both.
You can use positional ~arameters
in a macro definition for passing
values that change frequently and
keyword parameters for passing
values that do not change often.

Specifications

Source Module

MACRO

O
8
•
•·

positional and keyword parameters
can be mixed freely in the macro
prototype statement. The same
applies to the positional and keyword
operand s of the macro instruction
(see K3C)" Note, however, that
the order in which the positional
parameters appear deterrrines the
order in which the positional
operands must appear.
Interspersed
keyword parameters or operands do
not affect this order.

os ·1\~;P9~i.~lqIi~1··•·• .·p~i:a~~t~:r~.rn.\lSt.

pr.~.9~·P~an~~7YW9r.~iPct:r:ct~~'t:er.si
1.~~p~q;~ieqi;·• .·.}Tl1Ea. '~ctlll~.appl~ ~~.•. ii"
FP'iP;t;,~9~ct:}.;i,~!lq~eY~8r••..•.•·••.••.•

~~~j~~~9

LA 3,100 100 NOW IN REGiSTER.

LooK'HERE

Section J: The Macro Definition

271

J5 -- Processing Statements

Conditional Assembly
Instruction

Function Performed

J5A -- CONDITIONAL ASSEMBLY
INSTRUCTIONS

GBLA,GBLB,GBLC
LCLA,LCLB,LCLC

Declaration of initial values
of variable symbols (global
and local SET symbols)

SETA,SETB,SETC

Assignment of values to
variable symbols (SET
symbols)

Conditional assembly instructions
allow you to deterrr.ine at preassembly time the content of the
generated statements and the sequence
in which they are generated. The
instructions and their functions
are given in the figure to the
right.
Conditional assembly instructions
can be used both inside macro
definitions and in open code. They
are fully described in Section L.

J5B -- INNER MACRO

Branching

AlP

- Conditional (based on
logical test)

AGO

- Unconditional

ANOP

- To next Sequential
instruction (No
operation)

'l.CTR

~g

INS~RUCTIONS

Macro instructions can be nested inside macro definitions,
allowing you to call other macros from within your own
definitions. Nesting of «aero instructions is fully
described in K6.

J5C -- THE COpy INS!RUC!ION
Purpose
The COpy instruction, inside macro definitions, allows
yo~ to copy into the maqro definition any sequence of
statements allowed in the body of a macro definition.
~hese statements become part of the body of the macro
before macro processing takes place. You can also use
the COpy instruction to copy complete macro definitions
into the beginning of a source module.
The specifications for the COpy instruction, which can
also be used in open code, are described in E1A.

272

Loop' Counter

J5D -- THE MNOTE INS'I'RUCTION

Purpose
You can use the MNOTE instruction
to generate your own error messages
or display intermediate values of
variable symbols computed at preassembly time.

Specifications
The MNOTE instruction can be used
!~s~,9>e macro definitions ~g;::,l:fi:.9!@ij!
9Phl: c::Q(:l~,': and its operation code can
be' created by substitution. The
MNOTE instruction causes the
generation of a message which is
given a statement number in the
printed listing.

os

'Ihe format of the MNO'IE instruction
statement is given in the figure
to the right.

~ The n stands for a severity code.
The rules for specifying the contents
of the severity code subfield are
as follows:
•

•
•
•

1.• The severity code can be specified
as any arithmetic expressioq allowed
~n the operand field of a SETA
instruction. The expression must
have a value in the range 0 through
255 •
2. If the severity code is omitted,
but the comma separating it from
the message is present, the assembler
assigns a default value of 1 as
the severity code •
3. An asterisk in the severity code
subfield causes the message and
the asterisk to be generated as
a comments statement.

4. If the entire severity cede
pubfield is omitted, including the
comma separating it from the message,
the assembler generates the message
as a comments stateroent.

MNOTE
Name

Operation

A sequence
symbol or
blank

MNOTE

Operand
One of four options allowed:
n, 'message' } error
, 'message' message

ft

V

':< 'message' }
, 'message'

comments

Examples:
Source Statements

8

Generated Result

MNOTE

2, 'ERROR IN SYNTAX' 2,ERROR IN SYNTAX

MNOTE

,'ERROR, SEV l'

•
•

MNOTE

~~,'

NO ERROR'

MNOTE~NO

ERROR'

,ERROR, SEV 1

,!-,NO ERROR

NO ERROR

Section J: The Macro Definition

273

NOTES:
1. An MNOTE instruction causes a message to be printed,
if the current PRINT option is ON, even if the PRINT NOGEN
option is specified.
2. The statement number of the message generated from an
MNOTE instruction with a severity code is listed among
any other error messages for the current source module.
However, the message is printed only if the severity code
specified is greater than or equal to the severity code
"nnn" in the assembler option, FLAG (nnn) , contained in
the EXEC statement that invokes the assembler.

3. The statement number of the comments generated frorr
an MNOTE instruction without a severity code is not listed
among other error messages.
Any combination of up to 256 characters enclosed in
apostrophes can be specified in the message subfield.
The rules that apply to this character string are as
follows:
~.

Variable symbols are allowed (NOTE: variable symbols
can have a value that includes even the enclosing
apostrophes) •

~.

Double ampersands and double apostrophes are needed ~
to generate one ampersand or one apostrophe. If variable
symbols have ampersands or apostrophes as values, the
~ values must have double ampersands or apostrophes.
NOTE:
Any remarks for the MNOTE instruction statement must
be separated from the apostrophe that ends the message
by one or more blanks.

274

lSeverity Code

I
Value of
Variable Symbol

MNOTE Operand

3~'THIS

IS A MESSAGE'

,

Generated
Result

,

3,THIS IS A MESSAGE

&PARAM=ERROR

3,ERROR

&A=10

3,VALUE OF &A IS 10

3, 'LIIr--&AREA'

&AREA=FIELD1

3,L'FIELD1

3, 'DOUBLE &S'

&S,

3,DOUBLE &

3/DOUBLE L&APOS&AREA'

&APOS=II
&AREA=FIELD1

3,DOUBLE L'FIELD1

-e

3, 'MESSAGE STOP'PED~

'-

Invalid remarks,
must be separated
from operand by
one or more blanks

3 'MESSAGE STOP'

RMRK~(

Valid Remarks
\ entry.

I

3,MESSAGE STOP RMRKS

Section J: The Macro Definition

275

J5E -- THE MEXIT INSTRUCTION

MEXIT
Purpose
The MEXIT instruction allows you
to provide an exit for the assembler
from any point in the body of a
macro definition. The MEND
instruction provides an exit only
from the end of a roacro definition
(see J2B) •

Name

Operation

Sequence
symbol
or blank

MEXIT

MACRO
Specifications

EXITS
A

The MEXIT instruction stateroent
can be used only inside macro
definitions.
It has the format
given in the figure to the right.

•

The MEXIT instruction causes the
assembler to exit from a macro
definition to the next sequential
instruction after the macro
instruction that calls the
defini tion.
(This also applies
to nested macro instructions, which
are described in K6.)

B

C
MEXIT
D
E
F

MEND
START
EXITS

276

0

Operand
Not required

16 - Comments Statements
J6A -- INTERNAL MACRO COMMENTS STATEMENTS

Purpose
You write internal macro comments in the body of a rr.acro
definition, to describe the operations performed at preassembly time when the macro is processed.

Begin column
(standard
value)

Specifications

Columns

(1)

(2)

(3)

Period,

Internal macro comments statements
can be used only inside macro
definitions. An example of their
correct use is given in the figure
to the right.
No values are substituted for any
~ariable symbols that are specified
~n macro corr.ments statements.

WILL NOT BE.

*
*

J6B -- ORDINARY COMMENTS STATEMENTS

PUrpose
Ordinary comments staterr.ents
~escribed in E1C) allow you to
make descriptive remarks about the
generated output from a macro
definit ion.

Specifications
Ordinary comments statements can
be used in macro definitions and
in open code. An example of their
correct use is shown in the figure
to the right.
Even though this type of statement
is generated along with the model
statements of a macro definition,
values are not substituted for any
variable symbols specified.

Begin column
(standard
value)

~
Columns

(1) (2)

Asterisk

}
Format

/

/ A n v Character String

f ~NT

WILL HE GENERATED

Section J: The Macro Definition

277

Page of GC33-4010-4
Revised July 31, 1976
By TNL: GN33-8207

J7 -- System Variable Symbols
Purpose
System variable symbols are variable symbols whose values
are set by the assembler according to specific rules.
You can use these symbols as points of sUbstitution in
model statements and conditional assemtly instructions.

General Specifications for System Variable Symbols
OS~J 'I'h~sy::;t=m variable symbols :~§X§D1\r:r~~j &SYSPARM, and
"ly . . ~9X9±~~~j can be used as points of substitution both inside

macro definitions and in open code. The remaining system
variable symbols: &SYSECT, &SYSLIST, and &SYSNDX, can te
used only inside macro definitions. All system variable
symbols are subject to the same rules of concatenation
and substitution as other variable symbols (see J4B) •
System variable symbols must not be used as symbolic
parameters in the macro prototype statement. Also, they
must not be declared as SET symbols (see L2) •
The assembler assigns read-only values to system variable
symbols; they cannot be changed by using the SETA, SEiB,
or SETC instructions (see L3).

27.8

Syst. Var. Sym.
Source Module

MACRO

MACl

MEND
MACRO

MAC 2
THE SCOPE OF SYSTEM VARIAELE SYMBOLS:
The system variable symbols:
os &SYSDATE, &SYSPARM, and SSYSTIME,
only have a global scope.
'Ihis means
that they are assigned a read-only
value for an entire source module;
a value that is the same t,hroughout
open code and inside any roacro
definitions called. The system
variable symbols:
&SYSEC1, &SYSLIST,
and &SYSNDX, have a local scope.
They are assigned a read-only value
each time a macro is called, and
have that value only within the
~ expansion of the called macro.

MEND
OPEN

START

G

'
8

L
MACl
NOTE:

&SYSECT
&SYSLIST
&SYSNDX
are only allowed
inside macro
definitions

J7A'-- &SYSDATE

as

.onty

Purpose

&SYSDATE

You can use &SYSDATE to obtain the
date on which your source module
is assembled.

Specifications

8 - Character String

Format:
Where:

mm gives the month
dd gives the day
yy gives the year

Example:

11/25/72

The global system variable symbol
&SYSDATE is assigned a read-only
value of the format given in the
figure to the right.
NOTE: The value of the type attribute
of &SYSDATE (T'&SYSCATE) is always
U and the value of the count
attribute (K'&SYSDATE) is always
eight.
(Attributes are fully
described in L1B.)

(m/dd/VV I

+-

Corresponds to date
printed in the page
heading of listings,
remains constant for
each assembly

Section J: The Macro Definition

279

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

J7B -- &SYSECT

purpose
You can use &SYSECT in a rracro
definition to generate the name
of the current contrel section.
The current control section is the
control section in which the macro
instruction that calls the definition
appears.

.

&SYSECT

Source Module

MACRO

MACRO

OUTER &NAME

INNER

&NAME CSECT
DC

Specifications
INNER

o

The local system variable symbol
&SYSECT is assigned a read-only
value each time a macro definition
is called.

MEND

The value assigned is the symbol
that represents the name of the
~ current control section from which
the macro definition is called.
Note that it is the centrel section
in effect when the macro is called.
A control section that has been
initiated or continued by
•
substitution does net affect the
value of &SYSECT for the expansion
of the current macro. However,
it does affect &SYSECT for a
~ subseguent macro call. Nested
macros cause the asse~bler to assign
•
a value to &SYSECT that depends
on the control section in force
inside the outer macro when the
inner macro is called (see KG).
NOTES:
1. The control section whose name
is assigned to &SYSECT can be defined
by a START, CSECT, CSECT, or COM
instruction.

2. The value of the ty~e attritute
of &SYSECT, T'&SYSECT, is always
~., . . . ·• ·.~Ild·. · . •. • ·th~ •. • · .• Yiilu~··. •·.•·•~·f.i.Eft~·i~8·.·.· ' i :
9~;(l~:t::t:'ilJ~.~.~.·•. \(~ t . . &Sy~ECT)i4~.>~9 . . . . !~p
~.nl~t:Ji~.1l~lIt(bt;!r: • .
~hara9:tt;!r:~ . •. •. . . ~•. ~.?:<.m~.g
as\avalueto . &SYSECT.
(Attributes
are fully described in L1E.)

.•·

·.9t. .· •.

?-80

END

DC A (&SYSECT)
A (&SYSECT)

MEND

J7C -- &SYSLIST

Purpose
You can use &SYSLIST instead of
a positional parameter inside a
macro definition, for example, as
a point of substitution. Ey varying
the subscripts attached to &SYSLIST,
you can refer to any positional
operand or sublist entry in a macro
call.
&SYSLIST allows you to refer
to positional operands for which
no corresponding positional parameter
is specified in the macro prototy~e
statement.

Specifications
'I'

&SYSLIST

The local system variable symbol
&SYSLIST is assigned a read-only
value each time a macro definition
is called.
&SYSLIST refers to the complete
list of positional operands specified
in a macro instruction.
&SYSLIST
does not refer to keyword operands.
However, &SYSLIST cannot be specified
as &SYSLIST alone. One of the two
forms given in the figure to the
right must be used as a point of
substitution:

.)

Macro
Instruction

CLST

2. To refer to a sublist entry of
a positional operand (sublists are
fully described in K4 below).

Point of substitution
in macro definition

} I &SYSLIST (nlC]
&SYSLIST

•

I&SYSLIST (n} I

Macro
Instruction

CSUB

"

I &SYSLIST I
~
Pn ----------.
Pl,P2,P3,

~ 1. To refer to a positional operand
•

.:~

Pl,P2, . . . . . ,(s'El,SE2,. _.

,E)E::~' ••••

4ItThe subscript n indicates the
position of the operand referred
The subscript m, if specified,
• , to.
indicates the position of an entry
in the sublist specified in the
operand whose position is indicated
by the first subscri~t n.
Point of substitution
in macro definition

} .I&SYSLIST(n,m)1
a-a

Section J: The Macro Definition

281

The subscripts nand m can be any
arithmetic expression allowed in
the operand of a SETA instruction
~ee L3A).
The subscript n must
be greater than or equal to O.
The subscript m must be greater
than or equal to 1.
The figure to the right shows
examples of the values assigned
to &SYSLIST according to the value
of its subscript, m and n.

o

If the position indicated by n
refers to an omitted operand or
refers past the end of the list
of positional operands specified,
•
the null character string is
substituted for &SYSLIST(n).
If
the position (in a sublist) indicated
by the second subscript, m, refers
to an omitted entry or refers past
, the end of the list of entries
specified in the sublist referred
to by the first subscript, n, the
null character string is substituted
for &SYSLIS~(n,m).
Further, if
the nth positional operand is not
a sublist, &SYSLIST (n, 1) refers
to the operand but&SYSLIST(n,m),
•
where m is greater than 1, will
cause the null character string
to be substituted.

I

A

NOTE:
If the value of subscript
is zero, then &SYSLIS~(~ is
assigned the value specified in
the name field of the macro
instruction, except when it is a
sequence symbol.

~n

282

Macro Instruction:

NAME

MACALL ONE,TWO, (3,4, ,6), ,EIGH'I

Point of substitution
in macro definition

Value
Substituted

&SYSLIST(2)
&SYSLIST(3,2)

TWO
4

0

&SYSLIST(4)

Null

&SYSLIST(9)

Null

&SYSLIST(3,3)

Null

&SYSLIST(3,5)

Null

&SYSLIST(2,l)
&SYSLIST(2,2)

TWO
Null

•
•e.
•
0

&SYSLIST(O)
&SYSLIST(3)

NAME
(3,4,,6)

Attribute references can be made
to the previously described forms
of &SYSLIST. The attributes will
be the attributes inherent in the
positional operands or sublist
entries to which you refer.
(Attributes are fully described
in L 1 B.)
However, the number
attribute of &SYSLIST, N'&SYSLIST,
is different from the number
attritute described in L1B.
One
'of the two forms given in the figure
to the right can be used for the
number attribute:

. To indicate
the number of
O positional
operands specified

e N ' &SYSLIST

in

a call
• To indicate the number of sublist
entries that have been specified
in a positional operand indicated
by the subscript.

•
•

NOTES:
1. For N'&SYSLIST, positicnal
~operands are counted if specifically
omitted by specifying the comma
that' would normally have followed
the operand.

A

2. For N' &SYSLIST (n) , sublist entries
counted if specifically omitted
by specifying the comma that would
normally have followed the entry.

Value of
N'&SYSLIST

Macro
Instruction

1,2,3,4
A,B, ,D,E
,A,B,C,D
(A,B,C), (D,E,F)

MACLST
MACLST
MACLST
MACLST

8
I

~}.
21 Counts sublists
as one operand

MACLST
MACLST
MACLST

J

0

KEY1=A,KEY2=B
A,B,KEYl=C

~I Keyword operands -'

2 are not counted

~N'&SYSLIST(n)

•

Macro
Instruction

Value of
N'&SYSLIST (2)

(n=2)

~are

3. If the operand indicated by n
is not a sublist, N'&SYSLIST(n)
is 1. If it is omitted,
N'&SYSLIST(n) is zero.

4

MAC SUB
MACSUB
MACSUB
MACSUB

MACSUB
MACSUB
MACSUB

A, {l,2,3,4,5),B
A,(l,,3,,5),B
A, (,2,3,4,5),B
A,B,C

1

A). ,C
A,KEY=(A,B,C)

0
0

•-.

0

"

5

~}.

-IIo areKeyword
sublists J
not counted

Section J: The Macro Definition

283

J1D -- &SYSNDX
Purpose
You can attach &SYSNDX to the end of a symbol inside a
macro definition to generate a unique suffix for that: .
symbol each time you ·call the definition. Although the
same symbol is generated by two or more calls to the same
definition, the suffix provided by &SYSNDX produces two
or more unique symbols. ~hus you avoid an error being
flagged for multiply defined symbcls.
.
Specifications

&SYSNDX

.---------------------

The local system variable symbol
&SYSNDX is assigned a read-only
value each time a macro definition
is called from a source module.

o

The value assigned to &SYSNCX is .
, a 4-digit number, starting at 0001
for the first macro called by a
•
program. It is incremented by one
for each subsequent macro call
(including nested macro calls,
described in K6) •
NOTES:.
1. &SYSNDX does not generate a valid
symbol, and it must:

•
•

a~
Follow the sy~bol to which
it is concatenated

b. Be concatenated to a symbol
containing four characters or
less.

2. The value of the type attribute
of &SYSNDX(T'&SYSNDX) is always
N, and the value of the count
attribute (K'&SYSNCX) is always
four.

AREAOOlO DS

. NOTE:
TWO 00 10 and
TWO 0011 are
two different
symbols and
thus not multiply defined

F

TWO,200
TWOOOl1

DC

AREAOOll DS

F'200'
F

(Attributes are fully described
in L 1B.)
,THREEOOl2IDC
J1E -- &SYSPARM
•
Purpose
You can use &SYSPARM to communicate with an assembler
source module through the job control language~ Through
&SYSPARM, you pass a character string into the source
.
module to be assembled from a job control language statement
or from a program that,dynamically invokes the assembler.
Thus, you can set a character value from outside a source
module and then examine it as part of the source module
at pre-assembly time, during conditional assembly
processing.
.
284

AREAOOl2

DS

F'300'
F

Specifications

&SYSPARM

O

The global system variable symbol
'&SYSFAR~ is assigned a read-only
value in a job contrel statement
or in a field set up by a program
that dynamically invokes the
assembler. It is treated as a
global SETC symbol in a seurce
module, except that its value
cannot be changed.
The largest value that &SYSPARM can
hold when you code your own
procedure is 91 characters, which
can be specified by an invoking
program. However, if the PAru.l' field
of the EXEC statement is used to
specify its value, the PARM field
restrictions reduce its maximum
possible length.

Example:

Job Control Statement

Source Module

OPEN

START
AIF

(I &SYSPARM I NE

I DEBUG I). SKIP

.'

'C7-0~:,·,·t·~,:,·,:"C·"~,,""~~,·,,,,,,,,,7'~'.'· ~~:"'''T:' i. · ' , i ···'7T~t7'7'''C:''t7'"7:;~':''''''''''''::'':·'':::'''':'?'':::7l

p~~,Under>CM~I, 1:J:leo:p~,~9~",.·'.·lin~,()f .',' the{i
ASSEMl3L ~·".,·.co~aIl4<;~Ill1,ot . . e xceed.,·,·.,1 Q.Q,i

characte:r~., . ,. th\1~i.:.,,~~~;tiIl~ th~ nllI1ll>~J:'i
of characters YOlliqan specify for
&SYSPARM.

DOS

Branch to normal
conditional assembly
processing if &SYSPARM
is not equal to DEBUG

'The .largest ,value &SYSPARM,'.can hold
is 8 ,characters ..
NOTES:
1. No values are substituted fer
variable symbols in the specified
value; however, double ampersands
must be used to represent single
ampersands in the value.

END

~~~¥s"fr"~~8iP~;r~~]~&~tsp~;'\
:.::.>

DeBUG

t?~;i.E,,':'{~i~ere L*:," ,:,:"

eMS SinceCMS. does

not~-trip Cimpersa,ncJs' fromthevar;able . •. symbol,
you ,need, not specify double

ampe~~ands f0:t'~~§~

2. Double apostrophes are needed
to represent single a~ostro~hes
because the entire PARM field
specification is enclesed in
apostrophes.
'eMS

Since CMSdoes n,ot strip, single
apostrophes .from',· the . variable
symbol, you need notspegify
double apostrophes forCMS.

Section J: The Macro Definition

285

3. If SYSPARM is net s~ecified in
a job control statement outside
the source module, &SYSPARM is
assigned a default value of the
null character string.
'lf~if·'.·lJ:ne·.'.'·.V'~+1l~·,9~·,r'·',€iiE('• •• ;t'yp~'··':a.~~~;bi:i~'.~.
fr,&SYSPARM'
'~~¥§~:A~)i . •. ;~~.:J.'~~~."."'~.i.•

~i~hlt~,~9~i,

. . . . :t~Er9,f~Ii~.c0ttrlt,

attribute /.(IS~~~~~~.1\~)i~~~p~,i.ntixnp~r
of,.'··.·".·'~p,a.;a.?~~~::iii~p~c:::l:.~~E;9i;.~;" .• ,~$~ARM;
• '..,a..,.}j9,l?,• ·'·,·c:::9P~,;9:t .• '·. ~"~.~,.~.,E;,~E;P~.'·.·.·'.•',.9;'.·'·.···.·.~·.P
~.,l:.,~19.·.'.,'.,'.·.~.E!.~i.·.~I?.·,·.••.•~¥..·•. •. ·.•a.. )iP;~,~.~·.~.·.·'.•'.· •~.Ii,a.'Y
~.~·a.tn. ;?~:t.:t.y!.~91$~~~P~~~.~.eIlll>:t~r~

B,R~:J.~>~P9~,~:r:;?P,P7~~~~'~?·~R:t

l~p.~~~. a.Bg~,,~ic:::9~.PF,· . \a.:~.·'.·.·.p·!!~ •.R.1:la..·.?;€l.~.•. . . '. ~

,5;i··. .9-1.~,·. ',ip~;:~.~~·. ',·.iF9~,'·.·. ··,q.?~~'.··. .· . ~'in~'}
prea.~;p~i~~(;!,;/~~I?
4P~9~~g.ll;F7}'

cAa.:r::'a.,%~~'!:;()~~~s '. .b~~7;?~~FIi~
S~E)P~9P7;,~~,'·~~~·,'.,gN~g~;X~4~:1P
is .•.·.li~i:e~ •. •',• t?.·>a.P(,·~,~9tl,-t:7c:::P~~a.q~(i;!,;
fiel..,~"/,~.~ .• Y()l.;l.·. wap,t.i:9,e~~~~:ta.:r:::g~r
~}~:t.g~.,.,.?:r::: • .• ifyC)~ .'· .•·,\'!,a.nt··.,.,·.·to . •'• ·~p,t.~;
Pa.:r::'E;l1t.~~~E;~o. r<,~Il1bedd ~g • "·.'·.blaIlk~ , . .• yall
1lll.;l§~i~t.,~.:r:::.'·.' •.'•.'t..ll;.~i.~p~?,;a.l·i.·. ·~Y~9:J./~,?~
(t.l:lE;.~es.t.iop • ·• ·.• ma.:r::'~.symBP:t~i.~!!.·.'• ,~e
()P1:4RP • •,·'.,.~··4·~lq....~lle.p,qM$.~~(.:<:)un;t~1:~
t.lll:.S··.•·•·~X~<:)1,4:rlFll;e···.·~?~9g·.:t.1.J:).~·.,········lt
. iw4:t~1?:t9~E;tY~p··.·.·\'!i i:.ll·.··• •.~~~~~~9'~
~1:'~.~~E)8~:, . . aft.E;:tW:tl;phY9uII!ilY
~~~~~:rl~.? .
.·~~;.~~~~ ..~nt.>uPto
··~P;E;?~t.~<:)P~ . . . . . . . . )i:tl:.~1.~9.~\J~~. i .
(
···p:tl~~9ter.~ ••••.'J:'.l1e~9+~?~1.J:).~p?
I./inthe.SYSPARM··• ··.··field:
~empl..~F~~~(load
~~S~$~~:

~·~.~·,~l:)(»).·.·.• .;•

286

fy

e<:Jt~YsPcl:citl

f~r

.

J7F -- &SYSTIME
1

 10.15 p.m.

1. The value of the type attribute
of &SYSTIME (T'&SYSTIME) is always
U and the value of the count
attribute (K'&SYSTIME) is always

\.

Corresponds to the
time printed in the
page heading of
listings, remains
constant for each
assembly

5.

2. For systems without the internal
timer feature, &SYSTIME is a 5character string of blanks.

OCa~lt:ijHtLgQl?ti~~.·
•. ·•. . •·. · ..•....
!,)::os·r/?:··········································........................................,.........•..............,.
(onIV>!
In addition to the FRINT options that you can set froIT
inside a source module, you can set other listing options
from outside a source module by using the job control
language. These options can be specified in the PARM field
of the EXEC statement or by a program that dynamically
invokes the assembler.

J8A -- LIEMAC

Purpose
The LIBMAC option allows you to print in the program
listings the library macro definitions called from your
source module, and any statements in open code following
the first END statement (coded or generated) that is
processed by the assembler.

Section J: The Macro Definition

287

MACRO

The LIBMAC option, when set, causes:
MACl

4Dt Any

statements in open code that
follow the first END statement and

•

•

MEND

All library macro definitions called
to be printed in the program listings
after the first (or only) END
statement of the source module.

MACRO
MAC 2

NOTE: i-1ult.iple ENe statements can
be coded or generated and are
printed, but the first ENI: statement
processed ends the asserobly.
The option NOLIBMAC suppresses the
listing of the iterr.s mentioned
above. It is the default option
that applies to the assembling of
source modules.

Source
Macro
Definitions

MEND
OPEN

START

LINK

END

J8B -- MCALL
purpose
The MCALL option allows you to list
all the inner macro instructions
that the asserebler processes.

MACRO
LINK

.

MEND
MACRO
OPEN

.
MEND

Specifications
The MCALL option, when set, causes
all inner macro instructions
processed by the assembler to be
listed. The NOMCALL option
suppresses the listing of inner
macro instructions. It is the
default option that applies to the
assembling of source modules.
NOTE: The MLOGIC and ALOGIC options
concern the listing of conditional
assembly statements. They are
discussed in L8.
288

•

I

Section K: The Macro Instruction

section describes macro instructions: where they
can be used and how they are specified, including details
on the name, operation, and operand entries, and what will
be generated as a result of that macro call.
~his

After studying this section, you should be able to use
the macro instructions correctly to call the macro
definitions that you write. You will also have a better
understanding of what to specify when you call a macro
and what will be generated as a result of that call.

KI -- Using a Macro Instruction
K1A --PURPCSE
The macro instruction provides the assembler with:
1. The name of the macro definition to te processed.

2. The information or values to be passed to the macrc
definition. This information is the input to a macro
definition. The assembler uses the information either
in processing the macro definition or for substituting
values into a model statement in the definition.
The output from a macro definition, called by a macro
instruction, can be:
1. A sequence of statements generated from the model
statements of the macro for further processing at asserrbly
time.

2. Values assigned to global SET symbols. These values
can be used in other macro definitions and in open code
(see L 1A) •

Section K: The Macro Instruction

289

Page of GC33-4010-0
Revised September 29, 1972
By TNt GN33-8148

K1B -- SPECIFICATIONS

Source Module

MACRO
MACl

Where Macro Instructions Can Appear
A macro instruction can be .writte.n

in the open code portion
O ofanywhere
a source module. However, the

statements generated from the called
macro definition must be valid
assembler language instructions
and allowed where the calling macro
instruction appears. A macro
•
instruction is not allowed before
or between any source macro
•
definitions, if specified, but it
can be nested inside a macro
• · definition (see KG) •

Source
Macro
Definitions

Must not cause generation
of instructions that are not
allowed before the START
instruction

MAC CALL

MACCALL
Macro Instruction Format
END
The format of a macro instruction
statement is given in the figure
to the right.
The maximum number of operands
allowed is not fixed.
It depends
on the amount of virtual storage
available to the program.
9Q~;9~~~:;~9P •·• ·§p~r~#Cl~·~;e
~n..~i:pp~~(ing • .·.• ··.fi~l

&POSPAR(3)

Positional Operands
A, (1,2,3,4)

3

A, (1,2,3,4)

3

&SYSLIST(2,3)

Section K: The Macro Instruction

301

KS -- Values in Operands
Purpose
You can use a macro instruction operand to pass a value
into the called macro definition. The two types of value
you can pass are:
1. Explicit values or the actual character strings you
specify in the operand.

2. Implicit values, or the attributes inherent in the data
represented by the explicit values.
Attributes are fully described in L1B.
Specifications
The explicit value specified in a macro instruction o~erand
is a character string that can contain one or more variable
symbols.
The character string must not be
greater than 255 characters after
substitution of values for any
variable symbols. This includes
a character string that constitutes
a sublist (see K4).
The character string values, including sublist entries,
in the operands are assigned to the corresponding pararreters
declared in the prototype statement of the called macro
definition. A sublist entry is assigned to the
corresponding subscripted parameter.

302

Source Module

MACRO
OMIT &Pl,&P2,&P3,&KEY1=DC,&KEY2=C
&KEYl

&Pl&KEY2&P2'ALWAYS &P3'

MEND
OPEN START 0

Commas indicate

OMIT

O
~

~

OMITTED OPERANDS: When a keyword
operand is omitted, the default
value specified for the corresponding
keyword parameter is the value
assigned to the parameter. When
a positional operand or sublist
entry 1S om1tted, the null character
string is assigned to the parameter.

This blank indicates
end of operand field

OMIT

,

&P3 considered
omitted,
value = null

, HERE

DC C'ALWAYS '

4!tNOTE: Blanks appearing between
commas do not signify an omitted
positional operand or an omitted
sublist entry.

Last positional
operand omitted,
no comma needed

END

SPECIAL CHARACTERS: Any of the
256 characters of the System/370
character set can appear in the
value of a macro instruction operand
(or sublist entry). However, the
following characters require special
consideration:
AMPERSANDS: A single ampersand
indicates the presence of a variable
symbol. The assembler substitutes
the value of the variable symbol
into the character string specified
in a macro instruction operand.
~The resultant string is then the
value passed into the macro
definition.
If the variable symbol
is undefined, an error message is
issued.

o

4!tDouble ampersands must be specified
if they are to be passed to the
macro definition.

Value
Specified
In Operand

Value Of
Variable
Symbols

0

Character
String
Value
Passed

•

&VAR

XYZ

XYZ

&A+&B+3+&C,:<10

&A=2

2+X+3+COUNT'::10

&B=X
&C=COUNT
, &MESSAGE'~

BLANK BETWEEN 'BLANK BETWEEN'

I Quoted string ,1
described below

&®ISTR

~~&

&®ISTER

NOTE&&&&

Section K: The Macro Instruction

303

Page of GC33-401G-4
Revised April 29, 1977
By TNL: GN33-8226

APOSTROPHES: A single apostrophe is used:
(1) to indicate
the beginning and end of a quoted string, and (2) in a
length attribute notation that is not within a quoted
string.
QUOTED STRINGS:

A quoted string is any sequence of

~ characters that be~ins and ends with a single apostrophe

(compare with cond1tional assembly character expressions
rouble apostrophes must ce specified
inside each quoted string. This includes substituted
apostrophes.

~ described in L4B).
~

V

Macro instruction operands can have values that include
one or more quoted strings. Each quoted string can be
separated from the following quoted string by one or more
~ characters, and each must contain an even number of
apostrophes.

/o~
'QUOTED STRING'
Value specified
in Operand

'&&NOTATION'
'&MESSAGE'

,,
•

Value of
Variable
Symbol

Value Passed

'&&NOTATION'
BLANKS OK 'BLANKS OK'

,,

{'L' 'SYMBOL'

'L" SYI-1BOL'

'L' '&VAR'
'"ES'

'LiSYMBOL\

I

.....Indicates
----'----.
end

I

of quoted string

INVALID
OPERAND
VALUE

Indicates beginning
of a new quoted
string

. wQU2~:L!T~:.:E)Ll:l~2.1!;'!.lc;JQ~~!!c~"'

....'

'QUOTEI 'AND 'QUOTE2

No apostrophes, single ampersands,
commas, blanks, or equal signs
allowed between quoted strings in
one operand

, Quoted strings,

! AB' 'CD ~ E ' fGH& &'

304

'AB' 'CD'E'FGH&&'

O
•

LENGTH ATTRIBUTE NOTATION:
In macro
instruction operand values, the
length attribute notation with
ord1nary symbols can be used outside
of quoted strings, if the length
attribute notation is preceded by
any special character except the
ampersand.

Does not initiate
or end a quoted
string

Kl9

OUTERCAL

,

,

(PAIRED PARENTHESES)

Examples:

PARENTHESES:
In macro instruction
operand values, there must be an
equal number of left and right
parentheses. They must be paired,
that is, to each left parenthesis
belongs a following right parenthesis
•
at the same level of nesting. An
unpaired (single) left or right
~parenthesis can appear only in a
•
quoted string.

These parentheses
could be enclosing
a sublist

~

~

(A/B,C,D,E) ,

}UNPAIRED PARENTHESES(

,
/
(A, (B)

IC,D)

Invalid
operand
value

O

(A(B)C)D(E)
L-.J

Level 1
I

I

Level 2

L..J

Level 2

Paired

•

fIN' <'STRING\



4mt

..

.... ..

...

-

Inner macroinstruction operands thatareordil1arYsYmb~ls.l

.

.•...

L"

Source Module

MACRO
LENGTHS

&Pl,&P2

AIF

(L'&Pl LE 8) .MOVE

. MOVE ANOP
MVC

&P2,&Pl

.

MEND

The length attribute can also be
specified outside conditional
assembly instructions. Then, the
length attribute value is not
available for conditional assembly
processing, but is used as a value
at assembly time.
At pre-assembly time, an ordinary
symbol used in the name field of
an EQU instruction has a length
attribute value of 1. At assembly
~ime, the symbol has the same length
attribute value as the first symbol
of the expression in the first
operand of the EQU instruction.

OS
()nly

i

M.~cf~in~tl}Jcti~/'loperal1ds thatsP~ci~y 1i~~raJ~~

If the length attribute value is
desired for pre-assembly ~rocessing,
the symbol specified in the attribute
reference must ultimately represent
A the name entry of a statement in
~open code.
In such a statement,
the length modifier (for CC and
CS instructions) or the length field
(for a machine instruction) , if
specified, must be a self-defining
•
term. The length modifier or length
field must not be coded as a
multiterm expression, because the
assembler does not evaluate this
expression until assembly time.

•·

<

The system variable symbols; &SYSPARM, &SYSDATE,
and &SYSTIME...
..

THE LENGTH ATTRIBUTE (L'): The
length attribute has a nurr.eric value
equal to the number of bytes occupied
by the data that is re~resented
by the symbol specified in the
attribute reference.

However ,t~eisecond 6peralldof all EQU
instruction can be used to assign a
length attr~but:evaluetothesymbol
in the name field •

•
Open
Code

••

OPEN

START

DATA

DC

FL7'7E+9'

AREA

DS

XL(L'DATA)

.

0

IL'&P2=L'DATA=~

,

LENGTHS

DATA'AREA~

\

MVC

AREA ,DATA

END

Section L: The Conditional Assembly Language

329

NOTES:

, S'

1. The length attribute reference,
when used in conditional assembly
processing, can be specified only in
arithmetic expressions (see L4) •
2. A length attribute reference to a
symbol with the type attribute value
of M, N, 0, T, U, or $ will be
flagged. The length attribute for the
symbol will be given the default
value of 1.
THE SCALING ATTRIBUTE (S'):
The
scaling attribute can be used only
when referring to fixed-point,
floating-point, or decimal,
constants. It has a numeric value
that is assigned as shown in the
figure to the right.
NOTES:
~

1. The scaling attribute reference
can be used only in arithmetic
expressions (see L4).
2. When no scaling attribute value
can be determined, the reference is
flagged and the scaling attribute is
given the value of 1.

330

Constant
Types
Allowed

Type
Attributes
Allowed

Value of Scaling
Attribute Assigned

Fixed-Point

H,F, and G

Equal to the value of the
scale modifier
(-187 through +346

FloatingPoint

D,E,L, and K

Equal to the value of the
scale modifer
(0 through 14 -,D,E)
(0 through 28 - L)

Decimal

P and Z

__________-L____________

~

Equal to the number
of decimal digits
specified to the right
of the decimal point
(0 through 31 - P)
(0 through
16 - Z)
______
______________
~

~

Examples:

PACKED
ZONED

DC
DC

P'+12.345'
Z'+12.345'

S'PACKED=3
S'ZONED=3

O

THE INTEGER ATTRIBUTE (II): The integer attribute has
a numeric value that is a function of (depends on) the
length and scaling attribute values of the data being
referred to by the attribute reference.
The formulas
relating the integer attribute to the length and scaling
attritutes are given in the figure below.
NOTE: The integer attribute reference can be used only
in arithmetic expressicns (see L4) •

I'
I

Constant
Type
Allowed
(attribute
value)

Formula
Relating the
Integer to the
Length and
Scaling
Attributes

Values
Of the
Integer
Attribute

Examples

0
HALFCON DC HS6'-2S.93' }

Fixed-point
(H,F, and G)

Floating-point
(D,E,L, and K)

I'=8~:8
1'=2 ':'(L' -I} -S'-2

when L'

EXTEND DC' LS10' S. 3l~ ,
2~::(16-1) -10 -2

23
4

1
1

9

}

18

Decimal equal to the
number of decimal
digits to the left of
the assumed decimal
point after the
number is assembled
Packed (P)

I'=2~~L'-S'-1

PACK DC P'+3.S13'
2~~3-3-l

/'."..,-

0

1031sl3Cl
Zoned (Z)

I'=L'-S'

ZONE DC Z'3.Sl3'
4-3

Section L: The Conditional Assembly Language

1

331

Macro Instruction
Operands

0

Value of Count
Attribute

All characters of operand
are included

5
14

ALPHA
(SUB,LIST,ALL)
2(10,12)

THE COUNT ATTRIBUTE (K'): The count
attribute applies only to macro
instruction operands, to SET symbols,
and to the system variable ,symbols.
It has a numeric value that is equal
to the number of characters:

O

.instruction
That constitute the macro
operand, or

NOTES:

1. The count attribute reference
can be used only in arithmetic
expressions (see L4) •
2. The count attribute of an omitted
macro instruction operand has a
default value of O.

,'A', 'B'
,,

8
6

blank
null character string
(omitted 0 erand)

3
2

o

SET Symbols •
Delimiting apostrophes
not included

&C
&C
&C

SETC
SETC
SETC

,'ALPHA'
,
,,

&B
&B

SETB
SETB

1

&A
&A

SETA
SETA

399
X'FF'

&A

SETA

0100

o

~

System Variable Symbols •
"""

&SYSNDX=

332

0912

.. "."""""" ...

("",.,

N'
- --- ._--_ ...,....--.-----.

Value of
Number Attribute

Macro Instruction
Operand Sublist

11 + number

O

THE NU~BER ATTRIBUTE (N I ): The
number attribute applies only to
the operands of macro instructions.
It has a numeric value that is equal
to the number of sub list entries
in the operand.

of commas
separating the entries

•

(A,B,C,D,E)

5

NOTES:

6

(ArB,C,D,E)
1. The number attribute reference
can be used only in arithmetic
expressions (see L4) •
2. NI&SYSLIST refers to the number
of positional operands in a macro
instruction, and NI&SYSLIST(m)
refers to the number of sublist
entries in the m-th c~erand (for
further details on the number
attribute of &SYSLIST, see J7C) .

1

omitted entryl

( ,B,C,D)

4

(A)

1

A ~When

I

1

(No operands)

0

operand is
not a sublist

Section L: The Conditional Assembly Language

333

Page of GC33-4010-5
As Updated 28 Dec 1981
By TNL GN20-9372

L1C - SEQUENCE SYMBOLS

Purpose
You can use a sequence symbol in the name field of a
statement to branch to that statement at pre-assembly time,
thus altering the sequence in which the assembler processes
your conditional assembly and macro instructions.
You
can thereby select the model statements from whict the
assembler generates assembler language statements for
processing at assembly time.

Seq. Sym.

period (or dot)

Format:

Specifications
Sequence symbols must be specified
as shown in the·figure to the right.

~alPhabetiC character
~o to 6 alphameric characters

·SiEQUENC

Examples: • SEQ

• Al234
• #924

Statements in which
sequence symbols must not
be used as name entries

The following assembler instructions:

Sequence symbols can be specified
in the name field of asserr-bler
language statements and model
statements, except as noted in the
figure to the right.

COPY
EQU
GBLA
GBLB
GBLC
ICTL
ISEQ
LCLA
LCLB
LCLC
MACRO
OPSYN

nos oSEeT
The Macro prototype
instruction

Any instruction that already
contains an ordinary symbol
or variable symbol

334

Source Module

MACRO

&NAME

•

MACONE

~ERAT

.GENERAT ANOP
& NAME

Sequence symbols can be specified
in the operand field of an AlF or
AGO instruction to branch to a
statement with the same sequence
symbol as a label.

o
~
~

e'

•

DS

OH

MEND
MACRO

•

sequence symbol has a local scope.
Thus, if a sequence symbol is used
in an AlF or AGO instruction, the
sequence symbol must be defined
as a label in the same part of the
program in which the AlF or AGO
instruction appears; that is, in
the same macro definition or in
open code.
A

MAC TWO

'GENERA~
AGO

NOTE: A sequence symbol in the
name field of a macro instruction
is not substituted for the parameter,
if specified, in the name field
of the corresponding prototype
statement (for specifications,about
the name entry of macro instructions
see K2A) •

. GENERAT

MEND

OPEN

START

••••

AGO

. THERE

Open.

code

DS

OH

Section L: The Conditional Assembly Language

335

L2 -- Declaring Set Symbols
You must declare a SET symbol cefore
you can use it. In the declaration,
you specify whether it is to have
a glocal or local sccpe. The
assembler assigns an initial value
to a SET symbol at its point of
dec lara tion.

L2A -- THE LCLA, LCLB, AND LCLC
INSTRUCTIONS

Purpose
You use the LCLA, LCLB, and LCLC
instructions to declare the local
SETA, SETB, and SETC symbols you
need.

Specificaticns
The format of the LCLA, LCLB, and
LCLC instruction statements is given
in the figure to the right.
These instructions can be used
anywhere in the body of a macro
definition or in the open code
portion of a source module.
DOS

1J;}e.LCLA,'L<::L~.~andLCLC
~n~tructi9ns.i.if.·. specifiedi

must

~ppearimm~di.ately£ollowingany

(.'1B.:i4A" "qBL13'iprGBLC . instructions
thatmaybe.specif ied.
If ,specified .. ins i-dea macro
definition, the global declaration
.in.structions must appear immediately
.fo~1()win9t he macro .. prototype
~'ta;t~m~ntl'. If specified outside
ama~ro,definition,the global
t:l~cla;rflti()I)s Inust appear first in
ppen..coae.: that is, they . must follow
fll:\.Y.$onrcemacr9(lefini tions
~p'ecified ·.···.and. pX'ec~d e. .the .beginning
of t;he>first control section ..

336

Name

Operation

Operand

Blank

LCLA,
LCLB,or
LCLC

One or more variable
symbols separated
by commas

Source Module

MACRO
MAC 1
LCLA
LCLC

MEND

•

&Al
&Cl

&A2 cannot be used

o

MACRO
MAC 2

o
•

Any variable symbols declared in
the operand field have a local
scope. They can be used as SET
symbols anywhere after the pertinent
LeLA, LCLB, or LCLC instructions,
but only within the declared local
scope.
,·..... w.·.· ...·.·.·.···.w...·.·.·.·,..·.,.·.·...:.,·,'-.,.:.w.·.:.,...>·.w....,.w.,.....,··.~.·.,: ..,.w...·....,

J:).R~.~P~E::1'l1~·· "LeLA

. . ·. •·•.•. ·. ·. . . . • S()PEN~~

'"

·~:w.·"<",,,,.··:,,::·x···,·~:·.:.:·,.~:,,,,:,,,.,,,,.<:

•• ·,

,. . . . . . . •••.~;~~g~~i~~.·~.?~£f .• ;.~.~.•~i?(: •.Gn~.• ·.• ~.~A~·.···.

&A2 cannot be used
here, before its de .
}claration

&A2 cannot be used
here, outside its de .

o

Section L: The Conditional Assembly Language

337

The assembler assigns initial values
to these SET symbols as shown in
the figure to the right.

Instruction

Initial Value assigned
to SET variable symbols
in operand fields

LCLA
LCLB
LCLC

0
0
Null character
string

Source Module
MACRO

MULTDEF

%;'~~~~~~Hi>'"

.;~~()?~~~~
>&CHA~STR

LOCAL VARIABLE SYMBOLS MUST NOT
BE MULTI FLY DEFINEC: A local SET
variatle symbol declared by the
TCLA, LCLB, or LCLC instruction
must not be identical to any other
variable symbol used within the
same local scope.
The following
rules apply to a local SET, variable
symbol:

o

1. within a macro definition, it
must not be the same as any symbolic
parameter declared in the prototy~e
statement.

, 2. It must not be the same as any
global variable symbol (see, L2B)
•
declared within the same .local
scope.
3. The same variable symbol must
not be declared or used as two
~different types of SET symbols,
for example, as a SETA and a SETB
symbol, within the same local scope.

NOTE 1:
A local SET symbol should
not begin with the four characters
&SYS, which are reserved for system
variable symbols (see J7).
()~i~?;~t:Tpegloba,l' ,'declarations

o
Not considered
as multiply
defined because
they are used in
different local
scopes

c

A

L

MEND

START

a

LCLA

&MAINA,'&A~ITij.

LCLB

&MAINB ,~~gg~~
&Ml\INC ,&q~$'J:lg,&PARA

O~~~~I~p~?e~g~10p~?-: 'Cleol ax:~~ioi1~.

END

338

Correct definition
of SETC symbol
(no symbolic
parameters
allowed in
open code)

SUBSCRIPTED LOCAL SET SYMBOLS:
A local subscripted SET symbol is
declared by the LCLA, LCLB, or LCLC
instruction. This declaration must
be specified as shown in the figure
to the right.

Format:

LCLA
LeLB,
or LCLC

4DtThe maximum dimension allowed is
32,767.
DOS

•
•

dimension indicates the number
of SE'! variables associated with
the subscripted SET symbol.
The
assembler assigns an initial value_
to every variable in the array thus
declared.
NOTE: A subscripted local SET
symbol can be used only if the
declaration has a subscri~t, which
represents a dimension; a
nonsubscripted local SET symbol
can be used only if tbedeclaration
had no subscript.

&SETSYM

I

I~ariable
Symbol

The maximum dimension allowed is
4095.
·~he

•

-

}

(I dimension I)

0

.

Must be an unsigned
decimal self-defining
term but not zero

Format:

Instruction

Array Defined
Same initial values as for non-subscripted
SET symbols

LeLA

JOJO\O\

LCLB

8<
'~ -tOJ 0 I 0 I 0 I 0 I

LCLC

"lnull

\
~

I null I null I

's

Example:

LeLB

&B(lO}

10 10 10 10101010 1010101

Section L: The Conditional Assembly Language

339

L2B -- THE GBLA, GELE, ANt GELC
INSTRUCTIONS

Furpose
You use the GELA, GELE, and GBLC
instructions to declare the global
SETA, SETB, and SETC symbols you
need.

rand

Name
Blank

GBLA,
GBLB, or

One or more variable
symbols separated
by commas

GBLC
Specifications
The format of the GBLA, GELE, and
GBLC instruction staterrents is given
in·· the figure to the right.
These instructions can be used
anywhere in the body of a macro
definition or in the open code
portion of a source module.

Source Module

&Bcannot be used
here, before its
declaration

MACRO

•

•

Any variable symbols declared in
the operand field have a global
scope. They can be used as SET
symbols anywhere after the pertinent
GBLA, GBLB, or GBLC instructions.
However, they can be used only
within those parts of a program
in which they have been dec·lared
as global SET symbols, that is in
any macro definition and in open.
code.
NOTE:

•

MAC 2
GBLB

Values can be passed between:

• The macro definitions, MAC 1 ,
andMAC2, only by using the variable
symbols &B and &C.

~.
The macro definition,
~open code, only by using

START

o

MAC2, and
the variatle

symbol &C.
~.

The macro definition, MAC1, and
~open code, only by using the variatle
symbol &C.

340

here, because it
has not been de •
cia red in open
code

The assembler assigns initial values
to these SET symbols as shown in
the figure to the right.

Instruction

Initial Value assigned
to SET variable symbols
in operand field

GBLA
GBLB
GBLC

0
0
Null character string

Source Module

MACRO
FIRST
GBLA

&A
.--"'1- i -

O
•

e

The assembler assigns this initial
value to the SET symbol only when
it processes the first GBLA, GBLB,·
or GBLC instruction in which the
symbol appears.
Subsequent GBLA,
GBLB, or GBLC instructions do not
reassign an initial value to the
SET symbol.

DOS NOTE:ThetlGBLA
&A"instruction
ItI~.?t:I>r~c:~de .tlle START instruction.

0

~&A=O

1

&A can be
used here

~

I

MEND
OPEN

START

0

FIRST

Processing
Sequence
value of &A
can be changed
in expansion of
macro FIRST

•

--t.&A= assigned value

I

'tr---_
&A can be
[ used here

END

"

"'v

Section L: The Conditional Assembly Language

341

GLOBAL VARIABLE SYMECLS MUST NOT
BE MULTIPLY DEFINED: A global SET
variable symbol declared by the
GBLA, GBLB, or GELC instruction
must not be identical to any other
variable symbol used in open code
or within the same macro definition.
The following rules apply to a
global SET variable symbol:

Source Module

MACRO
MULTGLOB
LCLA
LCLB
LCLC

1. Within a macro definition, it
must not be the same as any symbolic
~ parameter declared in the prototype
statement.
•

2. It must not be the same as any
local variable symbol (see L2A)
declared within the same local
scope.

3.' The same variable symbol must
not be declared or used as two
~ different types of global SET symbol,
for example, as a SETA or SETB
symbol.
NOTE 1: A global SET symbol should
not begin with the four characters
&SYS, which are reserved for system
variable symbols (see J7).
DOS

NOTE

2: The'global declarations

~ must precede the local declarations.

GBLA

&GA

GBLB
{

8&GB
&GCl,&GC2

GBLC

These variable symbols

MEND

LCLA
LCLC

G~LA

!

GBLB
GBLC
START
END

GBLA}
GBLB
GBLC

SUBSCRIPTED GLOBAL SET SYMBOLS:
A global subscripted SET symbol
is declared by the GELA, GBLE, or
GBI.C instruct ion.
'Ihis declaration
must be specified as shown in the
figure to the right.
~

The maximum dimension allowed is
32,767.

DOS The

maximum

4095~

The dimension indicates the number
of SE'I variables associated with
the subscripted SET symbol.
The
A assembler assigns an initial value
~to every variable in the array thus
declared.

e
342

•
Format:

Instruction

Array Defined
Same initial values as
for non-subscripted SET symbols

GBLA
GBLB
GBLC
Global arrays are assigned initial
values only by the first global
declaration processed, in which
a global subscripted SET symbol
appears

)

Source Module

MACRO
MAC I

o
8
_

NOTES:
1. A subscripted global SET symbol
can be used only if the declarat10n
has a subscript, which represents
a dimension; a nonsubscripted global
SET symbol can be used only if the
declaration had no subscript.

2. Wherever a particular global
SET symbol is declared with a
dimension as a subscript, the
dimension must be the same in each
declaration.

&Al
&C

GBLA

&Al'&A2(4~~

GBLB

&SWITCH (50)

GBLC

&CHAR(IO) ,&C

/8SETA
SETC

&A2(22)

o

MAC 2
GBLB

•

•

&SWITCH (50)

I

-'" MEND
OPEN START

I

Open

Core

L....--OGBLB

/0

'&CHAR(6} ,

MEND
MACRO

DOS NOTE: The II GBLB 'SWITCH (50) II
instruction must precede the START
instruct ion ..

/.

I

0

~

&SWITCH (50)

END

L3 -- Assigning Values to Set Symbols
L3A -- THE SETA INSTRUCTION

Purpose
The SETA instruction allows you to assign an arithroetic
value to a SETA symbol.
You can specify a single value
or an arithmetic expression from which the assembler will
compute the value to assign.
You can change the values assigned to an arithmetic or
SETA symbol. This allows you to use SETA symbols as
counters, indexes, or for other repeated computations that
require varying values.
Section L: The Conditional Assembly Language

343

Specifications

SETA
The format of the SETA instruction
statement is given in the figure
to the right.

~

The variable symbol in the name
field must have been previously
declared as a SETA symbol 1n a GBLA
or LCLA instruction.

Name

Operation

Operand

A variable

SETA

An arithmetic expressio ll

•

SymbOl.

~ Allowable range of values

-i3 1through 23 1-1

9~tllevaj:f~l?le~y.IIIl?9J.··l$assigned
only !:l~YI?~~t;t;~~~pt;~Y:!:ll1J,e·· O~.N ..

•

J

The assembler evaluates the
arithmetic expression in the operand
field as a signed 32-bit arithmetic
value and assigns this value to
the SETA symbol in the name field.
An arithmetic expression is descrited
in L4A.

. . SUBSCRIPTED SETA SYMBOLS:
'Ihe SETA
~symbol in the name field can be
subscripted, but only if the same
A SETA symbol has been previously
~declared in a GBLA or LCLA
instruction with an allowable
dimension.

LCLA

&Al,&A2

LCLA

&SUBSCRA(lQO)

•

•

..

Must be in range
\ 1 through 32767

2000

&SUBSCRA(20) SETA

J

DOS1~4095

Must be an arithmetic
expression allowed in
operand of SETA
instruction

The assembler assigns the value
of the expression in the operand
Afield .t~ th~ position in the declared
~array g1ven by the value of the
subscript. The subscript expression
must not be 0, or have a negative
value, or exceed the dimension
•
actually specified in the
declaration.

&SUBSCRA

Array

L-I~I--LI_,,--_~t ~

t t

i

&SUBSCRA ( 2

2

SETA

2000

:'-.~Yxnb.fi.r8t.···
. ·.threiClH.Jt.ot.r
•..••.•. O'tl~ft.I • ./
~
v···!lX'.·.·
.•. parts'"<

Format:
Value Assigned
to SETC symbol

exprf!ssi~ . •. 9~i~~fJ~~:l.n'·ti~.t'tEJ~)

.

~~aqt:().x:~~~.pe.~llfrij
ari.~~t~~•. '.• .•~xlre'~.sion· .• .· •·...•~.~. .Q. . :w. . . . e. /d.,. .•. • ~~. •. . . •. .'•.

255

tbe/.·Q~ando. <>acSEfJ!Alnstructt.on~

'········~·;~~~~i·~~~~f~~.··>~~~.~a¥·~s···• ·. ·¥he·<

~~a~~,.;',~~x:~~g.i·l::~pt:~~'n~e~·• •· · •. (;9
~~!,::!~~~J.1~i~.~~~~~t'l9}.·.·,·.'»e.fore

.5$~;i~~~~~#1~

Examples:

&Cl

5ETC

&C2

SETC

(3} 'ABC'

&C3

SETC

(31 'ABCDE' (1, 31

FFF

in,i·.•t.he . .·.··.·.n.a.e.it.ie14•••

346

•

&C4A SETC

(31 'ABC' • 'DEF I

&C4B SETC

' ABC' • (3} 'ABCDEF' (4,3

o
~
~

e
.

SUBSCRIPTED SETC SYMBOLS:
The SETC
symbol in the name field can be----subscripted, cut only if the same
SETC symbol has been previously
declared in a GBLC or LCLC
instruction with an allowable
dimension.

LCLC
LCLC

The assembler assigns the character
value represented in the operand
field to the position in the declared
array given by the value of the
subscript. The subscript expression
must not be 0, or have a negative
value, or exceed the dimension
actually specified in the
declaration.

&Cl,&C2
&SUBSCRC(20)e
Must be in the
range 1 through DOS
1·4095
32767

0
&SUBSC~C (10) SETC
Array:
Must be an arithmetic
expression allowed in
the operand of a SET A
instruction

&SUBSCRC

I

t

1

'ABCDE'

•

IABCDEI

t
2

t

~~

I

t

10

20

&SUBSCRC(25) SETC 'ABCDEF' **ERROR** No
~
Value Assigned
Value assigned

&Cl

SETC

'&SUBSCRC(lO) ,

&Cl=ABCDE

L3C -- THE SETB INSTRUCTION

purpose
The SETB instruction allows you to assign a cinary bit
value to a SETB symbol.
You can assign the bit values,
o or 1, to a SETE symbol directly and use it as a switch.
If you specify a logical expression (see L4C) in the operand
field, the assembler evaluates this expression to determine
whether it is true or false and then assigns the values
1 or 0 respectively to the SETB symbol.
You can use this
computed value in condition tests or for sUbstitution.

Section L: The Conditional Assembly Language

347

Specifications
The format of the SETB instruction
statement is given in the figure
to the right.
The variab1e'symbo1 in the name
field must have been ~reviously
dec;::lared as a SETE symbol in a GELE
or LCI.B instruction.

I

SETB
Format:

os Thevar~ab1esyml:>Olis aSSigned
only

a type attribute value ofN.
The three options that can be
specified in the o~erand field are:

. • 1. A binary vallie

•

2.A binary value enclosed in
parentheses

()SNOTE: .' An . . ari thineticvalue. enclosed
yalue can pe represented by an
'Unsigneddecirnalself .... def~ningterm,
(iSETAsymbol ,9r an attribute '
referenc,e' other •."than" the type
attribute reference.. If the value
is 0, the assembler assigns . a value
of 0 to th.: symbol. in . the mime,
field;. If the value is not O~the
assembler assig·nsava~ueoft•

•

One of three options,
exemplified below

&B1

SETB

0

&B2

SETB

(1)

&B3A

SETB

(2· GT

SETB

Values
Assigned

••
3r'

Greater
than

•

(2 LT 3)

true

0
1
0

1

ILess thanl

3. A logical expression enclosed
in parentheses (see L4C) •

SUBSCRIP'fED SETB SYMBOLS: The SETB
symbol in the name field can be
subscripted, but only if the same
SETB symbol has been 'previously
declared in a GBLE or LCLE
instruction with an allowable
dimension.

The assembler assigns the binary
value explicitly specified or
implicit in the logical expression
A present in the operand field to
~the position in the declared array
given by the value of the subscript.
The subscript expression must not
be 0, or have a negative value,
~or exceed the dimension actually
specified in the dec1ara~ion.

348

Operand

&B3B

The assembler evaluates the logical
expression, if specified; to
determine if it is true or false.
If it is true, it is given a value
of 1; if it is false, a value of
o. 'Ihe assembler assigns the
• , explicitiy specified binary value
(0 or 1) or the computed logical
value (0 or 1) to the~SETB symbol
in the name field.
•

Operation

SETB

Examples:

(0 or 1)

only in ·.parenthesesisallowed."This

•

.-

Name
A variable
symbol

LCLB
LCLB

&B1,&B2
&SUBSCRB~~g.?

•

&SUBSCRB(10) SETB

1

A r r a y : ; ; :. . .'

&SUBSCRB
Must be an arithmetic
expression allowed
in operand of a SETA
instruction

&SUBSCRB(72)

&B1

"
SETB

III

t

t

I

t

10

2

SETB

l~

50

1

'::,:: ERROR:::::: No VALUE

ASSIGNED

Value assigned

&SUBSCRB(10)

&B1=1

L4 - Using Expressions
There are three types of expressions that you can use only
in conditional assembly instructions: arithmetic, character,
and logical. The assembler evaluates these conditional
assembly expressions at pre-assembly time.
Do not confuse the conditional assembly expressions with
the absolute or relocatable expressions used in other
assembler language instructions and descril:ed in C6. 'Ihe
assembler evaluates absolute and relocatable expressions
at assembly time.
L4A -- ARITHMETIC (SE'I'A) ,EXPRESSIONS

purpose
You can use an arithmetic expression for assigning an
arithmetic value to a SETA symbol, or for computing a value
used during conditional assembly processing.
arithmetic expression can contain one or more SE'I
symbols, which allows you to use arithmetic expressions
wherever you wish to specify varying values, for exam};:le
as:
An

1.Sul:scripts for SET symbols, symbolic parameters, and
&SYSLIST,and in substring notation.

",;:;;/q~\.'~~'PGp~iq~¥i~ti.fc:J.ct~i~¥ri ',the ope ranCi
"nfy·"instruction;.
,
~:
:~.;:,
,.:.;, ..::::.", :::..:.:.:.;. :...::,. :: .... .....::..:: ..:.....", ......: :,:',':":: :. :,:.;.... :.:.::::::.....:.:......... ::.:<::..'.:

You can then control loops, vary the results of
computations, and produce different values for substitution
into the same model statement.

Section L: The Conditional Assembly Language

349

Specifications
Arithmetic expressions can be used
as shown in the figure to the right.

(IT)

®

NOTE: When an arithmetic expression
is used in the operand field of
a SETC instruction, the assembler
assigns the character value
representing the arithmetic
expression to the SETC symbol, after
substituting values into any variable
symbols.
It does not evaluate the
arithmetic expression.

Example

Can be Used In

Used As

SET A instruction

operand

&Al SETA &Al+2

AI F instruction
or
SETB instruction

comparand
in arithmetic
relation

AlF (&A:::IO GT 30) .A

Subscripted SET
symbols

subscript

&SETSYM(&A+lO-&C)

Substring notation
(See L6)
Sublist notation

subscript

subscript

'&STRlNG' (&A*2,&A-l)
sublist

(A,B,C,D)

when &A=l

&PARAM (&A+l) =B
&SYSLlST

subscript

&SYSLlST(&M+l,&N-2)
&SYSLlST(N'&SYSLlST)

SETC instruction

350

character
string in
operand

•

&C SETC '5-l0t,:&A'
if &A=lO~

then &C=5-10~~1

The figure below defines an arithmetic expression (selfdefining terms are described in C4E).

Arithmetic
Expression

·Operators Allowed
Unary:

+ positive
- negative

Scaling
Integer
Count
or
Number

Binary:

+addition
- subtraction
':' multiplication
/ division

Arith. Exp

= Arithmetic

Expression

Section L: The Conditional Assembly Language

351

SETA

none

-

-

SETB

none

-

-

}

&SYSPARM

DOS
Symbolic
Parameters
&SYSLIST(n)

352

Value

Restrictions

SETC

The variable symbols that are allowed
as terms in an arithrretic expression
are given in the figure to the
right.

Example

Variable
Symbol

value must be an
unsigned decimal
self-defining term
in the range a
through

&C

123

&SYSPARM

2000

&PARAM

X'Al'

&SUBLIST(3)

C'Z'

&SYSLIST(3)

24

2,147.18 3,647

O:~,~~~/~
value must be a
self-defining term

~ correspond;n,

&SYSLIST(n,m)

operand or sublist
entry must be
a self-defining
term

&SYSNDX

none

&SYSLIST(3,2) B'lOl'

-

-

Operators

RULES FOR CODING ARITHMETIC
EXPRESSIONS: The following is a
summary of coding rules for
arithmetic expressions:

Unary

+,-

Binary

+, -,):' ,I

Examples

1. Both unary (operating en one
value) and binary (operating on
two values) operators are allowed
in arithmetic expressions.
2. An

arith~etic

c::::::> - &A

&A

~&A-&B

expression can

have one or more unary operators
O preceding
any term in the expression

Context determines whether a
+ or - is a Unary or
Binary operator

or at the beginning of the
expression.

~

3. An arithmetic expression must
not begin with a binary operator,
and it must not contain two binary
operators in succession.

•

4. An arithmetic expression must
not contain two terms in succession.

•
A

5. An arithmetic expression must
not contain blanks between an
operator and a term nor between
two successive operators.

ie

DOS

oj

·.~··.·.·~¥ith.~~'~~S!~~~Z:.~~·~~?~~~r.9()ij~~~n·
ii~u.J;l···(·~.·?i.~• . 6./·.• . ~tl~r~;·'·:(1n9,B~.~.~~¥/9R·t3~ ~~BT•.~
L3ID~<:l. ,~R.".E9.~. '~.".w~.~:~.!~. ,u.Q!,,",PS.;:,!~th~,~~§,~ ..
Note that the parentheses required
for sublist notation, substring
notation, and subscript notation
count toward this limit.

&A-&B

'C::::>

&A/&B+lOO

~

&C-&D

t=:::> &C):; (-&D)

INVALID

·C:A

6. An arithmetic expression can
contain up to 24 unary and binary
operators and up to 11 levels of
parentheses.

r::=::>

•

INVALID

&C):'/&D
&C + *&D
"

~

INVALID
INVALID
,-----------"'1

Leftmost operator between
two terms is Binary

INVALID

INVALID

Section L: The Conditional Assembly Language

353

EVALUATION OF ARITHMETIC EXPRESSIONS:
The assembler evaluates arithmetic
expressions at pre-assembly time
as follows:

Examples of Arithmetic Expressions

&A~~--X'

o

a. It performs unary operations
before binary oferations, and

••
•

b. It performs the binary
operations of multiplication
and division before the binary
~perations of addition and
sul::;tract ion.

3. In division, i t gives an integer
result; any fractional portion is
dropped.
Division by zero gives
a 0 result.
.

==t>

&A~
5;!-+10

+50

~.

1. It evaluates each arithmetic
term.
2. It performs arithmetic operations
from left to right.
However:

A'

Value of Arithmetic
Expression

&A=lO, &B=2

fA+lO/&B

===:>

(&A+lO) /&B

==:>

10+(lOL2)

~

20/:e8~

15
10

&A=lO
&A/2

===C>

10/2

5

&A=ll
&A/2

•

~ 11/2

5

&A=l

&A/2

~

1/2

0

&A=l
10i!-&A/2

~ 10/2

&A +

O
•

4. In parenthesized arithmetic
expressions ,the assembler evaluates
the innermost expressions first
and then considers them as arithmetic
terms in the next outer level of •
expressions.
It continues this
process until the outermost
expression is evaluated.
5. The computed result, including
intermediate values, must lie in
the range _23~ through +2 31 -1.

Final evaluation.

354

5

L4B -- CHARACTER (SETC) EXPRESS IONS

Purpose
The main purpose of a character expression is to assign
a character value to a SETC symbol. You can then use the
SETC symbol to substitute the character string into a model
statement.
You can also use a character expression as a value for
comparison in condition tests and logical expressions (see
L4q. In addition, a character expression provides the
string from which characters can be selected by the
substring notation (see LS) •
Substitution of one or more character values into a
character expression allows you to use the character
expression wherever you need to vary values for substitution
or to control loops.

,

, @{ffino~'
0

Specifications
Character (SETC) expressions can
be used only in conditional assembly
instructions as shown in the figure
to the right.

Can be Used in

Used As Example

SETC instruction

operand

&C

AIF instruction
or
SETS instruction

character
string in
character
relation

AIF ( '&C' EQ 'STRINGl') .B

Substring notation
(See L5)

first part
of notation

'SELECT' (2,5)=ELECT

SETC

'STRINGO'

,

I

character 11
expression

Section L: The Conditional Assembly Language

355

•

A character expression consists of any combination of
characters enclosed in apostrophes. Variable symbols are
allowed. The assembler substitutes the representation of
their values as character strings into the character
expression before evaluating the expression.
Up to 255 characters are allowed in a character expression.

Attribute references are not allowed in character
expressions·.

NOTE:

Must not contain more than
255 characters
(including blanks)

356

Variable
Symbol

Restrictions

SETA

sign and leading
zeros are suppressed
sta'nd alone zero
is used

SETB

none

SETC

none

Example

&A

SETA -0201

&C

SETC

&ZERO

•

Value
Substituted

'&A'

201

SETA 0
'&ZERO'

&C SETC
&B SETB
&C1 SETC

1
'ABC'

&C2 SETC

'&C1'

0
1
ABC

Symbolic
Parameters

none

&PARAM=(ABCl
&C1 SETC '&PARAM' (ABCl

System
Variable
symbols

none

&NUM SETC '&SYSNDX' 0201
if &SYSNDX= 201

Value of
Variable
Symbols
Used

Examples
Concatenation
operator is
a period (.)

Value' of
Character
Expression

0
O
•
•

•

'ABC'

EVALUATION CF CHARACTER EXPRESSIONS:
The value of a character expression
is the character string within the
enclosing apostrophes, after the
assembler performs any substitution
for variable symbols.
Character strings, including variable
symbols, can be concatenated to
each other wi thin a character
expression.
The resultant string
is the value of the expression used
in conditional assembly operations:
for example, the value assigned
to a SETC symbol.

A double apostrophe must be used to
generate a single apostrophe as part
of the value of a character
expression.
A double ampersand will generate a
double ampersand as part of the value
of a character expression. To
generate a single ampersand in a
character expression, use the
substring notation, for example,
('&&'(1,1».
NOTE:

To generate a period, two

~ periods must be specified after-a
var~able

symbol, or the variable
symbol must have a period as part of
its value.

ABC

'&PARAM'
'A+B-C~:.;J~.ca~ •. :·()p.~.r~1:.()f.:;;. • •.•.an
i.j;Qi~.i~~y~1$ .• ·.· • 9~• ·.• .·.:P(lct.'~.t\'t::b~.f3.~.$.

Note that the relational and other
o:perators used by the arithmetic
and character expressions in
relations do not count toward this
total.

362

&B

5. The relational and logical
operators must be iromediately
preceded and followed by at least
•
one blank or other special character. ·

~

~

(' &C'EQ'ALLOC')
(&A NE 10) .
blank mandatory

Examples of Logical Expressions

EVALUATION OF LOGICAL EXPRESSIONS:
The assembler evaluates logical
expressions as follows:
1. It evaluates each logical term,
which is given a binary value of
o or 1.

•
•
•

( , ABC' LT 'ABCD')

a. The arithmetic or character
expression specified as values
for comparison in these relations,
and then
b. The arithmetic or character
relation, and finally

•

•

(3,4»

Always true
(given a value of 1)

(&B AND NOT (5 GT 3) )

V

c. The logical term, which is
the result of the relation.
If the relation is true, the
logical term it represents is
given a value of 1; if the
relation is false, the term is
given a value of O.

•

(&B AND (NOT (5 GT 3) ) )

(&B OR &A AND ('&C' EQ 'B'»

NO'IE: If two comparands in a
character relation have characte r
values of unequal length, the
assembler always takes the shorter
character value to b~ l~ss tban
the longer one.

3. The assembler performs logical
operations from left to right.
However:

•

•
•

«&A NE 100) OR T'&AREA EQ '&PARAM'

2. If the logical term is an
arithmetic or character relation,
the assembler evaluates:

•
•

LO~

/0\

•

(&B OR (&A AND ('&C' EQ 'B'»)

~-------.--------~

a.
It performs logical NOTs
before logical ANDs and ORs,
and

~--

b. It performs logical ANDs
before logical ORs.

(NOT (&Bl OR (&B2 AND L'&C'EQ~'"

4. In parenthesized logical
expressions, the assembler evaluates
the innermost expressions first
and then considersthero as lOgiCal.
terms in the next outer level of
expressions.
It continues this
process until the outermost
expression is evaluated.

o

QB:;#!.~~»»

Section L: The Conditional Assembly Language

363

LS -- Selecting Characters from a String
L5A -- SUBSTRING NOTATION

Purpose
The substring notation allows you to refer to one or Rcre
characters within a character string. You can therefore
either select characters from the string and use them fer
substitution or testing, or scan through a complete string,
inspecting each character. By concatenating substrings
with other substrings or character strings, you can
rearrange and build your own strings.

Specifications
The substring notation can be used only in conditional
assembly instructions as shown in the figure below.

Can be
Used in

Used as

Example

SETC
instruction
operand

operand

&Cl

SETC

'ABC' (1,3)

ABC

part of
operand

&C2

SETC

'&C1' (1,2) • 'DEF'

ABDEF

AIF

( , &STRING' (1,4) EQ ' AREA' ) • SEQ

SETB

('&STRING' (1,4). '9' EQ 'FULL9' )

SETB or
AIF
instruction
operand
(logical
. expression)

364

Character
value in
comparand
of character
relation

&B

Value Assigned
to SETC symbol

Substring
;'

•
•
•
•

The substring notation must be
specified as shoWn in the figure
to the right.
The character string is a character
expression from which the substring
is to be extracted. The first
subscript indicates the first
character that is to be extracted
from the character string. The
second subscript indicates the
number of characters to be extracted
from the character string, starting
with the character indicated by
the first subscript. Thus the
second subscript specifies the
length of the resulting substring.

Examples

Value of Variable
Symbol

Character Value
of Substring

, ABCDE' (l, 5 )

ABCDE

'ABCDE' (2,3)

BCD

'&C' (3,3)

ABCOE

COE

, &PARAM' (3,3)

'( (A+3)*lO)

A+3

Section L: The Cond'itional Assembly Language

365

The character string must be a valid
character expression with a length,
N, in the range 1 through 255 characters.
The length of the resulting substring
must be within the range 0-255.
The subscripts, e1, and e2, must be
arithmetic expressions. The substring
notation is replaced by a value that
depends on the three elements: N, e1,
and e2, as summarized below:

Examples:

•

•

•

1

ABCDEF 1 (2, 5 )

When the value of e1 exceeds N, the
assembler issues a warning message,
and a null string is generated.

8

~. ~. . ~. ~. ~.... . ~~ . . . . ~J:.~. ~.!:. ~:: . . !:.~. ~.~ . . . .~+ .~).!. . . . .~. '

·M.•~.~mp+¢l:'·;;~§~q.~.~\[?:.1i~·l:'ljiOg'LmEa.~·
",;;,and generates a substring which
includes only the characters up
to the end of the character expression specified.

(0 ,\$.)

BCDEF

null

e1 >N
1

A

ABCDEF 1 (7 ,~)

N=€' :',N+l

liABCDEF 1 (3,5)
'ABCDEF' (3,4)

)

366

N=6

Ael::0

VI ABCDEF 1

~When e2 indexes past the end of the
character expression (that is,

Character Value
of Substring

e1te2~N+l

When e1 has a value of zero or a
negative value, the assembler issues
an error message •

When e2 has a value of 0, the
assembler generates the null
character string. Note that if e2
is negative, the assembler issues
an error message.

O? Question
Mark

,
:

@
I

=

"

Colon
Number Sign
At Sign
Prime, Apostrophe
Equal Sign
Quotation Mark

Hole Pattern

Type

Bit Pattern
Bit Positions
01234567

PF
%

Control Character
Special Graphic

00000100
01 101100

12 -9 - 4

R

Upper Case

11 01 1001

11 - 9

a

lower Case

10000001

Control.Character,
function not yet

00 11 0000

Examples

assigned

Zone Punches

I

Digit Punches

0-8-4
12 -0 - 1
12 - 11 - 0 -9 - 8 - 1
I

I

I

Appendix I: Character Codes

381

This page left blank intentionally.

Appendix II: Hexadecimal-Decimal Conversion Table

The table in this appendix provides for direct conversion of decimal and hexadecimal
numbers in these ranges:

r--------------T---------------,
Hexadecimal I
Decimal
I

I

~--------------+---------------~

Il ______________
000 to FFF I _______________
0000 to 4095 JI
~

Decimal numbers (0000-4095) are given within the 5-part table. The first two characters
(high-order) of hexadecimal numbers (OOO-FFF) are given in the lefthand column of the
table; the third character (x) is arranged across the top of each part of the table.
To find the decimal equivalent of the hexadecimal number OC9, look for OC in the left
colum, and across that row under the column for x = 9. The decimal number is 0201.
To convert from decimal to hexadecimal, look up the decimal number within the table
and read the hexadecimal number by a combination of the hex characters in the left
column, and the value for x at the top of the column containing the decimal number. For
example, the decimal number 123 has the hexadecimal equivalent of 07B; the decimal
number 1478 has the hexadecimal equivalent of 5C6.
For numbers outside the range of the table, add the following values to the table

r--------------T-----------,
I Hexadecimal I Decimal I
~--------------+-----------~

1000
2000
3000
4000
5000
6000
7000
8000
9000
AOOO
BOOO
COOO
DOOO
EOOO
FOOO

4096
8192
12288
16384
20480
24576
28672
32768
36864
40960
45056
49152
53248
57344
61440

-----------~--~-----------j

Appendix II: Hexadecimal-Decimal Conversion Table

383

x =

0

1

2

3

4

5

6

7

8

9

A

B

C

0

E

F

OOx
01x
02x
03x

0000
0016
0032
0048

0001
0017
0033
0049

0002
0018
0034
0050

0003
0019
0035
0051

0004
0020
0036
0052

0005
0021
0037
0053

0006
0022
0038
0054

0007
0023
0039
0055

0008
0024
0040
0056

0009
0025
0041
0057

0010
0026
0042
0058

0011
0027
0043
0059

0012
0028
0044
0060

0013
0029
0045
0061

0014
0030
0046
0062

0015
0031

04x
05x
06x
07x

0064
0080
0096
0112

0065
0081
0097
0113

0066
0082
0098
0114

0067
0083
0099
0115

0068
0084
0100
0116

0069
0085
0101
0117

0070
0086
0102
0118

0071
0087
0103
0119

0072
0088
0104
0120

0073
0089
0105
0121

0074
0090
0106
0122

0075
0091
0107
0123

0076
0092
0108
0124

0077
0093
0109
0125

0078
0094
0110
0126

007'1
009S
0111
0127

08x
09x
OAx
OBx

0128
0144
0160
0176

0129
0145
0161
0177

0130
0146
0162
0178

0131
0147
0163
0179

0132
0148
0164
0180

0133
0149
0165
0181

0134
0150
0166
0182

0135
0151
0167
0183

0136
0152
0168
0184

0137
0153
0169
0185

0138
0154
0170
0186

0139
0155
0171
0187

0140
0156
0172
0188

0141
0157
0173
0189

0142
0158
0174
0190

01113
015)
0175
0191

OCx
OOx
OEx
OFx

0192
0208
0224
0240

0193
0209
0225
0241

0194
0210
0226
0242

0195
0211
0227
0243

0196
0212
0228
0244

0197
0213
0229
0245

0198
0214
0230
0246

0199
0215
0231
0247

0200
0216
0232
0248

0201
0217
0233
0249

0202
0218
0234
0250

0203
0219
0235
0251

0204
0220
0236
0252

0205
0221
0237
0253

0206
0222
0238
0254

0207
0223
0239
0255

lOx
l1x
12x
13x

0256
0272
0288
0304

0257
0273
0289
0305

0258
0274
0290
0306

0259
0275
0291
0307

0260
0276
0292
0308

0261
0277
0293
0309

0262
0278
0294
0310

0263
0279
0295
0311

0264
0280
0296
0312

0265
0281
0297
0313

0266
0282
0298
0314

0267
0283
0299
0315

0268
0284
0300
0316

0269
0285
0301
. 0317

0270
0286
0302
0318

0271
0287
0303
0319

14x
15x
16x
17x

0320
0336
0352
0368

0321
0337
0353
0369

0322
0338
0354
0370

0323
0339
0355
0371

0324
0340
0356
0372

0325
0341
0357
0373

0326
0342
0358
0374

0327
0343
0359
0375

0328
0344
0360
0376

0329
0345
0361
0377

0330
0346
0362
0378

0331
0347
0363
0379

0332
0348
0364
0380

0333
0349
0365
0381

0334
0350
0366
0382

0335
0351
0367
0383

18x
19x
lAx
lBx

0384
0400
0416
0432

0385
0401
0417
0433

0386
0402
0418
0434

0387
0403
041?
0435

0388
0404
0420
0436

0389
0405
0421
0437

0390
0406
0422
0438

0391
0407
0423
0439

0392
0408
0424
0440

0393
0409
0425
0441

0394
0410
0426
0442

0395
0411
0427
0443

0396
0412
0428
0444

0397
0413
0429
0445

0398
0414
0430
0446

0399
0415
0431
0447

lCx
lOx
lEx
lFx

0448
0464
0480
0496

0449
0465
0481
0497

0450
0466
0482
0498

0451
0467
0483
0499

0452
0468
0484
0500

0453
0469
0485
0501

0454
0470
0486
0502

0455
0471
0487
0503

0456
1)472
0488
0504

0457
0473
0489
0505

0458
0474
0490
0506

0459
0475
0491
0507

0460
0476
0492
0508

0461
0477
0493
0509

0462
0478
0494
OSlO

047'J
04!*!)
0511

20x
21x
22x
23x

0512
0528
0544
0560

0513
0529
0545
0561

0514
0530
0546
0562

0515
0531
0547
0563

0516
0532
0548
0564

0517
0533
05119
0565

0518
0534
0550
0566

0519
0535
0551
0567

0520
0536
0552
0568

0521
0537
0553
0569

0522
0538
0554
0570

0523
0539
0555
0571

0524
0540
0556
0572

0525
0541
0557
0573

0526
0542
0558
05711

0527
0543
0559
0575

211x
25x
26x
27x

0576
0592
0608
0624

0577
0593
0609
0625

0578
05911
0610
0626

0579
0595
0611
0627

0580
0596
0612
0628

0581
0597
0613
0629

0582
0598
06111
0630

0583
0599
0615
0631

05811
0600
0616
0632

0585
0601
0617
0633

0586
0602
0618
06311

0587
0603
0619
0635

0588
0604
0620
0636

0589
0605
0621
0637

0590
0606
0622
0638

0591
0607
0623
0639

28x
29x
2Ax
2Bx

06110
0656
0672
0688

0641
0657
0673
0689

0642
0658
06711
0690

0643
0659
0675
0691

06411
0660
0676
0692

0645
0661
0677
0693

0646
0662
0678
0694

06117
0663
0679
0695

06118
06611
0680
0696

06119
0665
0681
0697

0650
0666
0682
0698

0651
0667
0683
0699

0652
0668
0684
0700

0653
0669
0685
0701

06511
0670
0686
0702

Ob55
0671
0687
0703

2Cx
20x
2Ex
2Fx

0704
0720
0736
0752

0705
0721
0737
0753

0706
0722
0738
07511

0707
0723
0739
0755

0708
07211
0740
0756

0709
0725
0741
0757

0710
0726
0742
0758

0711
0727
07113
0759

0712
0728
0744
0760

0713
0729
0745
0761

0714
0730
0746
0762

0715
0731
0747
0763

0716
0732
0748
07611

0717
0733
07119
0765

0718
0734
0750
0766

0719
0735
0751
0767

30x
31x
32x
33x

0768
0784
0800
0816

0769
0785
0801
0817

0770
0786
0802
0818

0771
0787
0803
0819

0772
0788
08011
0820

0773
0789
0805
0821

0774
0790
0806
0822

0775
0791
0807
0823

0776
0792
0808
0824

0777
0793
0809
0825

0778
07911
0810
0826

0779
0795
0811
0827

0780
0796
0812
0828

0781
0797
0813
0829

0782
0798
08111
0830

0783
0799
0815
0831

34x
35x
36x
37x

0832
08118
08611
0880

0833
0849
0865
0881

0834
0850
0866
0882

0835
0851
0867
0883

0836
0852
0868
0884

0837
0853
0869
0885

0838
08511
0870
0886

0839
0855
0871
0887

08110
0856
0872
0888

08111
0857
0873
0889

08112
0858
0874
0890

08113
0859
0875
0891

081111
0860
0876
0892

0845
0861
0877
0893

0846
0862
0878
08911

08117
0863
0879
0895

38x
39x
3Ax
3Bx

0896
0912
0928
0944

0897
0913
0929
0945

0898
0914
0930
0946

0899
0915
0931
0947

0900
0916
0932
0948

0901
0917
0933
0949

0902
0918
0934
0950

0903
0919
0935
0951

0904
0920
0936
0952

0905
0921
0937
0953

0906
0922
0938
0954

0907
0923
0939
0955

0908
0924
0940
0956

0909
0925
0941
0957

0910
0926
0942
0958

0911
0927
0943
0959

3Cx
30x
3Ex
3Fx

0960
0976
0992
1008

0961
0977
0993
1009

0962
0978
0994
1010

0963
0979
0995
1011

0964
0980
0996
1012

0965
0981
0997
1013

0966
0982
0998
1014

0967
0983
0999
1015

0968
0984
1000
1016

0969
0985
1001
1017

0970
0986
1002
1018

0971
0987
1003
1019

0972
0988
1004
1020

0973
0989
1005
1021

09711
0990
1006
1022

0975
0991
1007
1023

384

00Li7
OOO~

01J6~

0

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

40x
41x
42x
43x

1024
1040
1056
1072

1025
1041
1057
1073

1026
1042
1058
1074

1027
1043
1059
1075

1028
1044
1060
1076

1029
1045
1061
1077

1030
1046
1062
1078

1031
1047
1063
1079

1032
1048
1064
1080

1033
1049
1065
1081

1034
1050
1066
1082

1035
1051
1067
1083

1036
1052
1068
1084

1037
1053
1069
1085

1038
1054
1070
1086

1039
1055
1071
1087

44x
45x
46x
47x

1088
1104
1120
1136

1089
1105
.1121
1137

1090
1106
1122
1138

1091
1107
1123
1139

1092
1108
1124
1140

1093
1109
1125
1141

1094
1110
1126
1142

1095
1111
1127
1143

1096
1112
1128
1144

1097
1113
1129
1145

1098
1114
1130
1146

1099
1115
1131
1147

1100
1116
1132
1148

1101
1117
1133
1149

1102
1118
1134
1150

1103
1119
1135
1151

48x
49x
4Ax
4Bx

1152
1168
1184
1200

1153
1169
1185
1201

1154
1110
1186
1202

1155
1171
1187
1203

1156
1112
1188
1204

1157
1173
1189
1205

1158
1174
1190
1206

1159
1175
1191
1207

1160
1176
1192
1208

1161
1177
1193
1209

1162
1178
1194
1210

1163
1179
1195
1211

1164
1180
1196
1212

1165
1181
1197
1213

1166
1182
1198
1214

1167
1183
1199
1215

4Cx
40x
4Ex
4Fx

1216
1232
1248
1264

1217
1233
1249
1265

1218
1234
1250
1266

1219
1235
1251
1267

1220
1236
1252
1268

1221
1237
1253
1269

1222
1238
1254
1270

1223
1239
1255
1271

1224
1240
1256
1272

1225
1241
1257
127.3

1226
1242
1258
1274

1227
1243
1259
1275

1228
1244
1260
1276

1229
1245
1261
1277

1230
1246
1262
1278

1231
1247
1263
1279

SOx
51x
52x
53x

1280
1296
1312
1328

1281
1297
1313
1329

1282
1298
1314
1330

1283
1299
1315
1331

1284
1300
1316
1332

1285
1301
1317
1333

1286
1302
1318
1334

1287
1303
1319
1335

1288
1304
1320
1336

1289
1305
1321
1337

1290
1306
1322
1338

1291
1307
1323
1339

1292
1308
1324
1340

1293
1309
1325
1341

1294
1310
1326
1342

1295
1311
1327
1343

54x
55x
56x
57x

1344
1360
1376
1392

1345
1361
1377
1393

1346
1362
1378
1394

1347
1363
1379
1395

1348
1364
1380
1396

1349
1365
1381
1397

1350
1366
1382
1398

1351
1367
1383
1399

1352
1368
1384
1400

1353
1369
1385
1401

1354
1370
1386
1402

1355
1371
1387
1403

1356
1372
1388
1404

1357
1373
1389
1405

1358
1374
1390
1406

1359
1375
1391
1407

58x
59x
SAx
5Bx

1408
1424
1440
1456

1409
1425
1441
1457

1410
1426
1442
1458

1411
1427
1443
1459

1412
1428
1444
1460

1413
1429
1445
1461

1414
1430
1446
1462

1415
1431
1447
1463

1416
1432
1448
1464

1417
1433
1449
1465

1418
1434
1450
1466

1419
1435
1451
1467

1420
1436
1452
1468

1421
1437
1453
1469

1422
1438
1454
1470

1423
1439
1455
1471

sex
SOx
SEx
5Fx

U72
1488
1504
1520

1473
1489
1505
1521

1474
1490
1506
1522

1475
1491
1507
1523

1476
1492
1508
1524

1477
1493
1509
1525

1478
1494
1510
1526

1479
1495
1511
1527

1480
1496
1512
1528

1481
1497
1513
1529

1482
1498
1514
1530

1483
1499
1515
1531

1484
1500
1516
1532

1485
1501
1517
1533

1486
1502
1518
1534

1487
1503
1519
1535

60x
61x
62x
63x

1536
1552
1568
1584

1537
1553
1569
1585

1538
1554
1570
1586

1539
1555
1571
1587

1540
1556
1572
1588

1541
1557
1573
1589

1542
1558
1574
1590

1543
1559
1575
1591

1544
1560
1576
1592

1545
1561
1577
1593

1546
1562
1578
1594

1547
1563
1579
1595

1548
1564
1580
1596

1549
1565
1581
1597

1550
1566
1582
1598

1 ~~1
1567
1583
1599

64x
65x
66x
67x

1600
1616
1632
1648

1601
1617
1633
1649

1602
1618
1634
1650

1603
1619
1635
1651

1604
1620
1636
1652

1605
1621
1637
1653

1606
1622
1638
1654

1607
1623
1639
1655

1608
1624
1640
1656

1609
1625
1641
1657

1610
1626
1642
1658

1611
1627
1643
1659

1612
1628
1644
1660

1613
1629
1645
1661

1614
1630
.1646
1662

1615
1631
1647
1663

68x
69x
6Ax
6Bx

1664
1680
1696
1712

1665
1681
1697
1713

1666
1682
1698
1714

1667
1683
1699
1715

1668
1684
1700
1716

1669
1685
1701
1717

1670
1686
1702
1718

1671
1687
1703
1719

1672
1688
1704
1720

1673
1689
1705
1721

1674
1690
1706
1722

1675
1691
1707
1723

1676
1692
1708
1724

1677
1693
1709
1725

1678
1694
1710
1726

1679
1695
1711
1727

6Cx
60x
6Ex
6Fx

1728
1744
1760
1776

1729
1745
1761
1777

1730
1746
1762
1778

1731
1747
1763
1179

1732
1748
1764
1780

1733
1749
1765
1781

1734
1750
1766
1782

1735
1751
1767
1783

1736
1752
1768
1784

1737
1753
1769
1785

1738
1754
1770
1786

1739
1755
1771
1787

1740
1756
1772
1788

1741
1757
1773
1789

1742
1758
1774
1790

1743
1759
1775
1791

70x
71x
1'1x
73x

1792
1808
1824
1840

1793
1809
1825
1841

1794
1810
1826
1842

1795
1811
1827
1843

179 6
1812
1828
1844

1797
1813
1829
1845

1798
1814
1830
1846

1799
1815
1831
1847

1800
1816
1832
1848

1801
1817
1833
1849

1802
1818
1834
1850

1803
1819
1835
1851

1804
1820
1836
1852

1805
1821
1837
1853

1806
1822
1838
1854

1807
1823
1839
1b55

74x
75x
76x
77x

1856
1872
1888
1904

1857
1873
1889
1905

1858
1874
1890
1906

1859
1875
1891
1907

1860
1876
1892
1908

1861
1877
1893
1909

1862
1878
1894
1910

1863
1879
1895
1911

1864
1880
1896
1912

1865
1881
1897
1913

1866
1882
1898
1914

1867
1883
1899
1915

1868
1884
1900
1916

1869
1885
1901
1917

1870
18tl6
1902
1918

1871
1887
1903 )
1919

78x
79x
7Ax
7Bx

1920
1936
1952
1968

1921
1937
1953
1969

1922
1938
1954
1970

1923
1939
1955
1971

1924
1940
1956
1972

1925
1941
1957
1973

1926
1942
1958
1974

1927
1943
1959
1975

1928
1944
1960
1976

1929
1945
1961
1977

1930
1946
1962
1978

1931
1947
1963
1979

1932
1948
1964
1980

1933
1949
1965
1981

1934
1950
1966
1982

1935
1951
1967
1983

7Cx
70x
7Ex
7Fx

1984
2000
2016
2032

1985
2001
2017
2033

1986
2002
2018
2034

1987
2003
2019
2035

1988
2004
2020
2036

1989
2005
2021
2037

1990
2006
2022
2038

1991
2007
2023
2039

1992
2008
2024
2040

1993
2009
2025
2041

1994
2010
2026
2042

1995
2011
2027
2043

1996
2012
2028
2044

1997
2013
2029
2045

1998
2014
2030
2046

1999
2015
2031
2047

x =

Appendix II: Hexadecimal-Decimal Conversion Table

385

x =

\)

1

2

3

4

5

6

7

8

9

A

B

C

D

E

F

80x
81x
82x
83x

2048
2064
2080
2096

2049
2065
2081
2097

2050
2066
2082
2098

2051
2067
2083
2099

2052
2068
2084
2100

2053
2069
2085
2101

2054
2070
2086
2102

2055
2071
2087
2103

2056
2072
2088
2104

2057
2073
2089
2105

2058
2074
2090
2106

2059
2075
2091
2107

2060
2076
2092
2108

2061
2077
2093
2109

2062
2078
2094
2110

2063
2079
2095
2111

84x
85x
86x
87x

2112
2128
2144
2160

2113
2129
2145
2161

2114
2130
2146
2162

2115
2131
2147
2163

2116
2132
2148
2164

2117
2133
2149
2165

2118
2134
2150
2166

2119
2135
2151
2167

2120
2136
2152
2168

2121
2137
2153
2169

2122
2138
2154
2170

2123
2139
2155
2171

2124
2140
2156
2172

2125
2141
2157
2173

2126
2142
2158
2174

2127
2143
2159
2175

88x
89x
8Ax
8Bx

2176
2192
2208
2224

2177
2193
2209
2225

2178
2194
2210
2226

2179
2195
2211
2227

2180
2196
2212
2228

2181
2197
2213
2229

2182
2198
2214
2230

2183
2199
2215
2231

2184
2200
2216
2232

2185
2201
2217
2233

2186
2202
2218
2234

2187
2203
2219
2235

2188
2204
2220
2236

2189
2205
2221
2237

2190
2206
2222
2238

2191
2207
2223
2239

8Cx
8Dx
8Ex
8Fx

2240
2256
2272
2288

2241
2257
2273
2289

2242
2258
2274
2290

2243
2259
2275
2291

2244
2260
2276
2292

2245
2261
2277
2293

2246
2262
2278
2294

2247
2263
2279
2295

2248
2264
2280
2296

2249
2265
2281
2297

2250
2266
2282
2298

2251
2267
2283
2299

2252
2268
2284
2300

2253
2269
2285
2301

2254
2270
2286
2302

2255
2271
2287
2303

90x
91x
92x
93x

2304
2320
2336
2352

2305
2321
2337
2353

2306
2322
2338
2354

2307
2323
2339
2355

2308
2324
2340
2356

2309
2325
2341
2357

2310
2326
2342
2358

2311
2327
2343
2359

2312
2328
2344
2360

2313
2329
2345
2361

2314
2330
2346
2362

2315
2331
2347
2363

2316
2332
2348
2364

2317
2333
2349
2365

2318
2334
2350
2366

2319
2335
2351
2367

94x
95x
96x
97x

2368
2384
2400
2416

2369
2385
2401
2417

2370
2386
2402
2418

2371
2387
2403
2419

2372
2388
2404
2420

2373
2389
2405
2421

2374
2390
2406
2422

2375
2391
2407
2423

2376
2392
2408
2424

2377
2393
2409
2425

2378
2394
2410
2426

2379
2395
2411
2427

2380
2396
2412
2428

2381
2397
2413
2429

2382
2398
2414
2430

2383
2399
2415
2431

98x
99x
9Ax
9Bx

2432
2448
2464
2480

2433
2449
2465
2481

2434
2450
2466
2482

2435
2451
2467
2483

2436
2452
2468
2484

2437
2453
2469
2485

2438
2454
2470
2486

2439
2455
2471
2487

2440
2456
2472
2488

2441
2457
2473
2489

2442
2458
2474
2490

2443
2459
2475
2491

2444
2460
2476
2492

2445
2461
2477
2493

2446
2462
2478
2494

2447
2463
2479
2495

9Cx
9Dx
9Ex
9Fx

2496
2512
2528
2544

2497
2513
2529
2545

2498
2514
2530
2546

2499
2515
2531
2547

2500
2516
2532
2548

2501
2517
2533
2549

2502
2518
2534
2550

2503
2519
2535
2551

2504
2520
2536
2552

2505
2521
2537
2553

2506
2522
2538
2554

2507
2523
2539
2555

2508
2524
2540
2556

2509
2525
2541
2557

2510
2526
2542
2558

2511
2527
2543
2559

AOx
Alx
A2x
A3x

2560
2576
2592
2608

2561
2577
2593
2609

2562
2578
2594
2610

2563
2579
2595
2611

2564
2580
2596
2612

2565
2581
2597
2613

2566
2582
2598
2614

2567
2583
2599
2615

2568
2584
2600
2616

2569
2585
2601
2617

2570
2586
2602
2618

2571
2587
2603
2619

2572
2588
2604
2620

2573
2589
2605
2621

2574
2590
2606
2622

2575
2591
2607
2b23

A4x
A5x
A6x
A7x

2624
2640
2656
2672

2625
2641
2657
2673

2626
2642
2658
2674

2627
2643
2659
2675

2628
2644
2660
2676

2629
2645
2661
2677

2630
2646
2662
2678

2631
2647
2663
2679

2632
2648
2664
2680

2633
2649
2665
2681

2634
2650
2666
2682

2635
2651
2667
2683

2636
2652
2668
2684

2637
2653
2669
2685

2638
2654
2670
2686

2b39
2655
2b71
2687

A8x
A9x
AAx
ABx

2688
2704
2720
2736

2689
2705
2721
2737

2690
2706
2722
2738

2691
2707
2723
2739

2692
2708
2724
2740

2693
2709
2725
2741

2694
2710
2726
2742

2695
2711
2727
2743

2696
2712
2728
2744

2697
2713
2729
2745

2698
2714
2730
2746

2699
2715
2731
2747

2700
2716
2732
2748

2701
2717
2733
2749

2702
2718
2734
2750

2703
2719
2735
2751

ACx
ADx
AEx
AFx

2752
2768
2784
2800

2753
2769
2785
2801

2754
2770
2786
2802

2755
2771
2787
2803

2756
2772
2788
2804

2757
2773
2789
"2805

2758
2714
2790
2806

2759
2775
2791
2807

2760
2776
2792
2808

2761
2777
2793
2809

2762
2778
2794
2810

2763
2719
2795
2811

276!'
2780
2796
2812

"1765
2781
. 2797
2813

2766
2782
2798
2814

2767
2783
2799
2815

BOx
Blx
B2x
B3x

2816
2832
2848
2864

281 7
2833
2849
2865

2818
2834
2850
2866

2819
2835
2851
2867

2820
2836
2852
2868

2821
2837
2853
2869

2822
2838
2854
2870

2823
2839
2855
2871

2824
2840
2856
2872

2825
2841
2857
2873

2826
2842
2858
2874

2827
2843
2859
2875

2828
2844
2860
2876

2829
2845
2861
2877

2830
2846
2862
2878

2831
2847
2863
2679

B4x
B5x
B6x
B7x

2880
2896
2912
2928

2881
2897
2913
2929

2882
2898
2914
2930

2883
2899
2915
2931

2884
2900
2916
2932

2885
2901
2917
2933

2886
2902
2918
2934

2887
2903
2919
2935

2888
2904
2920
2936

2889
2905
2921
2937

2890
2906
2922
2938

2891
2907
2923
2939

2892
2908
2924
2940

2893
2909
2925
2941

2894
2910
2926
2942

2895
2911
2927
2943

B8x
B9x
BAx
BBx

2944
2960
2916
2992

2945
2961
2977
2993

2946
2962
2978
2994

2947
2963
2979
2995

2948
2964
2980
2996

2949
2965
2981
2997

2950
2966
2982
2998

2951
2967
2983
2999

2952
2968
2984
3000

2953
2969
2985
3001

2954
2970
2986
3002

2955
2971
2987
3003

2956
2972
2988
3004

2957
2973
2989
3005

2958
29711
2990
3006

2959
2975
2991
3007

BCx
BDx
BEx
BFx

3008
3024
3040
3056

3009
3025
3041
3057

3010
3026
3042
3058

3011
3027
3043
3059

3012
3028
3044
3060

3013
3029
3045
3061

3014
3030
3046
3062

3015
3031
3047
3063

3016
3032
3048
3064

3017
3033
3049
3065

3018
3034
3050
3066

3019
3035
3051
3067

3020
3036
3052
3068

3021
3037
3053
3069

302~"

3038
3054
3070

3023
3039
3055
3071

386

0

1

2

3

4

5

6

7

8

9

A

B

C

0

E

F

COx
Clx
C2x
C3x

3072
3088
3104
3120

3073
3089
3105
3121

3074
3090
3106
3122

3075
3091
3107
3123

3076
3092
3108
3124

J017
3093
3109
3125

3078
3094
3110
3126

3079
3095
3111
3127

3080
3096
3112
3128

3081
3097
3113
3129

3082
3098
3114
3130

3083
3099
3115
3131

3084
3100
3116
3132

.)\10:>

3101
3117
3133

3086
3102
3118
3134

3087
3103
3119
3135

C4x
C5x
C6x
C7x

3136
'1152
3168
3184

3137
3153
3169
3185

3138
3154
3170
3186

3139
3155
3171
3187

3140
3156
3172
3188

3141
3157
3173
3189

3142
3158
3174
3190

3143
3159
3175
3191

3144
3160
3176
3192

3145
3161
3177
3193

3146
3162
3178
3194

3147
3163
3179
3195

3148
3164
3180
3196

3149
3165
3181
3197

3150
3166
3182
3198

3151
3167
3183
3199

C8x
C9x
CAx
CBx

3200
3216
3232
3248

3201
3217
3233
3249

3202
3218
3234
3250

3203
3219
3235
3251

3204
3220
3236
3252

3205
3221
3237
3253

3206
3222
3238
3254

3207
3223
3239
3255

3208
3224
3240
3256

3209
3225
3241
3257

3210
3226
3242
3258

3211
3227
3243
3259

3212
3228
3244
3260

3213
3229
3245
3261

3214
3230
3246
3262

3215
3231
3247
3263

CCx
COx
CEx
CFx

3264
3280
3296
3312

3265
3281
3297
3313

3266
3282
3298
3314

3267
3283
3299
3315

3268
3284
3300
3316

3269
3285
3301
3317

3270
3286
3302
3318

3271
3287
3303
3319

3272
3288
33{)4
3320

3273
3289
3305
3321

3274
3290
3306
3322

3275
3291
3307
3323

3276
3292
3308
3324

3271
3293
3309
3325

3278
3294
3310
3326

3279
3295
3311
3327

OOx
01x
02x
03x

3328
3344
3360
3376

3329
3345
3361
3371

3330
3346
3362
3378

3331
3347
3363
3379

3332
3348
3364
3380

3333
3349
3365
3381

3334
3350
3366
3382

3335
3351
3367
3383

3336
3352
3368
3384

3337
3353
3369
3385

3338
3354
3370
3386

3339
3355
3371
3387

3340
3356
3372
3388

3341
3357
3373
3389

3342
3358
3374
3390

3343
3359
3375
3391

04x
05x
06x
07x

3392
3408
3424
3440

3393
3409
3425
3441

3394
3410
3426
3442

3395
3411
3427
3443

3396
3412
3428
3444

3397
3413
3429
3445

3398
3414
3430
3446

3399
3415
3431
3447

3400
3416
3432
3448

3401
3417
3433
3449

3402
3418
3434
3450

3403
3419
3435
3451

3404
3420
3436
3452

3405
3421
3437
3453

3406
3422
3438
3454

3407
3423
3439
3455

08x
09x
DAx
DBx

3456
3472
3488
3504

3457
3473
3489
3505

3458
3474
3490
3506

3459
3475
3491
3507

3460
3476
3492
3508

3461
3477
3493
3509

3462
3478
3494
3510

3463
3479
3495
3511

3464
3480
3496
3512

3465
3481
3497
3513

3466
3482
3498
3514

3467
3483
3499
3515

3468
3484
3500
3516

3469
3485
3501
3517

3470
3486
3502
3518

3471
3487
3503
3519

DCx
DOx
DEx
OFx

3520
3536
3552
3568

3521
3537
3553
3569

3522
3538
3554
3570

3523
3539
3555
3571

3524
3540
3556
3572

3525
3541
3557
3573

3526
3542
3558
3574

3527
3543
3559
3575

3528
3544
3560
3576

3529
3545
3561
3577

3530
3546
3562
3578

3531
3547
3563
3579

3532
3548
3564
3580

3533
3549
3565
3581

3534
3550
3566
3562

3535
3551
3567
3583

EOx
Elx
E2x
E3x

3584
3600
3616
3632

3585
3601
3617
3633

3586
3602
3618
3634

3587
3603
3619
3635

3588
3604
3620
3636

3589
3605
3621
3637

3590
3606
3622
3638

3591
3607
3623
3639

3592
3608
3624
3640

3593
3609
3625
3641

3594
3610
3626
3642

3595
3611
3627
3643

3596
3612
3628
3644

3597
3613
3629
3645

3598
3614
3630
3646

3599
3615
3631
3647

E4x
E5x
E6x
E7x

3648
3664
3680
3696

3649
3665
3681
3697

3650
3666
3682
3698

31)51
3667
3683
3699

3652
3668
3684
3700

3653
3669
3685
3701

3654
3670
3686
3702

3655
3671
3687
3703

3656
3672
3688
3704

3657
3673
3689
3705

3658
3674
3690
3706

3659
3675
3691
3707

3660
3676
3692
3708

3661
3671
3693
370Q

3662
3678
3694
1710

3663
3679
3695
3711

E8x
E9x
EAx
EBx

3712
3728
3744
3760

3713
3729
3745
3761

3714
3730
3746
3762

3715
3731
3747
3763

3716
3732
3748
3764

3717
3733
3749
3765

3718
3734
3750
3766

3719
3735
3751
3767

3720
3736
3752
3768

3721
3737
3753
3769

3722
3738
3754
3770

3723
3739
3755
3711

3724
3740
3756
3712

3725
3741
3757
3773

J7:.b
3742
3758
3774

3727
3743
3759
3775

ECx
EOx
EEx
EFx

3776
3792
3808
3824

3777
3793
3809
3825

3718
3794
3810
3826

3779
3795
3811
3827

3780
3796
3812
3828

3781
3797
3813
3829

3782
3798
3814
3830

3783
3799
3815
3831

3784
3800
3816
3832

3785
3801
3817
3833

3786
3802
3818
3834

3787
3803
3819
3835

3788
3804
3820
3836

3789
3805
3821
3837

3790
3806
3822
3838

3791
3/j07
3823
3/j39

FOx
Flx
F2x
F3x

3840
3856
3872
3888

3841
3857
3873
3889

3842
3858
3874
3890

3843
3859
3875
3891

3844
3860
3876
3892

3845
3861
3817
3893

3846
3862
3878
3894

3847
3863
3879
3895

3848
3864
3880
3896

3849
3865
3881
3897

3850
3866
3882
3898

3851
3867
3883
3899

3352
3868
3884
3900

3853
3869
3885
3901

3854
3870
3866
3902

3855
3b71
31la7
3903

F4x
F5x
F6x
F7x

3904
3920
3936
3952

3905
3921
3937
3953

3906
3922
3938
3954

3907
3923
3939
3955

3908
3924
3940
3956

3909
3925
3941
3957

3910
3926
3942
3958

3911
3'927
3943
3959

3912
3928
3944
3960

3913
3929
3945
3961

3914
3930
3946
3962

3915
3931
3947
3963

3916
3932
3948
3964

3917
3933
3949
3965

3918
3934
3950
3966

3919
3935
3951
3967

F8x
, F9x
FAx
FBx

3968
3984
4000
4016

3969
3985
4001
4017

3970
3986
4002
4018

3971
3987
4003
4019

3972
3988
4004
4020

3973
3989
4005
4021

3974
3990
4006
4022

3975
3991
4007
4023

3976
3992
4008
4024

3917
3993
4009
4025

3978
3994
4010
4026

3979
3995
4011
4027

3980
3996
4012
4028

3981
3997
4013
4029

39&2
3998
4014
4030

3983
3999
4015
4031

FCx
FOx
FEx
FFx

4032
4048
4064
4080

4033
4049
4065
4081

4034
4050
4066
4082

4035
4051
4067
4083

4036
4052
4068
4084

4037
4053
4069
4085

4038
4054
4070
4086

4039
4055
4071
4087

4040
4056
4072
4088

4041
4057
4073
4089

4042
4058
4074
4090

4043
4059
4075
4091

4044
4060
4076
4092

4045
4061
4071
4093

4046
4062
4078
4094

4047
4063
4079
4095

x =

Appendix II: Hexadecimal-Decimal Conversion Table

387

This page left blank intentionally.

Appendix III: Machine Instruction Format

BASIC MACHINE FORMAT

4
8
Operation
RI
Code

4

ASSEMBLER OPERAND
FIELD FORMAT

APPLICABLE INSTRUCTIONS

RI,R2

All RR instructions
except BCR,SPM,
and SVC

M1,R2

BCR

RI

SPM

I
(See Notes 1,6,8,
and 9)

SVC

R2

RR
4
8
Operation
MI
Code

4
R2

4
8
Operation
RI
Code

8
Operation
Code

RX

4
8
Operation
Code
Rl

!

I

4

4

12

X2

B2

D2

4

4

12

X2

B2

02

4

4

12

rn

B2

D2

4
8
Operation
Rl
Code

4

4

12

B2

D2

4
8
Operation
Rl
Code

4

4

12

M3

B2

02

4
8
Operation
M1
Code

I

8

4
8
Operation
Rl
Code

RI,D2(X2,B2)
RI ,D~ (, B2)
Rl,S2(X2}
Rl,S2

All RX instructions
except BC

Ml,D2(X2,B2)
Ml,02 (,B2)
Ml,S2(X2)
Ml,S2
(See Notes 1,6,8,
and 9)

BC

Rl,R3,D2(B2)
Rl ,R3', S2

BXH,BXLE,CDS,CS,LM,SIGP,
STM,LCTL,STCTL

RI,02(B2)
Rl,S2

All shift instructions

Rl,M3,02(B2)
RI,M3,S2
(See Notes 1-3,7,
8,and 9)

ICM, STCM, CLM

RS

Appendix III: Machine Instruction Format

389

BASIC MACaINE FORMAT

8

8
Operation
Code

I~

ASSEMBLER OPERAND
FIELD FORMAT

APPLICABLE INSTRUCTIONS

Dl(Bl} ,12
81,12

All SI instructions except
those listed for the other
SI format.

12

4

Bl

Dl

4

12

Bl

Dl

SI
8
Operation
Code

Dl(Bl)
Sl
(See Notes 2,3,6,

LPSW,SSM,TIO,TCH,TS

7,8 and 10}

S

16
Two-byte
Operation
Code

4

12

Bl

Dl

SCK,STCK,STIDP,SIOF,STIDC,
SIO,HIO,HDV
SCKC,STCKC,SPT,STPT,PTLB,
RRB

Dl(Bl)
Sl
(See Notes 2,
3, and 7}

8
4 4 4
Operation
Ll L2 Bl
Code

12

4

12

Dl B2

D2

CLRIO,IPK,SPKA,SPX,STAP,
STPX

Dl(Ll,Bl},D2(L2,B2)
Sl(Ll) ,S2(L2)

PACK,UNPK,MVO,AP,
CP,DP,MP,SP,ZAP

Dl (L, Bl) ,D2 (B2)

NC,OC,XC,CLC,MVC,MVN,
MVZ,TR,TRT,ED,EDMK

SS
8
Operation
Code

12

8

4

L

Bl Dl

4 4 4 12
8
Operation
Code
Ll 13 Bl Dl

12

4

Sl-(L) ,S2

B2 D2

4

12

B2 D2

Dl(Ll,Bl),D2(B2),I3
Sl(Ll),S2,I3
Sl,S2,I3
(See Notes 2,3,5,6,
7 and 10)

SRP

Notes for Appendix III:
1.

Rl, R2, and R3 are absolute expressions that specify general or floating-point registers. The general register numbers are 0 through 15; floating-point register numbers are 0, 2, 4, and 6.

2.

Dl and D2 are absolute expressions that specify displacements.
may be specifi~d.

3.

Bl and B2 are absolute expressions that specify base registers.
o - 15.

4.

X2 is an absolute expression that specifies an index register.
o - 15.

5.

L, Ll, and L2 are absolute expressions that specify field lengths. An L expression
can specify a value of 1 - 256. Ll and L2 expressions can specify a value of 1 - 16.
In all cases, the assembled value will be one less than the specified value.

6.

I, 12, and 13 are absolute expressions that provide immediate data.
and 12 may be 0 - 255. The value of 13 may be 0 - 9.

7.

Sl and S2 are absolute or relocatable expressions that specify an address.

8.

RRi RS, and SI instruction fields that are blank under BASIC MACHINE FORMAT are not
examined during instruction execution. The fields are not written in the symbolic
operand, but are assembled as binary zeros.

9.

Ml and M3 speoify a 4-bit mask.

A value of 0 - 4095
Register numbers are
Register numbers are

The value of I

10. In IBM System/370 the SIO, HIO, HDV and SIOF operation codes occupy one byte and the
low order bit of the second byte. In all other systems the HIO and SIO operation
codes occupy only the first byte of the instruction.

390

Page of GC33-40 10-5
As Updated 28 Dec 1981
By TNL GN20-9372

Appendix IV, pages 391-406, has been
removed.
The following manuals are
the definitive publications for
machine instructions:
IBM System/370 Principles of
Operation
IBM 4300 Processors Principles of
Operation for ECPS:VSE Mode

391-406

Pa~c

of GC33-40 10-5
As Updated 28 Dec 1981
By TNL GN20-9372

Appendix V: Assembler Instructions

. 012erand Entry

°12eration

Name

ACTR

A sequence symbol
or blank

A SETA expression

AGO

A sequence symbol
or blank

A sequence symbol

AlF

A sequence symbol
or blank

A logical expression enclosed
in parentheses, immediately
followed by a sequence symbol

ANOP

A sequence symbol
or blank

Not required

CCW

Any symbol or
blank

Four operands, separated by
corrunas

CNOP

Any symbol or
blank

Two absolute expressions,
separated by a comma

COM

~!!£~

OS
I Any symbol or
on Yblank
DOS Must be blank
only

Not required
Not required

COpy

Must not be present

One ordinary symbol

CSECT

Any symbol or
blank

Not required

DC

Any symbol or
blank

One or more operands, separated
by commas

DROP

A sequence symbol
or blank

One to sixteen absolute
expressions, separated by
corrunasi or blank

DS

Any symbol or
blank

One or more operands, separa ted
by commas

DSECT

Any symbol or
blank

Not required
One or more operands,
by commas

EJECT

A sequence symbol
or blank

Not required

END

A sequence symbol
or blank

A relocatable expression or
blank

ENTRY

A sequence symbol
or blank

One or more relocatable symbols,
separated by commas

Appendix V: Assembler Instructions

407

OOt=ration

Name Entry

Operand Entry

EQIJ

An ordinary symbol
or a variable
symbol

One to three operands,
~. ~I??~a1:.e9 . . 9Y . . C()IT1IT1 as

;DOS

EX'lRN

A sequence symbol
or blank

One or more relocatable symbols,
separated by commas

GBLA

frust not be present One or more variable symbols
that are to be used as SE'l'
symbols, separated by commas 2

GBl,B

~ust

not be present One or more variable symbols
tha tare to be used as SIT
symbols, separated by corrmas 2

GBLC

~ust

not be present One or more variable s~nbols
that are to be used as SET
symbols, separated by commas 2

IC'l'L

Must not be present One to three decimal values,
separateo by commas

ISEQ

~':ust

not be present Two decimal values, separated
by commas

LCLA

r~ust

not be present One or more variable symbols
that are to be used as SET
symb~ls, separated by commas 2

lCLB

~ust

not be present One or more variable symbols
that are to be used as SET
symbols, separated by corrmas 2

LCLC

~ust

not be present One or more variable symbols
that are to be used as SE'I
symbols, separated by commas 2

LTORG

Any symbol or
blank

MACR01

Must not be present Not required

pnlY0:tle •. ()per~rix·ll~f1::.... >1

.ii····• .··. • I< .•·..i.

1

i.
__-__ +---______ +---------+--------+---------~

f------+---------+--------+--------+-Qr-g~~gI
I v
I 4
,word
I 3,4
I relocatable
I
,
I
I
I symbol

I multi-

I pIe

I

I

I
I

I left

I

,

I

I

I
I
I

~------+---------+--------+--------+~~------------+---------+---------+--------+---------~
I 2
I half
I 2 only , 'one absolute I multi- I
I
I
I

I S
I

I word
I

I
I
I
I

I

I

I

I
I

I
I
I
I

I Y
I

I

I word

I

I
,
I

,

I

I

I

,

I or relocatab-I pIe
I Ie expression I
I or two absol-I
I ute express- I
I ions:
I
I exp (exp)
I
I expression

I
I

I

I

I
I
I
I

I
I
I
I

I

I

I

I
I
,
I
I

I

I
I

f------+---------+--------+--------+--------------+---------+---------+--------+---------~
I 2
I half
1.1 to
I any
I multi- I
I
I left
I
2

(2)

I pIe

I

.------~---------~--------~--------~--------------~---------~---------~--------~---------~

I

In a DS assembler instruction C and X type constants can have length specification
to 65535.
I (2) Bit length specification permitted with absolute expressions only. Relocatable AI
type constants, 3 or 4 bytes only; relocatable Y-type constants, 2 bytes only.
I (3) Errors will be flagged if significant bits are truncated or if the value specified
I
cannot be contained in the implicit length of the constant.
(1)

I

I
I

I

I
I
I

L____________________________________________________________________ J
Appendix VI: Summary of Constants

411

This page left blank intentionally.

Appendix VII: Summary of Macro Facility

The four charts in this Appendix sununarize the macro facility described in Part IV of
this publication.
Chart 1 indicates which macro language elements can be used in the name and operand
entries of each statement.
Chart 2 is a sununary of the expressions that can be used in macro instruction statements.
Chart 3 is a sununary of the attributes that may be used in each expression.
Chart 4 is a sununary of the variable symbols that can be used in each expression.

Appendix VII: Sununary of Macro Facility

413

,j:::o.

Variable Symbols

I--'
,j:::o.

Globol SET Symbols

Statement

Symbolic
Parameter

SETA

SETB

SETC

SETB

SETA

Attributes

System Variable Symbols

Local SET Symbols

SETC

&SYSNDX

&SYSECT

&SYSLIST

&SYSPARM

&SYSDATE &SYSTIME

Type

Length

Scaling

Integer

Count

Number

Sequence
Symbol

MACRO
Prototype
Statement

Name
Operond

GBLA

Operand

GBLB

Operand
Operand

GBLC
LCLA

Operand
Operand

LCLB

Operond

LCLC
Model
Statement

SETA

Name
Operation
Operand

Name
Operation
Operand

Operan~

Name
Operand

Operand 3

Operand 9

Operand2

Operanl

Operani

Operand 4 Operand 6

Operani

Name
Operand

Operand

Operand

Operand

Operand 6

Operand 6

Operand 4 Operand 6

Name
Operation
Operand

Nome
Operand

Operand 3

Operand9

Operond

Operand 6

Name
Operand

Operone/>

•
S
Operand

Operand

OperoncP

Name
Operand

Operand 6

Operand

Operond 7

OperandS

Operand

Operand

Operand 6

Operand 6

Operand

Operand 6

Operand 6

Name

SETC

Operation
Operand

Operation
Operand

7

Name

Operand

Nome

Name

Name
Name
Operation Operation
Operand Operand

Nome
Nome
Operation Operation
Operand
Operand

Operane/>

SETB

AIF

Nome
Nome
Operation Operation
Operand
Operand

Operand

Operand

Operand 4

Operand

Operand

Operand

Operand

Operand

Operand

Operand 5

Operand 5

Operand 5

Operand 5

Operand 5

Operand 5

Operond 5

Operand 5

Operand 5

Operand 5

Operand
Operand 4

Operani

Operand

Name

AGO

ACTR

Operand
Operand2

Operand

Operand 3

Operand 2

Operand

Operand 3

Operon~

Operan~

Operond

Operond

Operani

Operand

Operand

Operand

Operand

Operand

Operand

Name
Operand

Nome
Operand

Nome
Operand

Nome
Operand

Name

Operand

Name
Operand

Name
Operand

Name

Name

Name

Name

Nome

Operand

Operand

Operand

Operand

Operond

Nome
Operation
Operand

Nome
Operation
Operand

Nome
Operation
Operand

Nome

Nome

Operation Operation
Operand
Operand

Name
Operation
Operond

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Outer
Mocro
Inner

Name

Macro

Operond

Stat~ment

Operand

Operand

Name
Name

MEND

2.
3.
4.
5.

Variable symbols in macro-instructions are replaced by their values before processing.
Only if value is self-defining term.
Converted to arithmetic +1 or +0.
Only in character relations.
Only in arithmetic relations.

6.

Only in arithmetic or character relations.

7.
S.
9.

Converted to unsigned number.
Converted to character 1 or o.
Only if one to ten decimal diaits~~~;;~h;~1.14fi'lli.J.M7J..,§S
~fr~(}(iQ' 000 oOo'''n~ .....•.

1.

Operand

Nome

MEXIT

Assembler
Language

Operond

Nome

ANOP

MNOTE

Name
Operand

Name
Operand

Name

Operand

Name
Operand

Nome

Nome
Operand

Operand

Operand

Nome
Operand

Operand

Operand

Name

Nome

Page of GC33-40tO-O
Revised September 29,1972
B}' TNT. GN33-8148

Chart 2.

Expression

Conditional Assembly Expressions

Arithmetic Expressions

Can contain • Self-defining terms
• Length, scaling,
integer, count, and
number attributes

Character Expressions

Logical Expressions

• Any combination of
characters enclosed
in apostrophes

• A 0 or a

1

• SETB symbols

• SETA and SETB
symbols 1

• Any variable symbol
enclosed in
apostrophes

• SETC symbols whose.
values are a decimal
self-defining term~

• A concatenation of
• Character
variable symbols and
relations 2
other characters
O$orlly
enclosed in
• Arithmetic
apostrophes
value

• Arithmetic
relations 1

• &SYSPARM if its
value is a decimal
self-defining term
• Symbolic parameters
if the corresponding
operand is a decimal
self-defining term
•

• A type attribute
reference

&SYSLIST~) if the
corresponding
operand is a decimal
self-defining term

• &SYSLIST ~,m) if the
corresponding operand
is a decimal selfdefining term
• &SYSNDX

1

Values must be:
Q~jfrom~Othrough

2,147,483,647

DOS from 0 through 99,999,999
2

A character relation consists of two character expressions
related by the operator GT, LT, EQ, NE, GE, or LE. Type
attribute notation and Substring notation may also be
used in character relations.
The maximum size of the character
expressions that can be compared is 255 characters. If the two
character expressions are of unequal size, the the smaller one
will always compare less than the larger.

Appendix VII: Summery of Macro Facility

415

Page of GC33-4010-0
Revised September 29, 1972
By T!'-;L CN33-8148

Expression

Arithmetic Expressions

Character Expressions

Logical Expressions

Operations
are

+, - (unary and binary), *, and /;
parentheses permitted

Concatenation, with a
period (.)

AND, OR, and NOT
parentheses permitted

Range
of values

-2 31 to +2 31 _1

o through 255
characters

o

May be
used in

• SETA operands

• SETC operands

• SETB operands

• Arithmetic relations

• Character relations 2

• AIF operands

(false) or

1 (true)

• Subscripted SET
symbols
• &SYSLIST· subscript (s)
• Substring notation
• Sublist notation

1

2

416

An arithmetic relation consists of two ~rithmetic expressions
related by the operators GI, LT, EQ, NE, GE, or LE.
A character relation consists of two character expressions
related by the operator GT, LT, EQ, NE, GE, or LE. Type
attribute notation and Substring notation may also be
used in character relations. The maximum size of the character
expressions that can be compared is 255 characters. If the two
character expressions are of unequal size, the the smaller one
will always compare less than the larger.

Chart 3.
Attribute
Type

Attributes
Notation
TI

Can be used with:

Can be used only if
type attribute is:

Ordinary Symbols defined in open code;
symbolic parameters
insije macro definitions; &SYSLIST(m),

~ay

always be used)

Can be used in
1. SETC operand
fields
2. Character
relations

pS·'onlY,«~·~"§,~~~fjJr~r~SYSTnIE';l
&SYSPARM"&SYSDATE,
&SYSECT, &SYSNDX
Length

LI

Ordinary Symbols defined in open code;
symbolic parameters
inside macro definitions; &SYSLIST~),
and &SYSLIST(m,n) inside macro definitions

Any letter except
M,N,O,T and U

Arithmetic
expressions

Scaling

S'

Ordinary Symbols defined in open code;
symbolic parameters
insije macro definitions; &SYSLIST(m),
and &SYSLIST(m,n) inside macro definitions

H,F,G,D,E,L,K,P,
and Z

Arithmetic
expressions

Integer

II

Ordinary Symbols defined in ~pen code;
symbolic parameters
insije macro definitions; &SYSLIST(m),
and &SYSLIST(m,n) inside macro definitions

H,F,G,D,E,L,K,P,
and Z

Arithmetic
expressions

Count

K'

Symbolic parameters,
&SYSL 1ST (m) and
&SYSLIST(m,n) inside
macro definitions

Any letter

Arithmetic
expressions

Any letter

Arithmetic
expressions

~~::~§lyC~ET"'iiymt)~1''$TTar~7r7~?''7"'';

" , ;

sy~temva.ri(lble

$ymbols
Number

N'

";

Symbolic parameters,
&SYSLIST and
&SYSLIST(m) inside
macro definitions

NOTE: There are definite restrictions in the use of these attributes (see L1B) •

Appendix VII: Summary of Macro Facility

417

Chart 4. Variable Symbols (Part 1 of 2)
Variable
Symbol

Declared by:

Symbolic 1
parameter

Prototype
statement

Initialized,
or set to:

Value changed

May be used in:

by,:

Corresponding
(Constant
macro instruc- throughout
tion operand
definition)

• Arithmetic
expressions
if operand
is decimal
.self-defining term
• Character
expressions

LCLA or GBLA
instruction

SETA

o

SE'l'A
instructi:::>n

• Arithmetic
expressions
• Character
expressions

SETB

LCLB or GBLB
instruction

o

SETB
instructi:::>n

• Arithmetic
expressions
• Character
expressions
• Logical
express ions

LCLC or GBLC
instruction

SETC

String of
length 0
(null)

SETC
in structi:::> Ii

• Arithmetic
expressions
if value is
decimal selfdefining term
• Character
expressions

&SYSNDX1

The assembler

Macro
instruction·
index

(Constant
throughout
defini tion;
unique for
each macro
instruct. ion)

• Arithmetic
expressions

(Constant
throughout
definition;
set by CSECT,
DSECT, START,
and COM)

• Character
expressions

&SYSECT1

The assembler

Control
section in
which macro
instruct ion
appears

&SYSLIST1

The assembler

Not applicable Not applicable

&SYSLIST

The assembler

Corresponding
(Constant
macro instruc- throughout
tion operand
definition)

(n)

'I

&SYSLIST
(n, m)

1

• Character
expressions

• N'&SYSLIST in
ari thmetic
expressions
It

Arithmetic
expressions
if operand
is decimal
self-defining
term

• Character
expressions
1Can be used only in macro definitions.
418

Chart 4. Variable Symbols cont. (Part 2 of 2)
lVarIable
Declared by:
Initializ ed,
Value changed
Symbol
or set to:
by:
&SYSPARM

PAR!-1 field

User defined
or null

Constant
throughout
assembly

May be used in:
• Arithmetic
expression
if value is
decimal selfdefining term
• Character
expression

&SYSTIME

The assembler

System time

Constant
throughout
assembly

• Character
expression

&SYSDATE

The assembler

System date

Constant
throughout
assembly

• Character
expression

1Can be used only in macro definitions.

Appendix VII: Summary of Hacro Facility

419

This page left blank intentionally.

Glossary

This glossary has three Rain types ef definitions that
apply:
•

To the assembler language in particular (usually
distinguished by reference to the words "assemtler",
"asseml:ly n, etc.)

•

To programming in general

•

To data processing as a whole

If you do not understand the meaning of a data processing
term used in any of the definitions below, refer to the IEM
Data Processing Glossary, Order No. GC20-1699.
IBM is grateful to the American National Standards Institute
(ANSI) for permission to reprint its definitions from the
American National Standard Vocabulary for Information
precessing, which was prepared by Subcommittee X3R5 on
Terminology and Glossary of Arrerican National Standards
Commi ttee X3.
ANSI definitions are preceded by an asterisk (*).

Glossary

421

*absolute address: A pattern of characters
that identifies a unique storage location
without further modification.
2.
acsolute expression: An asserrbly-ti~e
expression whose value is not affected by
program relocation. An absolute expression
can represent an absolute address.
acsglute term: A term whose value is not
affected cy relocation.
*address:
1. An identification, as re~resented by a
name, label, or number, for a register,
location in storage, or any ether data
source or destination such as the
location of a station in a
communication network.
2. Loosely, any part of an instruction
that specifies the locaticn of an
operand for the instructicn. Syncnymous
with address reference.
3. See acsolute address, base address,
explicit address, implicit address,
symbolic address.
address constant: A value, or an expression
representing.a value, used in the
calculation of storage addresses.
address reference: Same as address

(2).

alignment: The positioning of the beginning
of a machine instruction, data constant, or
area on a proper boundary in virtual
storage.
alphabetic character: In assembler
programming, the letters A through Z and $,
#;,

@.

*alphameric: Same as alphanumeric.
*alphanumeric: pertaining to a character set
that contains letters, digits, and usually,
other characters, such as punctuation
marks. Synonymous with alphameric.
*AND: A logic operator having the property
that if P is a statement, Q is a statement,
R is a statement, ••• , then the AND of P, Q,
R, ••• is true if all statements are true,
false if any state~ent is false.
arithmetic expression: A conditicnal
assembly expression that is a combination
of arithmetic terms, arithmetic e~erators,
and paired parentheses.
arithmetic operator:
1. In assembler programming, an c~erator
that can be used in an absolute or
relocatacle expression, cr in an
arithmetic expression to indicate the

422

actions to be performed on the ter~s in
the expression. the arithmetic
operators allowed are: +, -, *, I.
See binary operator, unary operator.

arithmetic relation: Two arithmetic
~pressions separated by a relational
operator.
*arithmetic shift:
1. A shift that does not affect the sign
position.
2. A shift that is equivalent to the
multiplication of a number cy a
positive or negative integral power of
the radi x . '
, .
arithmetic term: A term that can be used
only in-an-arithmeitc expression.
array: In assembler ~rogramming, a series
of one or more values represented by a SET
symbol.
*assemble: To prepare a machine language
program-from a symbolic language program by
substituting absolute operation codes for
symbolic operation codes and absolute or
relocatable addresses for symbolic
addresses.
*assembler: A computer program that
assembles.
assembler instruction:
1. An assembler language statement that
causes the assembler to perform a
specific operation. Unlike the machine
instructions, the assembler
instructions are not translated into
machine language.
2. See also conditional assembly
instruction, macro processing
instruction.
assembler language: A source language that
includes symbolic machine language
statements in which there is a one-to-one
correspondence with the instruction formats
and data formats of the computer. The
assembler language also includes statements
that represent assembler instructions and
macro instructions.
assem'£1Y-!:.im~: The time at which the
assembler translates the symbolic machine
language statements into their object code
form ~achine instructions). The assemtler
also processes the assembler instructions
at this time, with the exception of the
conditional assembly and macro processing
instructions, which it processes at
pre-~ssemblY time.

attribute: A characteristic of the data
defined in a source module. The assembler
assigns the value of an attribute to the
symbol or macro instruction operand that
represents the data. Synonymous with data
attril:ute.

*branch: Loosely, a conditional jump.
buffe!: An area of storage that is
temporarily reserved for use in performing
an input/output operation, and into which
data is read or from which data is written.
*bug: A mistake or malfunction.

*base:

~A number that is multiplied by itself

2.

as many times as indicated by an
exponent.
See f loa ti ng -poin t base.

*base address: A given address frorr which an
absolute address is derived by corrbination
with a relative address. NOTE: In
assembler programming, the relative address
is syn~nyrnous with displacement.
base register: A register that contains the
base address.
*binary: Pertaining to the number
representation system with a radix of two.

byt.e:
1. A sequence of adjacent binary digits
operated upon as a uni t and usually
shorter than a computer word.
2. The representation of a character;
eight binary digits (bits) in
System/370.

call;
*1. To transfer control to a specified
closed subroutine.
2. See also macro call.
* character:

~~-Ietter, digit, or other symbol that

*binary digit: In binary notation, either of
the characters, 0 or 1.
binary operator: An arithmetic operator
having two terms. The binary operators
that can be used in absolute or relocatable
expressions and arithmetic ex~ressions are:
addition (+), subtraction (-),
multiplication (*) ~ and division (~.
Contrast with unary operator.
~bit:

A binary digit.

bit-length modifier: A subfield in the DC
assembler instruction that determines the
length in bits of the area into which the
defined data constant is to be assembled.
bit string: A string of binary digits in
which the position of each binary digit is
considered as an independent unit.
blank: In assembler programming, the same
as space character.
~blank

character: Same as space character.

boundary: In assembler prograrr.rring, a
location in storage that marks the
beginning of an area into which data is
assembled. For example, a fullword boundary
is a location in storage whose address is
divisible by four, The other boundaries
are: doubleword (location divisible by
eight), halfword (location divisible by
two), and ~te (location can be any
number). See also alignment.

2.

is used as part of the organization,
control, or representation of data.
character is often in the form of a
spatial arrangement of adjacent-or
connected strokes.
See blank character, character set,
special character.

A

char~£!~f~~!~ssion: A character string
enclosed by apostrophes. It can te used
only in conditional assembly. instructions.
~he enclosing apostrophes are not part of
the value represented. Contrast with quoted
string.

character relation: Two character strings
separated by a relational operator.
character set:
*1. A set of unique representations called
characters, for example, the 26 letters
of the English alphabet, 0 and 1 of the
Boolean alphabet, the set of signals in
the Morse code alphabet, the 128
characters of the ASCII alphabet.
2. In assembler programming, the
alphabetic characters A through Z and
$, #, @i the digits, 0 through 9; and
the special characters + - * / , () =
• • & and the blank character.
A string consisting
solely of characters.

*chara£ter~tri~g:

closed subroutine: A subroutine that can be
store~at one-place and can be linked to
one or more calling routines. Contrast with
open subroutine.

Glossary

423

*code:
-1-.--A set of unambigous rules specifying
the way in which data may be
represented, for example, the set of
correspondences in the standard code
for information interchange.
2. In data processing, to represent data
or a computer program in a symbolic
form that can be accepted by a data
processor.
3. To write a routine.
4. See condition code, object code,
operation code.
*codinq: See symbolic COding.
collating seguence: An ordering assigned to
a set of items, such that any two sets in
that assigned order can be collated.
*column: A vertical arrangerrent of
characters or other expressions.
comments statement: A statement used to
include information that may be helpful in
running a job or reviewing an out~ut
listing.
*complement:
1. A number that can be derived from a
specified number by subtracting it from
a second specified number. For
example, in radix notation, the second
specified number may be given power of
the radix or one less than the given
power of the radix. 'Ihe negative of the
number is often represented by its
complement.
2. See radix complement, twos complement.
complex relocatable expression: A
relocatable expression that contains two or
more unpaired relocatable terms or an
unpaired relocatacle term preceded by a
minus sign, after all unary operators have
been resolved. A complex relccatable
,
expression is not fully evaluated until
program fetch time.
*computer program: A series of instructions
or statements, in a form acceptable to a
computer, prepared in order to achieve a
cert ain result.
*computer word: A sequence of bits or
characters treated as a unit and capable of
being stored in one computer location.
concatenation character: The period (.)
that is used to separate character strings
that are to be joined together in
conditional assembly processing.

424

condition code: A code that reflects the
result of a previous ,input/output,
arithmetic, or logical operation. '

condit!.Q~.§.§embly: An assembler facil'i ty
for altering at pre-assembly time the
content and sequence of source statements
that are to be assembled.
conditionaLassembl~gession: An
expression that the assembler evaluates at
pre-assembly time.

conditional assembly instruction: An
assembler instruction that performs a
conditional assembly opera tion.Condi tional
assembly instructions are processed at
pre-assembly time. They, include: theLCLA,
LCLB, LCLC, GBLA, GBLB, and the GBI.C
'
declaration instructions; the SETA, SETB,
and SETC assignment instructions; the AIF,
AGO, ANOP, and ACTR branching instructions.
* condi tional jy!!!p: A jump tha t occurs if
specified criteria are met.
*£onstan~:

See figurative constant.

continuation line: A line of a sourc'e
statement into which characters are entered
when the source statement cannot ce
contained on the preceding 'line or lines.
control pro9E~!!!: A program tha't is designed
to schedule and supervise the performance
of data processing work by a computing
system.
control section: 'Ihat part of a prOgram
specified by-the programmer to be a
relocatable unit, all elements.of which are
to be loaded into adjoining virtual storage
locations. Abbreviated CSECT.
control statement: See linkage editor
control statement~
QQEY: To reproduce data in a new lOcation

or other destination, leaving the source
data unchanged, although the physical forIl1
of the result may differ from that of the
source. For example, to copy a deck of
cards onto a magnetic tape.
'
count attribute (K'): An attrirute tha't
gives the number of characters that would
be required to represent the data as a
character string.
* counter:
1:--A-device such as a register or storage
location used to represent the numcer
of occurrences of an event.
2. See instruction counter, location
counter.

CPU: Central processing unit.
CSECT: See control section.

area of storage without producing any
object code. Synonymous with dummy section.
dummy section: Same as dummy control
section.

data attribute: Same as attribute.
data constant: See figurative constant.
To detect, locate, and remove
mistakes from a routine or malfunctions
f rom a comput er •

~debug:

~decirnal:

pertaining to the nurrber
representation system with a radix of ten.

declare: To identify the variable symbols
to be used by the asserr:bler at pre-assembly
time.
A flag that separates and
organizes i terns of data.

duplication fag:!:£!:: In assembler
programming, a value that indicates the
number of times that the data specified
immediately following the duplication
factor is to be generated. For example, the
first subfield of a DC or DS instruction is
a duplication factor.
*dynam..!c storagg_allocatio!!: A storage
allocation technique in which the location
of computer programs and data is determined
by criteria applied at the moment of need.

~delimiter:

EBCDIC: Extended binary coded decimal
interchange code.

~device:

entry name: A name within a control section
that defines an entry point and can be
referred to by any control section.

See s.torage device.

~dictionary:

See external symbol dictionary.

dimension: The maximum number of values
that can be assigned to a SET symbol
representing an array.
dimensioned SET symbol: A SET sy~bol,
representing an array, followed by a
decimal number enclosed in parentheses. A
dimensioned SET, symbol must be declared in
a global (GBLA, GBLB, or GBLC) or local
(LCLA, LCLB, LCLC) declaration instruction.
displacement:
.. , • Same as relative address.
2. In assembler programming, the
difference in bytes between a symbolic
address and a specified base address.
doubleword: A contiguous sequence of bits
or characters which comprises two computer
words and is capable of being addressed as
a unit.
NOTE: In assembler programming, the
doubleword has a length of eight bytes and
can be aligned on a doubleword boundary (a
location whose address is divisible by
eight). Contrast with fullword, halfword.
tdummy: pertaining to the characteristic of
having the appearance of a specified thing
but not having the capacity to function as
such. For example, a dummy control
section.
dummy control section: A control section
that the assembler can use to format an

.. entry point: In a routine, any place to
which control can ,be passed.
entry symbol:
,. ,An ordinary symbol that represents an
entry name (identified by the ENTRY
assembler instruction) or control
section name (defined by the CSECT or
S'I'ART assembler instruction) •
2. See also external symbol.
~:

(equal to)' See relational operator.

..error message: An indication that an error
has been detected. Contrast with warning
message.
ESD: External symbol dictionary.
excess sixty-four binary notation: In
assembler prograrrming, a binary notation in
which each exponent of a floating-point
number E is represented by the binary
equivalent of E plus sixty-four.
execution time: 'Ihe time at which the
machine-instructions in object code form
are processed by the central processing
unit of the computer.
explicit address: ~n address reference
which is specified as two absolute
expressions. One expression supplies the
value of a base register and the other
supplies the value of a displacement. The
assembler assembles both values into the
object code of a machine instruction.

Gloss ary

425

exponent:
*1.
In a floating-point representation, the
numeral, of a pair of numerals
.
representing a number, that indicates
the power to which the base is raised.
2. See also excess sixty-four binary
notation.

3.

4.

5.
exponent modifier: A subfield in the
operand of the DC assembler instruction
that indicates the power of ten by which a
number is to be multiplied before being
assembled as a data constant.
expression:
1.
One or more operations represented by a
combination of terms, and paired
parentheses. '
2. See absolute expression, arithmetic
expression, complex relocatable
expression, relocatable expression.
3.
See also character expression.
extended binary coded decimal interchange
code: A set of 256 characters, each
represented by' eight bi ts.
external name: A name that can be referred
to by any control section or separately
assembled module; that is, a contrel
section name 6r an entry name in another
module.
external reference: A reference to a symbol
that is defined as an external name in
another module.
external symbol:
1. An ordinary symbol that'represents an
external reference. An external symbol
is identified i"Il a source module by the
EXTRN or WXTRN assembler instruction,
or by' the v- type address constant.
2. Loosely, a symbol contained in the
external symbol dictionary.
3.
See also entry symbol.
external symbol dictionary: Contrel
information associated with an object or
lo~d modul~ which identifies the external
symbols in the module. Abbreviated ESD.

In the ~isk Operating System (rOS), to
bring a program phase into virtual
storage from the core image library for
immediate execution.
A control program routine that
accomplishes (1), (2), or (3). See also
loader (2).
The name of the system macro
instruction (FE~CH) used to accomplish
(1), (2), 'or (3).

* fig~!:~tive~Q!!~i~!!i: A preassigned, fixed,
character string with a preassigned" fixed,
data name in a particular programming
language.
NC~E: In assembler programming, the two
types of figurative constant are:
a.
data and address, constants defined
by the DC assembler instruction.
b.
symbols assigned values by the EQU
assembler instruction.
flag:
*1. Any of various types of indicators used
for identification. For example, in
assembler programming, the paired
,apostrophes that enclose a character
expression of a quoted string.
2.
In assembler programming, to indicate
the occurrence of an error.
* floai.!!ill:..P9.!ni base: In floating-point
representation, the fixed, ,positive integer
that is the base of the power.
NOTE: In
ass~mbler programming, this base is 16.
fullword: A contiguous sequence of bits or
characters which comprises a computer word
and is capable of being addressed as a
unit.
NC~E: In assembler programming, the
fullword has a length of four bytes and can
be aligned on a fullword boundary (a
location whose address is divisible by
fou~.
Contrast with doubleword, halfword.

GE: (greater than or equal to) See
relational operator~
geneE~!;~:

EXTRN: External reference.

*1.
2.

fetch:

*~o locate and load a quantity of data

2.

426

from storage.
.
In the Operating System (OS), to obtain
load modules from auxiliary storage and
load them into virtual storage.
See
also lo~der (1).

To produce a program by selection of
subsets from a set of skeletal coding
under the control of parameters.
In assembler programming, to produce
assembler language statements from the
model statements of a macro definition
wh~n the definition is called by a
macro instruction~

global scope: Pertaining to that part of an
assembler program that includes the body of
any macro definition called from a 'source

module and the open code portion of the
source module. Contrast with local scope.
qlobal variable symbol:
1. A variable symbol that can be used to
communicate values between macro
definitions and between a maCIO
defini tion and open code.
2. Contrast'with local variable symbol.
~1:

(greater than) See relational operator.

A contiguous sequence of bits OI
characters which comprises half a comFuter
word and is capable of being addressed as a
unit.
NOTE: In assembler programming, the
halfword has a length of two bytes and can
be aligned on a halfword boundary (a
location whose address is divisible by
two). Contrast with doubleword, full word.

~halfword:

hexadecimal: pertaining to a number system
with a radix of sixteen; valid digits range
from 0 through F, where F represents the
highest units position (15).

2.

* instruction

counter: A counter that
indicates the location of the next computer
instruction to be interpreted.
instruction statement: See instruction (1).
integ~!:

attri£gte j!~l.: An attribute that
indicates the number of digit positions
occupied by the integer portion of
fixed-point, decimal, and floating-point
constants in their object code form.

* int~!:!!E1:.:

To stop a process in such a way
it can be resumed.

* I/O:

implicit address: An address IefeIence
which is specified as one absolute or
relocatableexpression. An implicit address
must be converted into its explicit
base-displacement form before it can be
assembled into the object code of a machine
instruction.
index register:
A register whose content rray be added
to or subtracted from the operand
address prior to or during the
execution of a computer instruction.
2. In assembler programming, a register
whose content is added to the cperand
or absolute address derived from a
combina tion of a base address with a
displacement.

~1.

inner macro instruction: A macro
instruction that is specified, that is,
nested inside a macro definition. Contrast
wi th outer macro instruction.
~instruction:

1.

A statement that specifies an operation
and the values or locations of its
operands.

An abbreviation for input/output.

* jQ~'£21It!:ol~ta!:~~~:

A statement in a job
that is used in identifying the job or
describing its requirements to the
operating system.

* jump:
1.

immediate data: Data specified in an 81
type machine instruction that repIesents a
value to be assembled into the object code
of the machine instruction.

See assembler instruction, conditional
assembly instruction, rrachine
instruction, macro instruction.

2.

A departure fram the normal sequence of
executing instructions in a computer.
See conditional jump.

keywc;>rd: In assen'bler progIamming, an
ordinary symbol containing up to seven
characters. A keyword is used to identify a
parameter, called a keyword parameter, in a
macro prototype statement and the
corresponding macro instruction operand.
keyword operang; An operand in a macro
instruction that assigns a value to the
corresponding keyword parameter declared in
the prototype statement of the called macro
definition. Keyword operands can be
specified in any order, because they
identify the corresponding parameter by
keyword and not by their position.
NCTE: In assembler programming, the
specification of a keyword operand has the
format: a keyword followed by an equal sign
which, in turn, is followed by the value to
be assigned to the keyword parameter.
keywo!:9_E~~~~~~~!:

A symbolic parameter in
which the symbol following the ampersand
represents a keyword.
NOTE: In assembler programming, the
declaration of keyword parameter has the
format: a keyword parameter followed by an
equal sign which, in turn, is followed by a
standard ~efault) value.

Glossary

427

label:

*~ne or more characters used to identify

2.

a statement or an item of data in a
computer program.
In assembler prograrr.ming, the entry in
the name field of an assembler language
sta tement. The three main types of name,
entry are:
a.
the ordinary symbol which
represents a label at assembly
time.
b.
the sequence symbol which
represents a label at pre-assembly
time and is used as a conditional
assembly branching destination.
c.
the variable symbol that
represents a pre-assembly time
label for conditional assembly
processing and from which ordinary
symbols can be generated to create
assembly-time labels.

* language:
1.

2.

A set of representations, conventions,
and rules used to convey infcr~ation.
See machine language, object language,
source language.

(less than or equal to)
operator.

~~:

*l~ngth:

link~g~:

In programming, coding that
connects two separately ceded routines.

linkage editor: A processing program that
prepares the output of language translators
for execution. It combines separately
produced object or load mcdules; resolves
symbolic cross references among them;
replaces, deletes, and adds control
sections, and generates overlay structures
on request; and produces executatle code (a
load module) that is ready to be fetched
into virtual storage.
linkage editor control statement: An
instruction for the linkage editor.
literal: A symbol or a quantity in a source
program that is itself data, rather than a
reference to data. Contrast with figurative
constant.
!ite!~1-E2ol: An area in storage into which
the assembler'assembles the values of the
literals specified in a source module.

* load: In programming, to enter data into
storage or working registers.

See relational

See word length.

length attribute eL'): An attribute that
gives the number of bytes to be cccupied by
the object code for the data represented,
such as machine instructions, ccnstants, or
areas.
length field: The operand entry cr subentry
in machine instructions that specifies the
number of bytes at a specific address that
are affected by the execution of the
instruction.
length modifier: A,subfield in the operand
of the DS Gr DC assembler instruction that
determines the length in bytes of the area
to be reserved or of the area intc which
the data defined is to be assembled.
*level: The degree of subOrdination in a
hierarchy.
library macro definition: A macro
definition stored in a program library.
The IBM-supplied supervisor and data
management macro. definitions (such as those
called by GET or PUT) are examples of
library macro definitions. A library macro
definition can be included at the beginning
of a source module: it then becomes a
source macro definition.

428

*

load-ffiQgule: The output of the linkage
editor; a program in a format suitable for
load.ing into virtual storage for execution.
loader:
1. Under the Operating System (OS), a
processing program that combines the
basic editing and loading functions of
the linkage editor and program fetch in
one job step. It accepts object modules
and load modules created by the linkage
.editor and generates executable code
directly in virtual storage. The loader
does not produce load modules for
program libraries.
2. Under the Disk Operating System (rOS),
a supervisor routine that retrieves
program phases from the core image
library and loads therr into virtual
storage.
local scoEe: Fertaining to that part of an
assembler program that is either the body
of any macro definition called from a
source module or the open code portion of
the source module. Contrast with global
scope.
loca! variable symbol:
1. A variable symbol that can be used to
communicate values inside a macro
definition or in the open code portion
of a source module.

2.

Contrast with global variable symbol.

-location: Any place in which data rray be
stored.
location counter: A counter whose value
indicates the address of data assembled
from a machine instructien or a ccnstant,
or the address of an area of reserved
storage, relative to the beginning of a
control section.
-logic shift: A shift that affects all
positions.
logical expression: A conditional assembly
expression that is combination of legical
terms, logical operators, and paired
parenthes es.
logical operator: In assembler programming,
an operator or pair of operators that can
be used in a logical expression tC'indicate
the action to be performed on the terms in
the expression. The logical operatcrs
allowed are: AND, OR, NOT, AND NOT, and OR
NOT.
logical relation:
1. A logical term in which two ex~ressions
are separated by a relational operator.
The relational operators allowed are:
EQ, GE, GT, LE, LT, and NE.
2. See arithmetic relation, character
relation.
,logical term: A term that can be used only
in a logical expression.
loop:
-1. A sequence of instructions that is
executed repeatedly until a terminal
condition prevails.
2. See loop counter.

*machine language: A language that is used
directly by a machine.
macro:

~:Loosely, a macro definition.

2.

See also macro definition, macro
generation, rracro instruction, macro
prototype statement.

macro~all:

Same as reacro instruction.

macro definition: A set of assembler
language statements that defines the name
of, format of, and conditions for
generating a sequence of assembler language
statements from a single source statement.

* macro

expansio!!: Same as macro genera tion.

macro generation: An operation in which the
assembler produces a sequence of assemcler
language statements by processing a macro
definition called by a macro instruction.
Macro generation takes place at
pre-assembly time. Synonymous with macro
expansion.
macro instruction:

~~n-instructIon in a source language

2.

that is equivalent to a specified
sequence of machine instructions.
In assembler programming, an assemcler
language statement that causes the
assembler to process a predefined set
of statements (called a macro
definition) • The staterrents normally
produced from the macro definition
replace the macro instruction in the
source program. Synonymous with macro
call.

~f.Q_inmuct!2!!~~rand:

loop counter: In assembler pregrarrrring, a
counter to prevent excessive leoping during
conditional assembly processing.

An operand that
supplies a value to be assigned to the
corresponding symbolic parameter of the
macro definition called by the macro
instruction. This value is passed into the
macro definition to be used·' in its
process ing.

LT:

macro librafY: See program library.

(less than) See relational operater.

machine code: An operation code that a
machine is designed to recognize.
machine instruction:
1. An instruction that a machine can
recogni ze and execute.
2.
In assembler programming, (locsel~ the
symbolic machine language statements
which the assembler translates into
machine language instructions.

macro E~~!!!9 instructien: An assembler
instruction that is used inside macro
definitions and processed at pre-assemcly
time. These instructions are: MACRO, MENC,
MEXIT, and MNOTE.
macro prototype: Same as macro prototype
statement.
macro prototype statement: An assemcler
language statement that is used to give a
name to a macro definition and to provide a
model (prototype) for the macro instruction
that is to call the macro, definition.

Glossary

429

main storage:
The general purpose storage cf a
computer.
Usually, main storage can be accessed
directly by the operating registers.
2. See-also real storage, virtual storage.

value from the entry in the name field of
the macro instruction that corresponds to
the macro prototype statenent.

* 1.

* mask:

A pattern of characters that is used
to control the retention or elimination of
portions of another pattern of characters.

NE:

*

mnemonic operation code: An operation code
consisting of mnemonic symbols that
indicate the nature of the operation to be
performed, the type of data used, or the
format of the instruction perforning the
operation.

*

mnemonic symbol:
1. A symbol chosen to assist the human
memory, for example, an abbreviation
such as "mpy" for "multiply".
2. See also mnemonic operation code.
model statement: A statement in the body of
a macro definition or in open code from
which an assembler language statenent can
be generated at pre-assembly time. Values
can be substituted at one or more points in
a model statement; one or more identical or
different statements can be generated from
the same model statement under the control
of a conditional assembly loop.

2.

A program unit that is discrete and
identifiable with respect to compiling,
combining with other units, and
loading, for example, the input to, or
output from, an assembler, ccnpiler,
linkage editor, or executive routine.
See ldad module, object nodule, source
module.

nest: To imbed subroutines or data in othe:
subroutines or data ata different
hierarchical level such that the different
levels of routines or data can be executed
or accessed recursively.
nesting level: In assembler programming,
the level at which a term (or
subexpression) appears in an expre ssion,
the level at which a macro definition
containing an inner macro instruction is
processed by the assembler.
An instruction that specifically
InStructs the computer to do nothing,
except to proceed to the next instruction
in sequence.

*

NO!: A logic operator having the property
that if P is a statement, then the NOT of
is true if P is false, false if F is true.

*

null character: A control character that
serves to accomplish ~edia fill or time
fill, for example, in A<)CII the all zeros
character (not numeric zero). Null
characters may be inserted into or rerooved
from a sequence of characters without
affecting the meaning of the seguence,l:ut
control of equipment or the format may be
affected. Abbreviated NUL. Contrast with
space character.
null character

*

name:
-1-.--A 1- to 8-character alphameric term
that identifies a data set, a control
statement, an instruction statement, a
program, or a cataloged procedure. The
first character of the name nust be
alphabetic.
2. See entry name, external name.
3. See also name entry, label.

Same as null string

null string::

entities,or the notion of a string,
prior to establishing its entities.
In assembler programming, synonymous
with the null character string.

number attri!2Q!;U~~:
1. An at~ribute of a symbolic parameter
that gives the number of sublist
entries in the corresponding macro
instruction operand.
2. An attribute that gives the number of
positional operands in a macro
instruction (specified as N'&SYSLIST)
or an attribute that gives the number
of sublist entries in a specific
positional operand (specified as
N' &SYSLIST (n) ) •

name entry: Usually synonymous with label
(2). However, the name entry of a model
statement can be any string of characters
at pre-assembly tin,e.

430

stri~:

~~he notion of a string depleted of its

2.

name field parameter: A symbolic parameter
that is declared in the name field of a
macro prototype staterrent. It is assigned a

0,

* no OP:

* module:
1.

(not equal to) See relational operator

*

obje£~cod~:

Output from an assembler whic
is itself executable machine code or is

the assembler language. Ordinary symbols
are also used to represent operation codes
for assembler language instructions. An
ordinary symbol has one alphabetic
character followed by zero to seven
alphameric characters.

suitable for processing to produce
executable machine code.

*

object language: The language to which a
statement is translated. The machine
language for the IBM System/370 is an
object language.

*

object module: A module that is the output
of an'assembler or compiler and is input to
a linkage editor.

*

object program: A fully compiled cr
assembled program that is ready tc be
loaded into the computer. Contrast with
source program.

outer macro instruction: A macro
instruction that is specified in open code.
Contrast with inner ~acro instruction.

*

overflow: That portion of the result of an
operatIon that exceeds the capacity of the
intended unit of storage.

*

overlay: The technique of repeatedly using
the same blocks of internal storage during
different stages of a program. When one
routine is no longer needed in storage,
another routine can replace all part of it.

*

padding: A technique used to fill a block
with dummy data.

open code: That portion of a source module
that lies outside of and after any source
macro definitions that may be specified.
open subroutine: A subroutine that is
inserted into a routine at each place it is
used. Contrast with closed subroutine.
NOTE: In assembler progrmnming, a macro
definition is an open subroutine, because
the statements generated from the
definition are inserted into the source
module at the point of call.

paired parentheses: A left parenthesis and
a right parenthesis that belong to the sarre
level of nesting in an expression; the left
parenthesis must appear before its matching
right parenthesis. If parentheses are
nested within paired parentheses, the
nested parentheses must be paired.

* operand:
1.
2.

That which is operated upon.
See keyword operand, positional
operand.

*

operating system: Software which controls
the executi'on of computer programs and
which may provide scheduling, debugging,
input/output control, accounting,
compilation. storage assignrrent, data
management, and related services.

*

operation code: A code that represents
specific operations.

* .2,Eerator:
1.

2.
3.

In the description of a process, that
which indicates the action to be
performed on the operands.
NOTE: In assembler prograrrrring,
operands are referred to as terms.
See arithmetic operator, binary
operator, logical operator, unary
operator.
See also concatenation character.

* OR:

A logic operat'Or having the property
that if P is a staterr.ent, Q is a statement,
R is a statement, ••• , then the OR of P, Q,
R ••• is true if at least one staterrent is
true, false if all statements are false.

ordinary symbol: A symbol that represents
an assembly-time value when used in the
name or operand field of an instruction in

paired relocatable terms: 'I'wo relocatatle
terms in an expression with the same
relocatability attribute that have
different signs after all unary operations
have been performed. Paired relocatable
terms have an absolute value.

*

parameter:
1. A variable that is given a constant
value for a specific purpose or
process.
2. See keyword parameter, name field
parameter, positional parameter,
symbolic parameter.
point of substitution: Any place in an
assembler language statement, particularly
a model statement, into which values can be
substituted at pre-assembly time. Variatle
symbols represent points of substitution.
Eositi2naLQE~!:~nd:

An operand in a macro
instruction that assigns a value to the
corresponding positional parameter declared
in the prototype statement of the called
macro definition.
EQ§!!!2§L~f~me:!:~!:: A symbolic para'meter
that occupies a fixed position relative to
the other positional parameters declared in
the same macro prototype statement.

Glossary

431

pre-assemtly time: The time at which the
assembler process macro definitions and
performs conditional assembly operations.

required. For example, tens complement in
decimal notation, twos corrplement in binar)
notation.

private code: An unnamed control section.

read-Qnly: A type cf access to data that
allows i t to read but not modified.

* program:
1.

2.
3.
4.
S.

real storage: The storage of a IB~
System/370 computer from which the central
processing unit can directly obtain
instructions and data and to which it can
directly return results. Real storage can
occupy all or part of main storage.
Contrast with virtual storage.

A series of actions propcsed in order
to achieve a certain result.
Loosely, a routine.
To design, write, and test a program as
in (1).
Loosely, to write a routine.
See computer program, object program,
source program.

recursive: Fertaining to a process in whicl
each step makes use of the results of
earlier steps.
NOTE: In assembler prograrrming, the inner
macro instruction that calls the macro
definition within which it is nested
performs a recursive call.

program fetch time:
1.
The time at which a program (in the
form of load modules or phase~ is
loaded into virtual storage for
execution.
2.
See also fetch (2), fetch (3).

* program

library: A collection of available
computer programs and routines.

programmer macro definition: Locsely, a
source macro definition.
prototype statement: Sarre as macrc
prototype statement.

* pushdown

list: A list that is constructed
and maintained so that the next item to be
retrieved and re,moved is the most recently
stored item in the list, that is, last in,
first out.
Synonymous with pushdown stack.
pushdown stack: Same as pushdown list.

guoted string: A character string enclosed
by apostrophes that is used in a macro
instruction operand to represent a value
that can include clanks. The enclcsing
apostrophes are part of the value
represented. Contrast with character
expression.

* radix:

In positional re~resentaticn, that
integer, if i t exists, by which the
significance of the digit place must be
multiplied to give the significance of the
next higher digit place. For example, in
decimal notation, the radix of each place
is ten.

* radix

complement: A complerrent obtained by
subtracting each digit from cne less than
its radix, then adding one to the least
significant digit, executing all carries

432

*

register:
1. A device capable of storing a specifiec
amount of data such as one word.
2.
See base register, index register.
relation: The comparison of two expression~
to see if the value cf one is equal to,
less than, or greater than the value of the
other.
relational operator: An operator that can
be used in an arithmetic or character
relation to indicate the comparison to be
performed between the terms in the
relation'. The relational cperators are: EQ
(equal) , GE (greater than or equal to), GT
(greater than), LE (less to or equal to),
LT (less than), NE (not equal to).

* relative

address: The number that specifie~
the-difference-between the absolute addres~
and the base address. Synonymous with
displacement.
reloc~!ability_attribute:

An attribute that
identifies the control section to which a
relocatable expression belongs. Two
relocatable expressions have the same
relocatability attribute if the unpaired
term in each of them belongs to the same
control section.
!:eloc~tabl!Lex12ression:

An assembly-time
expression whose value is affected by
program reloc?tion. A relocatable
expression can represent a relocatable
address.
re loca table term: A term vlhos e value is
affected by program relocation.

* relocate: In computer programming, to move * sig~_Ei~: A binary digit occupying the sign
position.
a routine from one portion of storage to
another and to adjust the necessary address
references so that the routine, in its new
~ig~PQ~iti9n: A position, normally located
location, can te executed.
at one end of a numeral, that contains an
indication of the algebraic sign of the
relocation: Th~ modification cf address
number.
constants to compensate for a change in
* significant digit: A digit that is needed
origin of a module, program, or control
section.
for a certain purpose, particularly one
that must be kept to preserve a specific
accuracy or precision.
* rounding: Same as roundoff.
roundoff: To delete the least significant
digit or digits of a numeral and to adjust
the part retained in accordance with some
rule.

*

scaling attribute: An attribute that
indicates the number of digit positions
occupied by the fractional portion of
fixed-point, decimal, and floating-point
constants in their otject code forrr.
~cope:

1.
2.

In assembler programming, that part of
a source prograrr in which a variable
symbol can communicate its value.
See global scope, local scope.

self-defining term: An absolute term whose
value is implicit in the specification of
the term itself.
sequence symtol: A symbol used as a
branching latel for conditional assembly
instructions. It consists of a period
followed by one to seven alphameric
characters, the first of which must be
alphatetic.

lagg~g~: The language from which a
statement is translated.

source macro definition: A macro definition
Included in-a-source-module. A source
macro definition can be entered into a
program library; it then becomes a library
macro definition.

*routine:
1. An ordered set of instructions that may
have some general or frequent use.
2. See sucroutine.

scale modifier: A subfield in the cperand
of the DC assembler instruction that
indicates the number of digits in the
object code to be occupied by the
fractional portion of a fixed-point or
floating-point constant.

sourc~

source module: A sequence of statements in
the assembler language that constitutes the
input to a single execution of the
assembler.
* sour£~Ef2.9f~!!!: A compute·r program wri tten
in a source language. Contrast with object
program.
sEace_£n~£~~f:

*

A normally nonprinting
graphic character used to separate words.
Synonymous with blank character. Contrast·
with null character.

*

sEeci~l_chara£~gf: A graphic character that
is neither a letter, nor a digit, nor a
space character.

* statement:
1:--In-computer programming, a meaningful
expression or generalized instruction
in a source language.
2. See job control statement, linkage
editor control statement, comments
statement, model statement.
* storage:
1. Pertaining to a device into which data
can be entered, in which they can be
held, and from which they can te
retrieved at a later time.
2. Loosely, any device that can store
data.
3. See main storage, real storage, virtual
storage.

SET symtol: A variatle symbol used to
communicate values during conditicnal
assembly processing. It must be declared to
have either a global or local scope."
* ~ragg_all2£~~i£Q:
1. The assignment of blocks of data to
severity code: A code assigned by the
specified blocks of storage.
2. See dynamic storage allocation.
assemtler to an error detected in a source
module. A severity code can also be
specified and assigned to an error rr.essage
generated by the MNOTE instruction.

Glossary

433

* storage protection: An arrangement for
preventing access to storage for either
reading, or writing, or both.

substring:
1.

2.

storage stack: Loosely, a pushdown list.

A character string that has teen
extracted from a character e~pression.
See also substring notation.

substring notation: A character e~pression
immediately followed by two subscripts,
separated by a co~ma, and enclosed in
parentheses. It can be used only in
conditional assembly instructions. The
value of the first subscript indicates the
position of the character within the
character expression that begins the
substring. The value of the second
subscript represents the number of
characters to be extracted from the
character expression.

* string:
1. A linear sequence of entities such as
characters or physical elements.
2.
See bit string, character string, null
string.
sublist: A macro instruction operand that
contains one or more entries separated by
commas and enclosed in parentheses.

* subroutine:
1.
A routine that can be part of another
routine.
2. See closed subroutine, open subroutine. *~ch: A device or programming technique
for making a selection, for example, a
conditional jump.
subscript: One or more elements, enclosed
in parentheses, that appear immediately
symbol:
after a variable syrrbol or character
1.
A representation of something ty reason
expression.
The value of a subscript
of relationship, association, or
indica tes a position in the array or string
convention.
of values represented by the variable
2. See mnemonic symbol, ordinary symbol,
symbol or character expression.
sequence symbol, SE7 symbol, variatle
symbol.
subscripted 5SYSLIST: The system variable
symbol &SYSLIST immediately followed by
symbolic address: An address e~press ed in
either one subscript or two subscripts
symbols convenient to the computer
separated by commas, and enclosed in
programmer.
parentheses. The value of the first
subscript indicates the position cf a
11mb21i£-£29!!!9: Coding tha t use s machine
positional operand in a macro instruction
instructions with symbolic addresses.
and the value of the second subscript
NC7E: In assembler programming, any
indicates the position of the entry in the
instruction can contain symbolic addresses.
sublist of the positional operand indicated
In addition, any other portion of an
by the first subscript.
instruction may be represented with
symbols, for example, labels, registers,
subscripted SET symbol:
lengths and immediate data.
1.
A SET symbQl that is immediately
followed by a subscript. A subscripted
ll~£2!ic-Ear2~~!~!:
SET symbol must be declared with an
1. A variable symbol declared in the
allowable dimension before i t can be
prototype statement of a macro
used. The value of the subsc~ipt
definition. A symbolic parameter is
indicates the position of the value
usually assigned a value from the
given to the subscripted symbcl in the
corresponding operand in the macro
array represented by the SET symbol.
instruction that calls the macro
2. See also dimensioned SET symbcl.
definition •.
2. See also keyword parameter, name field
subscripted symbolic parameter: A syrr.bolic
parameter, positional parameter.
parameter that is irrmediately followed by a
subscript. The value of the subscript
system· loader: See loader (2) •
indicates the position of the entry in the
sublist in the macro instruction cperand
syste!!}.2!!~!:Q._gefin.!ti2!!: Loosely, a library
referred to by the symbolic parameter.
macro definition supplied by IB~.
substitution: The action. taken by the
syste~_~~ro~~!!§!!!!£ti6n: Loosely, a macro
assembler when it replaces a variable
instruction that calls for the processing
symbol with a value, for example, during
of an IBM-supplied library macro
the expansion of a rracro definiticn.
definition, for example, the ATTACH macro.

*

*
*

ll~~~_yar.!2121e

sy!!!bo1: A variable symbol
that always begins with the characters

434

&SYS. The system variable symbols do not
have to te declared, because the asse~bler
assigns them read-only values autcrratically
according to specific rules.

term:
-1-.--The smallest part of an expression that
can te assigned a value.
2.
See absolute term, arithmetic term,
logical term, relocatable terrr.
*transla te: To transform statements from one
language to another without significantly
changing the meaning.
*truncate: To terminate a corr.putaticnal
process in accordance with sorre rule, for
. example, to end the evaluation of a power
series at a specified term.
NOTE: In assembler programming, the otject
code for data constants can be truncated by
the assemtler.
*twos complement: The radix complement in
. binary notation.
type attribute (T'): An attribute that
distinguishes one form of data from
another, for example, fixed-pcint ccnstants
from floating-point constants or machine
instructions from macro instructicns.

unary operator: An arithrretic operator
having only one term. The unary operators
that can te used in absolute cr
relccatable, and arithmetic expressions
are: positive (+) and negative (-).
unnamed control section: A control section
that is initiated in one of the following
three ways:
1. By an unnamed STAR~ instructicn.
2. By an unnamed CSECT instruction, if no
unnamed START instruction appears
before the CSECTinstruction.
3. By any instruction that affects the
setting of the location ccunter.

*

vari~El~:

A quantity that can assume any of
a given set of values.

variaE1~2YmhQ~: In assemtler programming,
a symtol, used in macro and conditional
assemtly processing, that can assume any of
a given set of values. It consists of an
ampersand (&) follcwed by one to seven
alphameric characters, the first of which
must be alphabetic.
NOTE: All variable symbols must be declared
except the system variable symbols.

virt~~l_~£g!~g~:

Address space appearing to
the user as real storage from which
instructions and data are mapped into real
storage locations. The size of virtual
storage is limited only by the addressing
scheme of the computing system rather than
by the actual number of real storage
locations. Contrast with real ·storage.

warning message: An indication that a
possible e~ror has been detected. The
assembler does not assign a severity code
to this type of error. Contrast with error
message.
word:
* -1-.--A character string or bit string
considered as an entity.
* 2. See computer word.
3. See doubleword, fullword, halfword.
* word length: A measure of the size of a
word, usually specified in units such as
characters or binary digits.
NOTE: In assembler programming, the word,
or fullword, contains 32 bits ~inary
digits) or 4 bytes.
wrap=~~nd:

Loosely, the overflow of the
location counter when the value assigned to
it exceeds 224-1

Glossary

435

This page left blank intentionally

Index

(see period)
...
(see plus sign)
& (see ampersand)
&SYSDATE (system variable symbol)
279
attributes of 279,325
global scope of 279
&SYSECT (system variable symbol)
280
attributes of 280,325
local scope of 279
in nested macros 316
&SYSLIST (system variable symbol)
281
attributes of 283,325
local scope of 279
in nested macros 314
notation allowed 281
number attribute of 283
subscripts for 281,282
&SYSNDX (system variable symbol)
284
attributes of 284,325
local scope of 279
in nested macros 315
&SYSPARM (system variable symbol)
284
attributes of 285,325
global scope of 279
specified in job control
language 285
under CMS 285-286

)1

&SY~~~~b~~~:t~~ v~~~~~~~
$

*
/
,
#
Ii)

=

symbol)

global scope of 279
(see dollar sign)
(see asterisk)
(see minus sign)
(see slash)
(see comma)
(see number sign)
(see at sign)
(see apostrophe)
(see equal sign)·

absolute address 84
absolute expression 57,56
A-con (see address constant,
A-type)
ACTR instruction 370
address
absolute 84
base 85,133
base displacement format of
definition 84
explicit 87
implicit 87
reference 84
relocatable 84
relocatability of 85
address constant

86

286

A-type 194
location counter
reference in 194
defined by DC instruction 162
External Symbol Dictionary
entry for 116
location counter reference in
Q-type 200
for external dummy section
S-type 196
V-type 198
y-type 194
location counter
reference in 194
address reference 84
(see also explicit address;
implicit address; symbolic
address)
addressing
between source modules 147
within source modules 133
AGO instruction 369
AIF instruction 367
alignment 75
ALIGN option 75
boundary 76,166
of constants and areas 166,76
forcing of 204,76
of machine instructions 75
ALIGN option 75,204
ALOGIC option 376
alphabetic character
of character set 34
in symbols 37,35
alphameric (see character)
alternate statement format
for macro instruction
statement 291
for macro prototype statement 256
number of continuation lines
allowed 18
ampersand (&)
35
(see also double ampersand)
as variable symbol indicator
AND operator 361
ANOP instruction 373
apostrophe (. )
(see also double apostrophe)
in attribute notation 324
to delimit character strings 35
to delimit quoted strings 304
area
(see data area)
arithmetic expression 349
arithmetic operator
binary operator
addition (+)
55,351
division V)
55,351
multiplication (*)
55,351
subtraction (-)
55,351
unary operator
negative (-)
55,351
positive (+)
55,351
Index

437

arithmetic relation 361
arithmetic term
attribute reference 55,351
self-defining 46
SET symbol 318,351
symbolic parameter 260,351
system variable symbol 278,351
array
dimensioned SET symbol 322
assembler instruction 30
conditional assembly 32,317
macro processing 32
ordinary 30
addressing 133
controlling the assembler
program 211
program sectioning 101
symbol and data definition 153.
assembler language 2
character set 34
comments statement 19
expressions 53
(see also expression)
assembly time 54,6
conditional assembly 349
instruction statement 20
assembler instructions 99,407
machine instructions 63
macro instructions 244,289
literals 50
option
ALIGN 75
ALOGIC 376
FLAG 274
LIBMAC 286
MCALL 287
MLOGIC 376
program 3
source module 26,102
statement coding 15
structure 25·
terms 36
assembler processing sequence 4
assembly time 6
pre-assembly time 7,8
assembly time
assembly into object code 5,108
expression 54,6
absolute 57
complexrelocatable 58
instructions processed during 5,6
assignment instructions
arithmetic 343
character 345
logical 347
asterisk (*)
(see also binary opera tor)
as comments statement
indicator 19
as location counter reference
indicator 43
as multiplication operator 55,351
with period, as internal macro
comments statement indicator 277
at sign (Gl)
as alphabetic character 34
attribute
(see also relocatability
attribute)
438

count (K')
332
integer (I')
331
length (L')
329
notation 324
number (N')
333
reference 324
scaling (S')
330
symbol length 44
type (T')
328
in character relation 361
in SETC operand 345
attribute notation 324
attribute reference
(see attribute)
assembler processing sequence 4
assembler instructions 6,7
machine instructions 5
macro instructions 8

B-con (see data constant, binary)
base address 85
assigned by USING 134·
base-displacement form 84
allowing relocatability of
addresses 85
assembled into machine
instruction 86
converted from implicit
address 87,134
base register
assigned by USING 134
loading 134
begin column 16
binary constant (B)
181
binary operator (+,-,*,/)
in absolute and relocatable
expressions 55
in arithmetic expressions 351,353
bit string
in binary self-defining term 48
bit-length modifier 8,172
blank
character 35
in operands 22
opposed to null character
string 298
in self-defining term 50
as special character 34
Boolean
expression (see logical
expression)
operator (see logical
operator)
boundary (see also alignment)
166
boundary alignment (see
al ignrnent)
branching
conditional assembly 367
extended mnemonic for 72
machine instruction for 68
buffer area
formatted by a dummy section 121

C-con (see data constant,
character)
call (see macro instruction)
card (see punched card)
card deck (see deck)
CCW instruction 209
central processing unit 4
channel command word 209
character
alphameric (alphanumeric)
34
digit.34
expression 355
letter 34
relation 360
set 34
special 34
string, null 298,303
character constant (C)
182
character expression 355
concatenation operator 281
between 357,359
in SETC operand 345
in substring notation 365
character relation
in logical expression 361,363
character set 34,35
character string
(see also null character
string)
character constant (C-type)
182
in character relations 360,361
character self-defining term 50
concatenation of character
strings 359,268
in macro instruction operands 302
in MNOTE instruction 274
in PUNCH instruction 229
SETC operand 345
in TITLE instruction 226
type attribute 327
CNOP instruction 218
code
condition 391
machine 1
mnemonic 79
object 2
open 252
operation 22,79
source 2
coding
conventions 15
form 15
time 4-8,108
column
begin 16
continuation-indicator' 16
continue 16
end 16
COM instruction 124
to continue common section 124
to initiate common section 124
comma (,)
35
in character constants 182

to indicate omitted
operand field 80
subfield 81
between nominal values in
constants 179
between operands 35
command
(see channel command word)
comments statement 19,27
format 19,27
in macro definitions 277
common control section
COM instruction for 124
definition of 124
establishing addressability of 124
complex relocatable expression 58
only in A-type and y-type
address constants 194,58
concatenation character (.)
between character expressions 359
in model statements 268
concatenation operator (see
concatenation characte~
condition code 391
conditional assembly
branching instructions
ACTR 370
AGO 369
AIF 367
ANOP 373
elements 317
data attributes 323
sequence symbol 334
SET symbols 318
expression 349
arithmetic 349
character 355
logical 359
functions of 318
instructions
ACTR 370
AGO 369
AIF 367
ANOP 373
GBLA, GBLD, GBLC 340
LCLA, LCLB, LCLC 336
SETA 343
SETB 347
SETC 345
loop counter 370,371
in open code 374
pre-assembly time 374,7
processing 7
substring notation in 364
constant
address 194-200
data 154,161
defined by DC instruction 161
duplication factor subfield 168,163
literal 180
modifier subfield 163,170
nominal value subfield 163,179
padding of value 167
truncation of value 168
type subfield 163,169
continue column 16

Index

439

continuation
indicator field 17
line 9,18
control program 107
control section 107
common 124
dummy 121
executable, defined by
CSECT 110,119
START 110,117
external symbol dictionary
entries for 116
first 113
literal pools in 115
location counter setting 111
processing times 108
reference, defined by
COM 110,124
DSECT 110,121
DXD 110,130
unnamed 115
COpy instruction 103
input to source module 102
inside macro definitions 272
counter
instruction 41
location 41,111
(see also location
counter)
loop
ACTR instruction 370
count attribute (K')
332
CPU (see central processing unit)
CSECT instruction 119
to continue control section 119,120
external symbol dictionary
entry for 116
to initiate executable control
section 119,120
CXD instruction 131
cumulative length of external
dummy sections 131,128
for linkage editor 131,128

m
D-con (see floating point
constant, long)
data
area 154,201
attribute 323
constant 154,162
data attribute (see attribute)
data constant
binary (B)
181
character (C)
182
decimal (P, Z)
188
defined by DC instruction 162
fixed-point (H,F)
186 .
floating-point (E,D,L)
190
hexadecimal (X)
184
data definition 154,161
DC instruction
defining data 162
operand 163
440

subfields in operand 163
arithmetic 65
constants (P and Z)
188
instructions 65
self-defining term 47
decimal constant
integer attribute of 331
packed (P)
188
scaling attribute of 330
zoned (Z)
188
decimal point (.)
for decimal arithmetic 65
in decimal (P,Z) constants 188
for fixed-point arithmetic 64
in fixed-point (H,F) constants 187,176
for floating-point arithmetic 66
in floating-point (E,D,L)
constants 191,178
deck
object 1
source 1
declaration instructions
global 340
local 336
dictionary, external symbol 116,150
dimensioned SET symbol
declaration of 339,342
displacement
assembled into machine
instruction 86
computed from base address 87,133
dollar sign ($)
as alphabetical character 34
double ampersand
in character expression 357
in MNOTE instruction 274
in PUNCH instruction 230
in TITLE instruction 226
double apostrophe
in character expression 357
in MNOTE instruction 274
in PUNCH instruction 230
in TITLE instruction 226
doubleword
boundary 166
data constants 166,191
DROP instruction 144
for freeing base registers 144
not needed 146
with USING 145,146
DS instruction 201
defining areas 201
operand 206
subfields in operand 206
with 0 duplication factor 204,76
DSECT instruction 121
to continue dummy section 121
external symbol dictionary
entry for 116
to generate external dummy
section 127
to initiate dummy section 121
name in Q-type address
constant 127,200
with USING 140
dummy control section
definition of 121
DSECT instruction for 121

DXD instruction for 130
establishing addressability of
opposed to external dummy
section 130
duplication factor
in SETC operand 346
subfield of DC/DS operand 168
DXD instruction 130
external symbol dictionary
entry for 116
to generate external dummy
section 127
name in Q-type address
constant 200

121,140

EBCDIC (see extended binary coded
decimal interchange code)
377
E-con (see floating-point
constant, short)
EJECT instruction 227
end column 16
END instruction 105
to end source module 102
multiple 103
entry symbol
identified by ENTRY 150
entry (see instruction statement
entry; external symbol
dictionary, entries)
ENTRY instruction 150
external symbol dictionary
entry for 150,116
identifying entry symbol 150
for symbolic linkage 147
EQ -- equal to 360
(see also relational opera tor)
I EQU instruction 156
equal sign (=)
to indicate literal 53,180
in macro instruction operand 306
ESD (see external symbol
dictionary)
establishing addressability 133
of common section 124
of dummy section 121,140
of executable control section 120,137
of external dummy section 128
of large control section 138
of reference control section 140
excess-64 binary notation
for exponent in floating-point
constant 193
executable control section 110
establishing addressability of 137
initiated by CSECT 119 .
initiated by START 117
execution time 4-8,108
explicit address
(see also base-displacement
form)
converted from implicit
address 87,134
in machine instruction 87

exponent
in excess-64 binary notation 193
modifier 170,178
in nominal value of constant 179
portion of floating-point
constant 192
expression
(see also assembly time
expression; conditional
assembly expression)
absolute 57
arithmetic 349
Boolean (see expression,
logical)
character 355
complex relocatable 58
logical 359
arithmetic relation in 361
character relation in 361
operators
arithmetic 55,351
concatenation 357
logical 361
relocatable 58
terms in
arithmetic 351
logical 361
extended floating-point constant 190
extended mnemonic branching
instruction 72,73
external dummy control section
allocation of storage for 127
CXD instruction for 131
DSECT instruction for 127
DXD instruction for 130
establishing addressability of
128
generation of 127
offset to 127
external symbol
identified by EXTRN 151
identified in v-type address
constant 149,198
identified by WXTRN 152
external symbol dictionary 116
entries for 150,151
EXTRN instruction 151
for data reference 148
external symbol dictionary
entry for 151
identifying external symbol 151
opposed to V-type address
constant 149
opposed to WXTRN instruction 152
for symbolic linkage 147

II
F-con (see fixed-point constant,
fullword)
fetch (see program fetch time)
first control section
initiated by 113
literal pool in 115,216
statements allowed before 114
Index

441

fixed-point
arithmetic 64
constant 186
instruction 64
fixed-point constant
exponent modifier 178
fullword (~
186
halfword tm
186
integer attribute of 331
scale modifier 176
scaling attribute of 330
FLAG option 274
floating-point
arithmetic 66
constant 190
instruction 66
floating-point constant
base for
exponent
excess-64 binary notation
for 193
modifier 178
in nominal value 179
extended precision (L)
190
fractional portion 192
integer attribute of 331
long (D)
190
scale modifier 178
scaling attribute of 330
short (E)
190
format
machine language 78,92
source statement 20
formatting
COM instruction for 124
data area usingdurnrny section 121
DSECT instruction for 121
fraction
in fixed-point constants 186
in floating-point constants 192
scale modifier to provide
digits for 175-178
scaling attribute to indicate 330
number of digits o6cupied by
fraction bar (/ -- see slash)
fractional portion
of floating-point constants 192
fullword
boundary (see boundary)
constant 186

GBLA instruction 340
GBLB instruction 340
GBLC instruction 340
GE -- greater than or equal to 360
(see also relational opera tor)
generation (see macro generation)
global
(see also global scope, global
variable symbol)
declaration '340
global scope
of SET symbol 31.9
of system variable symbols
442

&SYSDATE 279
&SYSPARM 284
&SYSTIME 287
global variable symbol
SET symbol 319
system variable symbols
&SYSDATE 279
&SYSPARM 284
&SYSTIME 287
GT
greater than 360
(see also relational opera tor)

m
H-con (see fixed-point constant,
halfword)
halfwor.d
boundary (see boundary)
constant 186
instructions
hexadecimal
constant (X)
184
digit 49
notation in floating-point
constants 193
self-defining term 49

o
(see integer attribute)
ICTL instruction 219
identification-sequence field
17
immediate data 90
implicit address
converted to explicit address 87,134
in machine instruction 87
in USING domain 125
index register
in address reference 86
in machine instruction operand 87
I inner macro instruction 307
input
to assembler program 2,102
buffer 121
to linkage editor 2,108
to source module 102
input/output instructions 70
instruction
'
assembler 3,30
conditional assembly 32,317
entry 21
format (see machine
instruction format)
machine 2,29
macro 33,289
statement 16
statement format 20
instruction counter 41
instruction entry (see
instruction statement entry)
instruction statement 2,26
II

instruction statement entry
name 21
operand 22
operation 22
remarks 23
instruction statement format
integer attribute (I')
331
formula for 331
I/O (see input/output)
ISEQ instruction 221

20

K' (see count attribut~
keyword operand 296
cOmbining with positional
parameters 299
keyword parameter 263
combining with positional
parameters 265

II
L' (see length attribute)
label
ordinary symbol as 38
sequence symbol as 335
variable symbol as 344,345,348
language (see assembler language)
LCLA instruction 336
LCLB instruction 336
LCLC instruction 336
L-con (see floating-point
constant, extended precision)
LE -- less than or equal to 360
(see also relational opera tor)
length
attribute 329
explicit 88
implicit 88
I
modifier 159
length attribute (LI)
329
in arithmetic expression 351
in assembler language
statement 45
assembly time 158,159
pre-assembly time 158,159
value
length field
in machine instructions 88
length modifier 170
letter 34
level (see nesting level)
LIBMAC option 286
library
macro definition 252
for statement to be copied 103
library macro definition
IBM supplied 239
opposed to source macro
definition 252

printing of (option LIBMAC)
287
linkage (see linkage edit
processing)
linkage edit processing
control sections 108
ESD entries for 116
external dummy section
CXD instruction 131
Q-type address constant 200
load module 1,108
object module 1,108
symbolic linkage information
ENTRY 150
EXTRN 151
V-type address constant 198
WXTRN 152
linkage-edit time 4-8,108
linkage editor
address constants for
A-type 194
Q-type 200
V-type 198
Y-type 194
control statement
created by PUNCH 228
created by REPRO 231
external symbol dictionary 116
instruction for
CXD 131
listing control instructions
EJECT 227
PRINT 222
SPACE 228
TITLE 224
listing options
ALOGIC 376
LIBMAC 286
MCALL 287
MLOGIC 376
literal 50
compared to data constants
and self-defining terms 51
constant 180
duplicate 217
pool 51,215
specification 53
subfields 53
literal pool 215
in control section 115
initiated by LTORG 215
load
instruction
fixed-point arithmetic 64
floating-point arithmetic 66
logical operations 67
module 2,108
time (see program fetch time)
load module
combined from object modules 2,108
loaded by loader 4
loaded at program fetch time 4,108
produced by linkage editor 2,108
load time (see program fetch
time)
·loader 4
local
(see also local scope, local
variable symbol)
declaration 336
Index

443

local
of
of
of
of
of

scope
ACTR instruction 371
sequence symbol 325
SET symbol 319
symbolic p~rameter 2~0~319
system variable symbols
&SYSECT 319
&SYSLIST 319
&SYSNDX 319
local variable symbol
SET symbol 318
declaration of 336
symbolic parameter 260
system variable symbols
&SYSECT 280
&SYSLIST 281
&SYSNDX 284
location counter 41
printed values 42
setting for control sections 111
location counter reference (*)
41
in address constants (A and
Y-type)
194
in expressions 55
in literals 43
in ORG operand 213
logical expression 359
in AIF operand 367
coding rules for 362
definition of 361
evaluation of 363
operators for 361
in SETB operand 340
terms in 361
logical operator
AND, NOT, OR 361
in logical expression 361
logical relation
(see also arithmetic relation,
character relation)
in logical ~xpression 360
operators for 360,
(see also relational
operator)
logical term
in logical e~pression 361
loop
conditional assembly 370
counter 370
loop counter 370
ACTR instruction for 370
LT -- less than 360
(see also relational operator)
LTORG instruction 214
for literal peol 215

machine instruction
address in 84
explicit 87,133
implicit 87,133
alignment of 75
coding examples 92
format of 78
immediate data in 90
444

mnemonic operation code for 79
object code from 78,92-97
operand entry 80
processing 5
register usage in 83
statement format 29,78
types 64-74
machine instruction format
RR 92
RS 94
RX 93
S
96
SI 95
SS 97
machine language 1
macro (see macro definition,
macro instruction)
MACRO assembler instruction 254
(see also macro definition,
header)
macro call (see macro
instruction)
macro definition 245,251
body of 248,259
format 253
header (MACRO)
254
internal comments for 277
library macro definition 246,252
printing of (LIBMAC)
287
as opposed to open code 252
prototype statement of 243,255
source macro definition 246,252
statements in
comments statements 248,277
model statements 248,266
processing statements 249,272
symbolic parameters in 260
trailer (MEND)
254
where to specify 246,252
macro expansion 240
~ee also macro generatio~
macro generation 240
of comments 277
controlled by conditional
assembly language 242,317
message produced by MNOTE 274,275
model statement for 248,266
of operation codes 270
output from macro definition 240-242
at pre-assembly time
macro instruction 33,289
alternate statement format 291
call to a macro definition 240
entry
name 292
operand 293
operation 293
format of 290
inner 307
nesting of 247,307
levels 308
operand 294
&SYSLIST 281,301
keyword 296
positional 294
sublist 300
outer 307
printing of nested (MCALL)
288

processing 8
recursive call 310
statement format 290
values in operands 302
where to specify 247,290
macro instruction operand
combining keyword and
positional 299
keyword 296
positional 294
sublist as value 300
value of 302
macro library 246,252
macro definition in 246
macro prototype statement 255
alternate format 256
entry
name 256
operand 258
operation 257
format of 255
name field parameter in 257
symbolic parameters in 258,260
keyword 263
positional 262
mask
for branching 90
as immediate data 92,94
MCALL option 287
MEND instruction 254
(see also macro definition,
trailer)
as exit from macro definitions 249
MEXIT instruction 276
minus sign (-)
(see also binary operator,
unary operator)
as subtraction operator 355,351
MLOGIC option 376
mnemonic operation code
changing of (OPSYN)
232
creating of, for macros 257
generation of 270
for machine instructions 79
naming a macro definition 243,257
structure of 79
used in macro instruction to
call a macro definition 243
MNOTE instruction 273
model statement 266
concatenation in 268
fields in 267
format of 266
points of substitution in 267
rules for field contents 269
variable symbols in 267
modifier
exponent 178
bit-length 172
length 170
scale 175
subfield in DC/OS operand 170
module (see load module, object
module, source module)

N' (see number attribute)
name entry
in assembler language
instruction 21
in conditional assembly
instruction 32
in EQU instruction 156,160
in machine instruction 29
in macro instruction 292
in macro prototype statement 256
in model statement 269
in OPSYN instruction 232
in TITLE instruction 224
name field parameter
assigning a value'to 292
of macro prototype statement 256
opposed to symbolic parameter 256,257
NE -- not equal to
(see relational operator)
nested macro instruction 247,307
nesting level
.
for COpy instructions 104
for macro instructions 308
no op (see no operation
instruction)
no operation instruction
extended mnemonic for 73
generated by CNOP instruction 218
NOALIGN (opposite of ALIGN)
6
NOALOGIC (opposite of ALOGIC)
NOLIBMAC (opposite of LIBMAC)
NOM CALL (opposite of MCALL)
nominal value
subfield in DC/OS operand 179
NOMLOGIC (opposite of MLOGIC)
NOT operator 361
notation (see attribute notation,
excess-64 binary notation,
substring notation)
null character string
as default value of keyword
parameter 264,298
generation ·of 298,303
in model statement 298,303
opposed to blank 298
as sublist entry 301
as value in macro instruction
operand 303
number attribute (N')
333
of &SYSLIST 283
in arithmetic expression 351
number representation
for decimal constants 188
for floating-point constants 192
number sign (#)
as alphabetic character 34

Index

445

object code
of addresses 86
of channel command words ~CW)
210
of data constants (DC)
padding 167
truncation 168
entered into
common control section 124
external dummy control
section 128
formats for machine
instructions 78
of lengths
effective 88
explicit 88
implicit 88
of machine instructions 92-97
alignment 75
registers assemble~ into 83
registers not apparent in 83
representation of decimal
constants 188
representation of floatingpoint constants 193
(see also excess-64 binary
notation)
fraction 193
exponent 193
object language (see object code)
object module
area reserved in, by OS
201
assembled from source module 2,108
automatic call for (EXTRN)
152
combined into load module 2,108
common control section in 124
constant assembled into, from
DC instruction 161
as opposed to source module 101
open code
conditional assembly in 374
opposed to code inside macro
definitions 252
operand
(see also operand entry, term)
alternate format for 256,291
combined with remarks in
model statement 271
combining keyword and
positional 299
in DC/DS instruction 163,206
entry in assembler language
instruction 22
field 20
format of 22,80
keyword 296
of macro definition 258
of macro instructibn 294
positional 294
subfield in DCjOSinstruction 163,206
symbolic parameter as 258,260
operand entry 22
address 84
in as~embler instruction 31
combined with remarks in
model statement 271
446

in conditional assembly
instruction 32
immediate data 90
length 88
in machine instruction 29
in macro instruction 33,293
in macro prototype instruction 258
in model statement
271
register 82
operation code (see mnemonic
operation code)
operation entry 22
in assembler instruction 21
in conditional assembly
instruction 32
in machine instruction 29
in macro instruction 293
in macro prototype statement 257
in model statement 270
operator
arithmetic
binary 55,351
unary 55,351
concatenation (see
concatenation character)
logical 361
relational 360
OPSYN instruction 232
option (see assembler, option)
OR operator
361
ordinary symbol 37
as operation code for macro
prototype statement 257
opposed to sequence symbol,
variable symbol 37,38
ORG instruction
212
outer macro instruction 307
output
from assembler program 2,108
buffer 121
from linkage editor 2,108
from source module 2,108
overflow
of location counter 42

padding of constants 167
paired relocatable terms 56
in absolute and relocatable
expressions 57,58
from dummy section, allowed in
address constants 123
parameter
name field 256
symbolic 260
P-con (see decimal constant,
packed)
period (.)
(see also concatention
character, decimal point)
with asterisk as internal
macro comments statement
indicator 19,277
as bit-length indicator 172

Page of GC33-4010·S
As Updated 28 Dec 1981
. By TNL GN20·9372

in macro instruction operand
value 307
as sequence symbol indicator 38,334
plus sign (+)
(see also binary operator,
unary operator)
as addition operator 55,351
point of substitution
in model statement 269-271
variable symbol as 261
POP instruction 234
position
of character in line after
REPRO 231
of character in PUNCH operand 230
corresponding to coding sheet
column 15
positional operand 294
combining with keyword
operands 299
in macro instruction 294
positional parameter 262
combining with keyword
parameters 265
pre-assembly time 4-8
expression
arithmetic 349
character 355
logical 359
instructions processed during 7
operation
precision
extended, floating-point
constant (L-con)
190
PRINT instruction 222
private code 115
(see also unnamed control
section)
processing sequence
(see processing time)
processing statements in ~acro
definitions 272
conditional assembly
instructions 272-317
COpy instruction 272
inner macro instruction 272-307
MEXIT 276
MNOTE 273
processing time
(see also assembler processing
sequence)
assembly 4-8,108
coding 4- 8,108
execution 4-8,108
linkage edit 4-8,108
pre-assembly 4-8
program fetch 4-8,108
program
(see also object program,
source program)
execution 108
linkage 101,108
sectioning 101
program fetch time 4,108
program library (see library)

program relocation
effect on absolute terms 36
effect on address references 85
effect on relocatable terms 36,58
programmer macro
(see source macro definition)
prototype statement (see macro
prototype statement)
PUNCH instruction 228
punched card
containing assembler language
statements 1,15
as input to assembler 102
PUSH instruction 234
pushdown list 234
(see also in GLOSSARY)

I

Q-con (see address constant,
Q-type)
quoted string 304

m
read-only storage (see literal
pool)
read-only value
of literals 53
of symbolic parameters 260
of system variable symbols 270
recursion
of nested macro calls 310
reference control section 110
common section 124
dUITmy section 121
establishing addressability of 140
external dummy section· 127
initiated by COM 124
initiated by DSECT 21
initiated by DXD 130
register 82
base 85,133
index 86
as operand in machine
instruction 82
usage in machine instruction
operations 83
relation (see arithmetic
relation, character relation,
logical relation)
relational operator (EQ, GE, GT,
LE, and NE)
360
between arithmetic expressions 361
between character strings 361
relative address (see
displacement)
relocatability
of addresses 85
attribute 58
Index

447

relocatable address 84
relocatable expression 58,56
complex relocatable
expression 58
processed at assembly time 6
relocatable term 36
relocate
(see also program relocation)
instructions 74
REPRO instruction 231
rounding
of fixed-point constants 177
of floating-point constants 178
RR format 92
RS format 94
RX format 93

S format 96
S' (see scaling attribute)
SI format 95
SS format 97
scale modifier
for fixed-point constants 176
for floating-point constants 178
scaling attribute (S')
330
in formula for integer
attribute 331
S-con (see address constant,
S-type)
scope (see global scope, local
scope)
self-defining term 46
in assembly-time expressions 55
binary 48
.
character 50
in conditional assembly
expressions 351,361
decimal 47
in EQU operands 156-160
hexadecimal 49
sequence symbol 38'
as conditional assembly label 334
format of 334
local scope of 35
SET symbol 318
in arithmetic expression 349
assigning value to 349
in character expression 356
declaration of 336
in logical expression 361
scope of 319
as subscript 318
subscripted 322·
SETA instruction 343
SETB instruction 347
SETC instruction 345
severiti code
in MNOTE operand 273
sign
(see also sign bit)
for decimal numbers 188
for fixed-point numbers 186
for floating-point numbers 190
448

sign bit
in fixed-point constants 186
in floating-point constants 192
in self-defining terms 47-49
slash (/)
(see also binary opera tor)
as division operator 55,351
source language (see assembler
language)
source macro definition
opposed to library macro
definition 252
where to specify in source
module 246,252
source module 26,102
addressing within (USING)
133
assembled into object module 101
beginning of 102
control sections in 101
copying statements into ~OPY)
103
end of (END)
102
input to assembler program 102
literals in 214
.
number of external symbol
dictionary entries allowed in 116
open code of 252
as opposed to object module 101
size of 101
source macro definition in 246,252
statements in
comments 27,19
instruction 26,20
structure of 26
symbolic linkage between 147
source program 101
SPACE instruction 228
special character 34
before attribute notation 305
between operator and term 362
START instruction 117
external symbol dictionary
entry for 116
to initiate first (executable)
control section 113
statements allowed before 113,114
statement
assembler language 2,15
comments 19
field 16
format
fixed 20
free 20
instruction 20
macro prototype 255
model 266,8
status switching instructions 69
storage (see virtual storage,
pushdown list)
storage allocation
for external dummy sections 128
store
not allowed with literal 53
operation
string (see bit string, character
string)
sublist
in macro instruction operand 300
in nested macros 312,313

referred to by
subscripted &SYSLIST 300,281
subscripted parameter 300,261
subscript
in &SYSLIST notation 281
to indicate sublist entry 261,281
nesting of 322
for parameter 261
for SET symbol 322
in substring notation 365
for variable 267
subscripted &SYSLIST
in nested macros 314
reference to positional
operand 281,282
reference to sublist entry 281,282
subscripts for 282
subscripted character expression
(see substring notation)
subscripted parameter 261
in nested macros 312,313
reference to sublist entry 261
subscript for 261
subscripted SET symbol 318,322
nesting of subscripts 322
for SETA symbols 344
for SETB symbols 348
for SETC symbols 347
subscripted variable symbol 267
(see also subscripted
&SYSLIST, subscripted
character expression,
subscripted parameter,
subscripted SET symbol)
substitution
point of 267
at pre-assembly time 7,8
substring notation 364
character expression in 366
concatenated to character
expression 359
in SETC operand 345
subscripts for 366
suppression (see zero
suppression)
symbol
" definition of 38
entry 150
external 151
dictionary (ESD)
116
length attribute reference 44
ordinary 37
previously defined 40
sequence 38,334
system variable symbol 278
table 37
variable 38
SET 318
symbolic parameter 260
symbol definition
in assembler language
instruction 38
mnemonic operation code by
OPSYN 232
using EQU instruction 155
symbol length attribute reference 44
(see also attribute)
symbolic address reference 84

symbolic linkage 147
symbolic parameter 260
attributes of 325,327
in body of macro definition 260,267
as macro in"struction operand
value 311,312
in macro prototype statement
operand 255,200
in model statement 266,267
in nested macro instruction 311-313
opposed to name field
parameter 256,292
symbolic representation 36,153
system macro
(see library macro definition)
system variable symbol 278
&SYSDATE 279
&SYSECT 280
&SYSLIST 281
&SYSNDX 284
&SYSPARM 284
&SYSTIME 287

II
TI (see type attribut~
term (sometimes called operand)
absolute 36
ordinary symbol 37
self-defining
46
symbol length attribute
reference 44
arithmetic
attribute reference 46,351
self-defining 46,351
variable symbol 38,352
logical 361
relocatable
location counter reference 41
ordinary symbol 27
terminal
to enter statements 1
input to the assembler 102
TITLE instruction 224
translation (see assembly)
truncation of constants 168
type attribute (TI)
328
in logical expression 361
in SETC operand 345
value 328
type subfield in DC/DS operand 169
twos complement
representation for negative
numbers 188

I!I
unary operator (+,-)
in absolute and relocatable
expressions 55
in arithmetic expressions 351,353
Index

449

unnamed control section 115
external symbol dictionary
entry for 116
initiation of 115
USING domain
.
address reference within 135
corresponding USING range 135
definition of 135
rules for 141
USING instruction. 134-144
for assigning base address 134
for assigning base registers 134
domain of 135
for establishing
addressability 134,137
range of 135
USING range
address within 135
corresponding USING domain 135
definition of 135
overlapping of 143
rules for 142

warning message 76
word
(see also full word)
alignment 166,75
boundary 166
length
wrap-around
(see also overflow)
of location counter 42
WXTRN instruction 152
external symbol dictionary
entry for 116
identifying external symbol 147,152
opposed to EXTRN instruction 152
for symbolic linkage 147

t3
variable symbol 38
(see also global variable
symbol, local variable
symbol)
as point of substitution 267
SET symbol 318
symbolic parameter 260
system variable symbol 278
&SYSDATE 279
&SYSECT 280
&SYSLIST 281
&SYSNDX 284
&SYSPARM 284
&SYSTIME 287
V-con (see V-type address
constant)
virtual storage
(see also in GLOSSARY)
allocation of
program loaded into 108
VM/370
service provided by 9
V-type address constant 198
for branching to external
control section 198,149
external symbol dictionary
entry for 116
identifying external symbol 198
opposed to EXTRN instruction 149
for symbolic linkage 147

450

X-con (see data constant,
hexadecima 1)

Y-con (see address constant,
Y-type)

Z-con (see decimal constant,
zoned)
zero suppression
in address values in listing
in SETA symbol values 346

42

This page left blank intentionally.

GC33-401 ()'5

o
en

<
en
I

o
o
en

<:
en
I

<
~

~
'-I

o

l>'
(II
(II

C'O.

3

C"
c;)

..,

o
CJ)

<

..CJ)

o

o
en

<

..C/)

<

~
W

'-I

.c=

."
..,
:;.

...
C'O

a.

:;.

c

en

}>

International Business Machines Corporation
Data Processing Division
1133 Westchester Avenue, White Plains, New York 10604
(U.S.A. only)
IBM World Trade Corporation
821 United Nations Plaza, New York, New York 10017
(International)

OS/VS-DOS/VSE-VM/370

READER'S
COMMENT
FORM

Assemble'r Language

GC33-4010-5

Your views about this publication may help improve its usefulness; this form
will be sent to the author's department for appropriate (Iction. Using this
form to request system assistance or additional publications will delay response,
however. For more direct handling of such request, please contact your
IBM representative or the IBM Branch Office serving your locality.

(')

C

-i

»

r

o
Z

C)

o

o

=1m
o

C

z

m

Reply requested:
Yes 0
No
0

Name:
Job Title: _ _...-_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
Address: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
____~~-------- Zip ______________

Thank you for your cooperation. No postage stamp necessary if mailed in the U.S.A. (Els~where, an IBM office
or representative will be happy to forward your comments.)

GC33-4010-5

Your comments, please •..
This manual is part of a library that serves as a reference source for systems analysts,
programmers, and operators of IBM systems. Your comments on the other side of this
form will be carefully reviewed by the persons responsible for writing and publishing
this material.
IBM may use or distribute any of the information you supply in any way it believes
appropriate without incurring any obligation whatever. You may, of course, continue
to use the information you supply.

n

c

~

o

:::tI
"T1

o

rFold

Fold

o

):-

........................................................................................................ 5
z
G')

First Class
Permit 40
Armonk
New York

!:
zm

Business Reply Mail
No postage stamp necessary if mailed in the U.S,A.

Postag~

will be paid by:

I nternational Business Machines Corporation
Department 813 L
1133 Westchester Avenue
White Plains, New York 10604

• • • ,_

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••

Fold

International Business Machines Corporation
Data Processing Division
1133 Westchester Avenue, White Plains, New York 10604
(U.S.A. only)
~

. IBM World Trade Corporation
821 United Nations Plaza, New York, New York 10017
(International)

e' • • • • • • • • • • • • • • • • • • ' • • • • • • • • • • • • • • • • • • • • • • • •

Fold

Appendix IV: Machine Instruction Mnemonic Codes

This appendix contains two tables of the mnemonic operation codes for all machine
instructions that can be represented in assembler language, including extended mnemonic
operation codes.
The first table is in alphabetic order by instruction.
order by operation code.

The second table is in numeric

In the first table is indicated: both the mnemonic and machine operation codes, explicit
and implicit operand formats, program interruptions possible, and condition code set.
The column headings in the fir,st table and the information each column provides follow:
Instruction: This colUmn contains the name of the instruction associated with the
mnemonic operation code.
Mnemonic Operation Code: This column contains the mnemonic operation code for the
instruction. This is written in the operation field when coding the instruction.
Machine Operation Code: This column contains the hexadecimal equivalent of the actual
machine operation code. The operation code will apppear in this form in most storage
dumps and when displayed on the system control panel. For extended mnemonics, this
column also contains the mnemonic code of the instruction from which the extended
mnemonic is d.erived.
Operand Format: This column shows the s~rubolic format of the operand field in both
explicit and implicit form. For both forms, Rl, R2, and R3 indicate general registers in
operand one, two, and three respectively. X2 indicates a general register used as an
index register in the second operand. Instructions which require an index register (X2)
but are not to be indexed are shown with a 0 replacing X2. L, Ll, and L2 indicate
lengths for either operand, operand one, or operand two respectively. Ml and M3 indicate
a 4-bit mask in operands one and three respectively. I, 12, and 13 indicate immediate
data eight bits long (I and I2) or four bits long (I3).
For the explicit format, Dl and D2 indicate a displacement and Bl and B2 indicate a base
register for operands one and two;
For the implicit format, Dl, Bl, and D2, B2 are replaced by Sl, and S2 which indicate a
storage address in operands one and two.
Type of Instruction: This column gives the basic machine format of the instruction (RR,
RX, SI, or SS). If an instruction is included ina special feature or is an extended
mnemonic, this is also indicated.
Program Interruptions possible: This column indicates the possible program interruptions
for this instruction. The abreviations used are: A - Addressing, S - Specification, OV Overflow, P - Protection, Op - Operation (if feature is not installed), and Other - other
interruptions which are listed. The type of overflow is indicated by: 0 - Decimal, E Exponent, or F - Fixed Point.
Condition code set: The condition codes set as a result of this instruction are indicated
in this column.
(See legend following the table.)

Appendix IV: Machine Instruction Mnemonic Operation Codes

391

Instruction

IOOSNseonlY

Add
Add
Add
Add
Add
-Add

Decimal
Halfword
Logical
Logical

Add
Add
Add
Add
Add

Mochine
Operation
Code

Implicit
Rl, 52(X2) or Rl, 52

36
6A
2A
7A
3A

AW
AWR
AU
AUR

6E
2E
7E
3E

R1, 02(X2, B2)or R1,02(, B2)
Rl,R2
R1, 02(X2, B2)ar R1,02(, B2)
Rl,R2

Rl, 52(X2)ar Rl, 52

N
NC
NR
NI

54
04
14
94

R1, 02(X2, B2)or R1,02(, B2)
01 (L, Bl), 02(B2)
Rl,R2
01(Bl),12

Rl, 52 (X2)or Rl, 52
51(L),52 or 51,52

BAL
BALR
BAS
BASR

45
05
40
00

Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2
Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2

Rl,52(X2)or Rl,52

BC
BCR
BCT
BCTR
BE
BER

47
07
46
06
47(BC 8)
07(BCR 8)

Ml, 02(X2, B2)or Ml ,02(, B2)
Ml,R2
Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2
02(X2, B2) or 02(,B2)
R2

5A
lA
FA
4A
5E
1E

Normalized, Extended
Normal ized, Long
Norma Iized, Long
Normalized, Short
Normalized, Short

Add
Add
Add
Add

Unnarmalized, Long
Unnormal ized, Long
Unnormal ized, Short
Unnormal ized, Short

.And
And
And
And

Logical
Logical
Logical
Logical Immediate
Link
Link
5ave
Save

Operand Format
Explicit
Rl, 02(X2, 62) or Rl, 02(,62)
Rl,R2
01 (Ll, 61), 02(L2, B2)
R1, 02(X2, 62)or R1,02(,62)
Rl, 02(X2, 62)or Rl, 02(,62)
Rl,R2
Rl,R2
Rl,02(X2,62)or Rl,02(,B2)
Rl,R2
Rl, 02(X2, B2)or Rl, 02(, B2)
Rl,R2

A
AR
AP
AH
AL
ALR
AXR
AO
AOR
AE
AER

51 (Ll), 52(L2)ar 51,52
Rl,52(X2)or Rl,52
Rl,52(X2)or Rl,52

Rl,52(X2)or Rl,52
Rl,52(X2)ar Rl,52

Rl, 52(X2)or Rl, 52

51,12

Branch
Branch
Branch
Branch

and
and
and
and

Branch
Branch
Branch
Branch
Branch
Branch

an
on
on
on
on
on

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

on High
on High
on Index High
on Index Low or Equal
on Low
on Law
if Mixed
if Mixed

BH
BHR
BXH
BXLE
BL
BLR
BM
BMR

47(BC 2)
07(BCR 2)
86
87
47(BC 4)
07(BCR 4)
47(BC 4)
07(BCR 4)

02(X2,B2)or 02(,B2)
R2
Rl, R3, 02(B2)
Rl,R3,02(B2)
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

on Minus
an Minus
on Not Equal
on Not Equal
on Not High
on Not High
on Not Low
on Not Low
if Not Mixed
if Not Mixed
on Not Minus
on Not Minus

BM
BMR
BNE
BNER
BNH
BNHR
BNL
BNLR
BNM
BNMR
BNM
BNMR

47(BC 4)
07(BCR 4)
47(BC 7)
07(BCR 7)
47(BC 13)
07(BCR 13)
47(BC 11)
07(BCR 11)
47(BC 11)
07(BCR 11)
47(BC 11)
07(BCR 11)

02(X2,B2)ar 02(,B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2,B2) or 02(,B2)
R2
02(X2,B2)or 02(,B2)
R2

Branch if Not Ones
Branch if Not Ones
Branch on No Overflow
Branch on No Overflow
Branch on Not Plus
Branch on Not Plus
Branch if Not Zeros
Branch if Not Zeros
Branch an Nat Zero
Branch on Not Zero
Branch if Ones
Branch if Ones
Branch on Overflow
Branch on Overflow

BNO
BNOR
BNO
BNOR
BNP
BNPR
BNZ
BNZR
BNZ
BNZR
BO
BOR
BO
BOR

47(BC 14)
07(BCR 14)
47(BC 14)
07(BCR 14)
47(BC 13)
07(BCR 13)
47(BC 7)
07(BCR 7)
47(BC 7)
07(BCR 7)
47(BC 1)
07(BCR 1)
47(BC 1)
07(BCR 1)

02(X2, B2)or 02(, B2)
R2
02(X2,B2) or 02(,B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2,B2) or 02(,B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2

Branch
Branch
Branch
Branch
Branch
Branch
Bran'ch
Branch

BP
BPR
BZ
BZR
BZ
BZR
B
BR

47(BC 2)
07(BCR 2)
47(BC 8)
07(BCR 8)
47(BC 8)
07(BCR 8)
47(BC 15)
07(BCR 15)

02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2

CLRIO
ClRP
C
CR
CS
CP
C05
CH
CL

9001
B215
59
19
BA
F9
BB
49
55

02(B2)
[)2(B2)
RI, 02(X2,B2)ar R1,02(, B2)
Rl,R2
Rl, R3, 02, (B2)
01 (L1, Bl), 02(L2, B2)
Rl, R3, 02(B2)
Rl, 02(X2, B2}ar Rl, 02(, B2)
RI, 02(X2, B2)or R1,02(, B2)

Rl, R3, 52
S1(Ll), 52 (L2)or 51,52
Rl, R3, 52
Rl,S2(X2)or Rl,52
Rl,S2(X2)ar Rl,52

01 (L, Bl), 02(B2)

SI(L),S2 or SI,52

Condition
Condition
Count
Count
Equal
Eq ua I

on Plus
on Plus
if Zeros
if Zeros
on Zero
on Zero
Unconditional
Unconditional

Clear I/O
.,
Clear Storage ~ajle
Compare Algebraic
Compare Algebraic
Compare and 5wap
Compare Oecimal
Compare Oauble and Swap
Compare Halfward
Compare Logical
Compare Logical

392

Mnemonic
Operation
Code

CLC

05

,

Rl,52(X2)or Rl,S2
Ml ,52(X2)or Ml,S2
Rl,S2(X2)or Rl,S2
52(X2) or 52
S2(X2) or S2
Rl, R3, 52
Rl,R3,52
52(X2) or 52
52(X2) or 52
52(X2) or 52
S2(X2) or S2
S2(X2) or S2
52(X2) or 52
S2(X2) or S2
S2(X2) or 52
52(X2) or 52
S2(X2) or S2
52(X2) or 52
S2(X2) or S2 .
S2(X2) or S2
S2(X2) or 52
S2(X2) or S2
S2(X2) or S2
52(X2) or 52
S2(X2) or S2
52(X2) or 52
52
52
Rl,S2(X2 or Rl,S2

Progrom Interruption
Possible

Ti'pe of
Instruction

Instruction

Imtruction

IpQSfY$EonJv

A S OvP Op Othe.

Add
Add
Add
Add
Add
Add

Decimal
Haifword
Logical
Logical

RX
RR
SS,Decimol
RX
RX
RR

Add
Add
Add
Add
Add

Normalized, Extended
Normal ized, Long
Normalized, Long
Normalized, Short
Normalized, Short

RR,Floating Pt.
RX, Floating Pt.
RR, Floating Pt.
RX, Floating Pt.
RR, Floating Pt.

x
x x
x
x x
x

E
E
E
E
E

x

Add
Add
Add
Add

Unnormalized, Long
Unnormalized, Long
Unnormalized, Short
Unnormalized,Shart

RX,Floating Pt.
RR, Floating PI.
RX,Floating Pt.
RR, Floating Pt.

x x E
x E
x x E
x E

And
And
And
And

Logical
Logical
Logical
Logical Immediate

RX
SS
RR
SI

x x
x

x

x

x

Link
Link
Save
Save

Condition Code Set

x x F

Sum~O

F
x

o

00

x

x

x x F
x x

Sum=O
Doh' Sum=O
Sum=O
Sum=O(8)
Sum~O(8)

01

10

1\

Sum0
Sum :>0
Sum :>0
Sum>O
Sum= 0Ci)
Sum= oCD

Overflow
Overflow
Overflow
Overflow
Sum 0 CD
Sum 0 CD

L

M

L

M
M

X

B,C
B,C
B,C
B,C
B,C

R
R
R
R
R

L
L
L

x
x
x
x

C
C
C
C

R
R
R
R

L
L
L
L

J
J
J
J

K
K
K

N
N
N
N

N
N
N
N

N
N
N
N

N
N
N
N

X
X
X

M
M

M
M
M
M

K

Branch
Branch
Bra nch
Branch

and
and
and
and

Branch
Branch
Branch
Branch
Branch
Bra nch

on
on
on
on
on
on

RX
RR
RX
RR
RX,Ext.Mnemonic
RR, Ext.Mnemonic

N
N
N
N
N
N

N
N
N
N
N
N

N
N
N
N
N
N

N
N
N
N
N
N

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

on High
RX, Ex t.Mnemonic;
on High
RR, Ext.Mnemonic
on Index High
RS
on Index Low or Equal RS
on Low
RX, Ext .Mnemonic
on Low
RR, Ext. Mnemonic
if Mixed
RX, Ext.Mnemonic
if Mixed
RR, Ext. Mnemonic

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N
N
N

N
N

N

N
N
N
N
N
N
N
N
N
N
N

N

N

N

N

N

N
N
N
N
N
N
N

N
N
N
N
N
N
N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

N
N
N
N
N
N
N
N

AAX

KK

Condition
Condition
Count
Count
Equal
Equa I

RX
RR
RX
RR

x
x

Branch on Minus
Branch on Minus
Branch on Not Equal
Branch on Not Equal
Branch on Not High
Branch on Not High
Branch on Not Low
Branch on Not Low
Branch if Not Mixed
Branch if Not Mixed
Branch on Not Minus
Branch on Not Minus

RX, Ext.Mnemonic
RR, Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext .Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic
RX,Ext.Mnemonic
RR,Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

RX, Ext.Mnemonic
RR, Ext.Mnemonic
RX,Ext.Mnemonic
RR,Ext.Mnemonic
RX, Ext,Mnemonic
RR, Ext.Mnemonic
RX,Ext.Mnemonic
RR,Ext.Mnemonic
RX, Ext .Mnemonic
RR, Ext .Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic

if Not Ones
if Not Ones
on No Overflow
on No Overflow
on Not Plus
on Not Plus
if Not Zeros
if Not Zeros
on Not Zeros
on Not Zeros
if Ones
if Ones·
on Overflow
on Overflow

N

N
N
N
N
N

gx, Ext.Mnemonic

Branch on Plus
Branch on Plus
Branch if Zeros
Branch if Zeros
Branch on Zero
Branch on Zero
Branch Unconditional
Branch Unconditional

RR, Ext .Mnemonic
RX, Ext.Mnemonic
RR, Ext .Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext.Mnemonic

Clear ~O
Clear. toroge Page
Compare AlgebraIc
Compare Algebraic
Compare and Swap
Compare Decimal
Compare Double and Swap
Compare Halfword
Compare Logical

S
S
RX
RR
RS
SS,Decimol
RS
RX
RX

Compare Logical

SS

A
.... x

x

x x
x x

x
x x
x x
x x

x x

I><

x

...

x

x
x

CC

EE

Z
Z
Z
Data Z
Z
Z
Z

AA

BB
BB

AA

BB
BB

Z

AA

BB

A,GB

AA
AAW
AA

BB

AAW
AA

Appendix IV: Machine Instruction Mnemonic Operation Codes

393

Instruction

IOOS/vSE

ooslVse onJv

INotOOS/VSe

IDos/Vse
DOSIVSe.onIV

ClM

80

Cli

95

Compare logical long

ClCl

OF

Rl, R2

CO
COR
CE
CER
CTP
CV8
CVO

69
29
79
39
80
4F
4E

R1, 02(X2, 82)or
I,R2
Rl ,02(X2, 82)or
I,R2
1,02(82)
R1, 02(X2, 82)or
R1, D2(X2, 82)or

8218
821C
50
10
FO
60
20
70
30

D2(82}
2(82)
R1, D2(X2, 82) or Rl, 02(,82)
Rl,R2
01, (ll, 61), D2(L2, 82)
Rl,02(X2,82),or Rl,02(,82)
RI,R2
R1, 02(X2, 82)or R1,02(,82)
Rl,R2

52
52
Rl, 52(X2)

Oivide Oecimal
Oivide, long
Oivide, long
Oivide, Short
Oivide, 5hort

DEP
DCTP
D
OR
OP
OD
OOR
OE
OER

Rl,52(X2)

or RI ,52

Edit
Edit and Mark
Exclusive Or
Exclusive Or
Exclusive Or
Exclusive Or Immediate
Execute

EO
EDMK
X
XC
XR
Xl
EX

OE
OF
57
07
17
97
44

51 (l), 52
51(l),52
Rl,52(X2)
51 (l), 52

or
or
or
or

51,12
Rl,52(X2)

Rl,52

Halve, long
Halve, Short
Halt Oevice

HOR
HER
HOV

Halt I/O

HIO

24
34
1
9E01
9EOOl

01 (l, Bl), 02(82)
01 (l, 81),02(82)
RI, 02(X2, 82) or Rl, 02(,62)
01 (l, Bl), 02(82)
RI,R2
01(81),12
RI, 02(X2, 82) or Rl, 02(,62)
Rl,R2
Rl,R2
01,Bl

Oeconfigure Page
Disconnect Page
Divide

15

Rl,R2
1, M3, 02(82)

Rl,M3,52
51,12
R1,02(,82)

Rl, 52(X2)or Rl, 52

Rl, 02(,82)

Rl, 52(X2)or Rl, 52

R1,02(,82)
R1, D2(, 82)

Rl,52
Rl, 52 (X2)or Rl, 52
R1, 52(X2)or Rl ,52

B4
43
8F
8208
09
58
18
41
12
22
32

Rl,R2
R1, 02(X2, B2) or Rl, 02(,62)
Rl, R2
R1, 02(X2, 62) or Rl, 02(,62)
Rl,R2
Rl,R2
Rl, R2

laad Complement
load Complement, long
load Complement, 5hort

lCR
lCOR
lCER

13
23
33

Rl,R2
Rl,R2
Rl,R2

load Control
load Frame Index
load Ha Ifword
load, long
load, lang
load Multiple
load Negative
load Negative, lang
load Negative, 5hort

lCn
lFI
lH
lO
lOR
lM
lNR
lNOR
lNER

87
B8
48
68
28
98
11
21
31

Rl, R3, 02(B2)
Rl.02(82)
R1, 02(X2, 82) or Rl, 02(,82)
R1, 02(X2, 82) or Rl, 02(,82)
Rl,R2
Rl ,R3, 02(82)
Rl,R2
Rl,R2
Rl,R2

load Pasitive
load Pasitive, long
load Positive, Short
load PSW
load Real Address
load Rounded, Extended
to long
load Rounded, long to Short
load, 5hort
Load, 5hort

lPR
lPOR
lPER
lPSW
lRA
lRDR

10
20
30
82
BI
25

Rl,R2
Rl,R2
Rl,R2
01 (81)
Rl,D2(X2,82) orRl,D2(,B2)
Rl, R2

LRER
lE
lER
MAD
MON
MC
MVC
MVI

35
78
38
8210
821E
AF
02
92

Rl, R2
Rl, 02(X2, 62) or Rl, 02(,62)
Rl.R2
02(82)
02 (B2)
01~1),12
01 l,81),02(82)
01(81),12

Address
and Test
and Test, long
and Test, 5hort

Make AddreS$able
Monitor Call
Move Characters
Move Immediate

IPS

or Rl ,$2

5 I (Ll), 52(L2) or 51,52
RI,52(X2)
or Rl,52

51,52
51,52
Rl, 52
51,52

51

1See Note 1 at end of
this appendix

01(81)

IC
ICM
IPK
ISK
l
lR
lA
lTR
lTOR
lTER

losertPagt. Bits
Insert Character
Insert Characters under Mask
Insert PSW Key
Insert Storage Key

onlv MakeUnaddressable

394

Implicit

Compare logical Characters
under Mask
Compare logical Immediate

load
load
load
load
load
load

IOOS/VSE only

Operand Format
Explicit

ClR

~ivide

loos/Vse only

M.ac Ine
Operation
Code

Compare Logical

Compare, long
Compare, long
Compare,5hort
Comp~re, 5hort
only Gonnect •. Page

1°C>S/VSE(mtv

Mnemonic
Operation
Code

Rl,02 (B2)
R1, 02(X2, 82) or Rl, 02(,82)
Rl. M3. 02(B2)

RI,52
Rl,52(X2)
Rl,M3,52

or Rl ,52

Rl,52(X2)

or Rl,52

Rl, S2(X2)

or Rl, S2

Rl, R3, 52
RI,S2
Rl,52(X2)
R 1, 52(X2)

or Rl ,52
or Rl, 52

R1, R3, 52

51
Rl,52(X2) or Rl,52

Rl, S2(X2)

or Rl, 52

SI,12
Sl(l),52
51,12

or 51,S2

Program Interruptions

Type of
Instruction

Instruction

A S Ov P Op

Compare Logical
Compare Logical Characters
under Mask
Compare Logical Immediate

RR
RS

x

SI

x

Compare Logi cal Long

RR

x x

RX, Floating Pt.
RR, Floating PI.
RX, Floating Pt.
RR,Floating Pt.
RS
RX
RX
S
S

x x
x x
x x
x
x x
x x
x x

Divide
Divide
Divide Decimal
Divide, Long
Divide, Long
Divide, Short
Divide, Short
Edit
Edit and Mark
Exclusive Or
Exclusive Or
Exclusive Or
Exclusive Or Immediate
Execute

RX
RR
SS, Decimal
RX,Floating Pt.
RR, Floating Pt.
RX, Floating Pt.
RR, Floating Pt.
55, Decimal
SS, Decimal
RX
SS
RR
SI
RX

x x
x
x x
x x
x
x x
x
x
x
x x
x

Halve, Long
Halve, Short
Halt Device
Halt I/O

RR, Floating Pt.
RR, Floating Pt.
S
5

Compare, Long
Compare, Long
Compare, Short
Compare, Short
OS/VSE only ; Connect Poge
Convert to Binary
Convert to Dec imal
DS/VSE only Deconfigure Poge
'JS/VSE only Disconnect Page

)S/VSE only Insert
Insert
Insert
Insert
Insert

Page Bits
Character
Characters under Mask
PSW Key
Storage Key

Load
Load
Load Address
Load and Test
Load and Test, Long
Load and Test, Short

00

Condition Code Set
10
01

Z

AA

XX

yy

BB
ZZ

Z

AA

BB

Z

AA

Z
Z
Z
Z
ABA
N
N

AA
AA
AA
AA
ABB
N
N

BB
BB
BB
BB
BB
ABC
N
N

ADB

ABE

I Possible

Other

x

RS
RX
RS
S
RR

x
x

x

x

x

x

x
x
x
x
x

A,GC
Data,F

x

)<

x

)<

x

x

x
x
x

E
E
E
E

X

x
x

x
x
x

AI.GC
A,GC

N
N
N
N
N
N
N

G

N
N

A,
A

N
N
AAM
DO

x
x
x

x

x

x

x x

RX
RR
RX
RR
RR, Floating Pt.
RR, Floating Pt.

Load Complement
Load Complement, Long
Load Complement, 910rt
Load Control
)S/VSE only Load Frame Index
Load Halfword
Load, Long
Load, Long
Load Multiple
Load Negative
Load Negative, Long
Load Negative, Short

RR
RR, Floating Pt.
RR, Floating Pt.
RS
RS
RX
RX, Floating Pt.
RR, Floating Pt.
RS
RR
RR, Floating Pt.
RR, Floating Pt.

Load Positive
Load Positive, Long
Load Positive, Short
Load PSW
It DOS/VSE load Real Address
Load Rounded, Extended
to Long
Load Rounded, Long to Short
Load, 910rt
Laod, Short
)S/VSE only Make·Addressable
)S/VSE only i. Make Unaddressable
Move Characters
Move Immediate

RR
RR, Floating Pt.
RR, Floating Pt.
SI
RX
RR,Floatlng'Pt.

x
x
x

N
N
N
N
N
N
N
S
S

N
N
CC
CC

N
N
AAL
GG

N

N

TT

N
SS

N

UU
A

A

x x

N

N

N

N

N
N
N

N
N
N
L
L
L

N
N
N
M
M
M

N
N
N

L
L
L
N
ABG
N
N
N
N
L
L
L

M
M
M
N
ASH
N
N
N
N

0

J

x
x

R
R

x
x
F

x
x
x x

x
x
x

x
x

KK

A

x

x

N
N

N
N
N
N
N
N
N
N
N
N
N
N
N
N
U
T
U
T
J
K
J
K
J
K
J
K
{May be set by this instruction}

F
F
D,Data
B, E
B,E
B, E
B, E
Data
Data

x

x
x x
x
x

11

A

A

P
R
R
N
ABF
N
N
N
N

x
x x
x
x x

x
x

x
x

x
x

R
R

x
x
x x

x
x

R
R

x x

x
x

)C

J

N
ABI
N
N
N
N

,;

RR, Floating PI.
RX,Floating Pt.
RR, Floating Pt.

S
5

SS
51

F

x E
x

x
x

A
A

x E
x
x

x
x
X

A,GC

x

x

AtGC

x

x
x

L
L

M
M
M

QQ

QQ

QQ

QQ

AAV
N

AAU
N

AAP
N

AAO
N

N

N
N
N

N

J

x
x

N
N
N
ADS
ASK
N
N

N

N
ABJ
ASL
N
N

0

N
N
.

N
N

N
N

Appendix IV: Machine Instruction Mnemonic Operation Codes

395

Instruction

Implicit

MVCl
MVN
MVO

OE
Dl
Fl

Rl,R2
D1(l, B1), 02(B2)
01(Ll, B1), 02(l2, B2)

Move Zones
Multiply
Multiply
Multiply Decimal
Multiply Extended
Multiply Halfword

MVZ
M
MR
MP
MXR
MH

03
5C
lC
FC
26
4C

01(l, B1), 02(B2)
Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2
o1(l 1, B1), 02 (L2, B2)
Rl,R2
Rl,02(X2, B2)or Rl,D2(,B2)

S1(l),S2
Rl,S2(X2)

Rl,S2(X2)

or Rl, 52

Multiply, Long
Multiply, Long
Multiply, Long to
Extended
Multiply, Long to
Extended
Multiply, Short
Multiply, Short
No Operation
No Operation
Or Logical
Or Logical
Or Logical
Or Logical Immediate
Pack

MO
MOR
MXO

6C
2C
67

Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2
Rl,02(X2,B2)or Rl,02(,B2)

Rl,S2(X2)

or Rl,S2

Rl,S2(X2)

or Rl,S2

MXOR

27

Rl,R2
Rl,S2(X2)

or Rl,S2

ME
MER
NOP
NOPR
0
OC
OR.
01
PACK

7C
3C
47(BC 0)
07(BC 0)
56
06
16
96
F2

Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2
02(X2, B2) or 02(, B2)
R2
Rl,02(X2,B2)or Rl,02(,B2)
o1(L, B1), 02(B2)
Rl,R2
o1(B 1), 12
01(Ll, B1), 02(L2, B2)

or 51,52
S1(l),S2
S1(Ll),S2(l2) or 51,52
or 51,52
or Rl,S2

S1(Ll),S2(L2) or 51,52

S2(X2)

or S2

Rl,S2(X2)
S1(L),S2

or Rl,52
or SI,S2

SI,12
S1(Ll),S2(L2) or SI,S2

PTLB

B200

-

-

RO~

RRB
RSP

85
B213
08

SI,12
SI
Sl,52

SP6
S-CK
SCKC
SPT
SPX
SPM
SPKA
SSK
SSM
SRP
SLDA
SLOL
SLA
SLL
SROA
SROL
SRA
SRL

65
B204
B206
6208
B210
04
B20A
08
80
FO
8F
80
8B
89
8E
8C
8A
88

01(81),12
01(81)
01 (, 81), 02(82)
or
01 (Bl), 02(62)
Rl,02(62)
01(B 1)
01(B1)
01(B 1)
02(B2)
Rl
O,(B,)
Rl,R2
01(81)
t:? 1(L 1, B1), 02(82), 13
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)
Rl,02(B2)

Signal Processor

SIGP

AE

Rl, R3, 02(B2)

Rl,R3,S2

Start I/O
Start I/O Fast Release

SIO
SIOF

9COO~

9COI

01(Bl)
01(B 1)

51
Sl

ST
STCAP
STlOC
STC

50
B21F
6203
42

Rl,02(X2,B2)or Rl,02(,B2)
02(82)
01(B1)
Rl,02(X2,B2)or Rl,02(,B2)

Rl,S2(X2) .~~Rl,S2
S2.:"··
51
Rl,02(X2) or Rl, 52

Purge Translation Lookaside
Buffer
Read Direct
Reset Reference Bit
y Retrieve Statu$ and Page
.

y Set eage Bits
Set Clock
Set Clock Comparator
Set CPU Timer
Set Prefix
Set Program Mask
Set PSW Key from Address
Set Storage Key
Set System Mask
Shift and Round Decimal
Shift Left Double Algebraic
Shift Left Double Logical
Shift Left Single Algebraic
Shift Left Single Logica I
Shift Right Double Algebraic
Shift Right Double Logical
Shift Right Single Algebraic
Shift Right Single Logical

Store
IOOS/VSEonIV 5toreCapocity Cou.,1's:
Store Channel 10
Store Character

396

Operand Format
Explicit

Move long
Move Numerics
Move with Offset

I Not DOS/VS E

r::::,

Mnemonic. tv\achine
Operation Operation
Code
Code

.

Rl,S2
SI
SI
51
S2
SI
SI
S1(Ll),S2,13 or SI,S2,13
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2

Store Characters under
Mask
Store Clock
Store Clock Comparator
Store Control
Store CPU address
Store CPU 10
Store CPU Timer
Store Halfword
Store Long
Store Multiple
Store Prefix
Store Short

STCM

BE

Rl ,M3, 02(B2)

Rl,M3,S2

STCK
STCKC
STCTL
STAP
STIOP
STPT
STH
STD
STM
STPX
STE

B205
B207
B6
B212
B202
B209
40
60
90
6211
70

01(B 1)
01(Bl)
Rl,R3,02(B2)
02(62)
01(81)
01(61)
Rl,02(X2,B2)or Rl,02(,B2)
Rl, 02(X2, B2)
Rl , R2, 02(B2)
02 (B2)
Rl,02(X2,B2)or Rl,02(,B2)

51
Sl
Rl, R3,S2
52
51
Sl
Rl,S2(X2) or Rl,S2
Rl,S2(X2) or Rl, S2
Rl,R2,S2
S2
Rl,S2(X2) or Rl,S2

Store Then AND System Mask
Store Then OR System Mask
Subtract

STNSM
STOSM
S

AC
AD
5B

01(Bl),12
01(81)~2
Rl,02 2)

Sl,12
Sl,12
Rl,S2(X2) or Rl,S2

Subtract
Subtract
Subtract
Subtract
Subtract

SR
SP
SH
SL
SLR

lB
FB
4B
SF
IF

Rl,R2
01(L 1,Bl), 02(L2,B2)
Rl,02(X2,B2)or Rl,02(,B2)
Rl,02(X2,B2)or Rl,02(,B2)
Rl,R2

Sl(Ll)(;S2(L2)or Sl,S2
Rl,S2 X2) or Rl,S2
Rl,S2(X2) orRl,S2

Decimal
Halfword
Logical
Logical

1See Note 2 at end of
this appendix

otOOS/VSE
otDOS/VSE
OSNSEonly
~S/VSE only

Program Interruptions
Possible
A 5 0, P Op Other

Type of
Instruction

Instruction
Move long
Move Numerics
Move with Offset

RR
SS
SS

x x
x
x

Move Zones
Multiply
Multiply
Multiply Decimal
Multiply Extended
Multiply Halfword

SS
RX
RR
SS, Decimal
RR, Floating Pt.
RX

x
x x
x
x x
x E
x x

Multiply, long
Multiply, long
Multiply, lonG!
Extended
Multiply, lon~
Extended
Multiply, Short
Multiply, Short
No Operation
No Operation
Or logical
Or logical
Or logical
Or logical Immediate
Pack

RX,Flooting Pt.
RR,Floating Pt.
RX,Flooting Pt.

x x E
x E
x x E

RR,Flooting Pt.
RX, Floating Pt.
RR,Flooting Pt.
RX,Ext.Mnemoni(
RR, Ext .Mnemonic
RX
SS
RR
SI
SS

Purge Translation Lookaside
- ..
Buffer
Read Direct
Reset Reference Bit
Retrieve Status and Page
Set Page Bits
Set Clock'
Set Clock Comparator
Set CPU Timer
Set Prefix
Set Program Mask
Set PSW Key from Address
Set Storage Key
Set System Mask
Shift Left Double Algebraic
Shift and Round Decimal

SI
S
SS
RS
S
S
S
S
RR
S
RR
SI
RS
SS

Shift
Shift
Shift
Shift
Shift

RS
RS
RS
RS
RS

left Double Logical
Left Single Algebraic
Left Single Logical
Right Double Algebraic
Right Double Logical

Shift Right Single Algebraic
Sh ift Right Single Logical
Signal Processor
Start I/O
Start I/O Fast Release
St()re ., .....,." ....... " .........."...... ,. ,
)S/VSE onl V ,?t9r~.CflP2,si!Y<';.?,!:!I'!,t~
Stare Channel ID
Store Character
Store Characters under
Mask
Store Clock
Store Clock Comparator
Store Control
Store CPU Address
Store CPU ID
Store CPU Timer
Store Halfword
Store Long
Store Multiple
Store Prefix
Store Short

S

Decimal
Halfword
Logical
Logical

x
x

x
x x
x

Data
B

x
x
x x

B
B
B

N
N
N
N
N
N

N
N
N
N
N
N

N
N
N

N
N
N

N
N
N

N
N
N

N

N

N

N

N
N
N
N
J
J
J
J
N

N
N
N
N
K
K
K
K
N

N
N
N
N

N
N
N
N

N

N

A

N

N

N

A
A
A

N
MQ
ABM
AAQ
ME
N
N

N
AAR

N
AAS

AAR
AAF
N
N

N
N

NAAT
ABN
MT
AAG
N
N

RR

RR

RR

RR

N
N
J
J

N
N
l
L

N
N
M
M

N
N
0
0

N
J
N
J
N

N
L
N
L
N

N
M
N
M
N

N
0
N

J
N
MY

l
N
MZ
CC
CC

M
N
EE
EE
EE

x

x x
x

x

x
x

x
x

x
x
x,
x
x x
x x
x x
x
x

x

x x
x
x F
x
D

x
x
x x

A
A
A
A
A
A
A
A
Data

x
F
x
x

x

x,x

"",.} x

Ie

MM

A

MM

Iii IA"i,

1,.·..-/<·... ,-';'.

x
~.

x
x

RS

x

x x

x
x x
x x

x x
x x
x x

x
x
x
x
x

x x
x x
x
x x
x
x
x x

x
x
x

x
x
x

P< x
P<
P<
P<

l' F

RR
P<

p<
p<

pc

F
D
F

A
A

S
S
RS
S
S
S
RX
RX,Flooting Pt.
RS
S
RX,Floating Pt.

RX
RR

N
N
N
N
N
N

B

x

~Decimal

N
N
N
N
N
N

B
B

x
x x
x x
x x

...

AAD
N
N

x

x

"

AAC
N
N

x

x

.~.

II

AAB
N
N

x E

RS
RS
RS
S
S
I,'~:'>

10

MA
N
N

x x E
x E

-

Store Then AND System Mask SI
Store Then OR System Mask SI
Subtract
RX
Subtract
Subtract
Subtract
Subtract
Subtract

x x

Condition Code Set
01

00

IA

A
A
A
A
A

.N

A
A

x x

Data

AAS

i,·····, ...

N

[ ...,.,' .

...-

..

N
N
HH
KK
KK
),..,... ", I.i

.•~. • ,., .

AAI
N

KK
N

N

N

N

N

MJ
N
N

AAK
N
N

AAN
N
N

AAG
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N
N
N
N
N

N

N

N

N

N
N
V

N
N
X

N
N
Y

N
N
0

V
V
V

X
X
,X

Y
Y
Y
V,I
V,I

0
0
0
W,I
W,I

A

x x
x x

iN . ,· .· .· ,· ',· ·

MH
N

N

W,H
W,H

Appendix IV: Machine Instruction Mnemonic Operation Codes

397

Instruction

398

Mnemonic Machine
Operation Operation
Code
Code

Operand Format
Expl icit

Implicit

Subtract Normalized,
Extended
Subtract Normalized, Long
Subtract Normalized, Long
Subtract Normalized, Short
Subtract Normal ized, Short
Subtract Unnormalized, Long

SXR

37

Rl,R2

5D
5DR
SE
5ER
5W

6B
2B
7B
3B
6F

Rl,D2(X2,B2)or Rl,D2(,B2)
Rl,R2
Rl,D2(X2,B2)or Rl,D2(,B2)
Rl,R2
Rl,D2(X2,B2)or Rl,D2(,B2)

Subtract Unnormalized, Long
Subtract Unnormalized, Short
Subtract Unnormalized, 5hort
Supervisor Call
Test and 5et

5WR
5U
5UR
5VC
T5

2F
7F
3F
OA
93

Rl,R2
Rl,D2(X2,B2)or Rl,D2(,B2)
Rl,R2
I
Dl (Bl)

51

Test Channel
Test I/O
Test Under Mask
Translate
Translate and Test

TCH
TIO
TM
TR
TRT

9F
9D
91
DC
DD

D1(Bl)
D1(Bl)
D1(B 1), 12
D1(L,B1),D2(B2)
D1(L, B1), D2(B2)

51
51
51,12
51(L),52
51 (L),52

Unpack
Write Direct
Zero and Add Decimal

UNPK
WRD
ZAP

F3
84
F8

D1(L 1, B1), D2(L2, B2)
D1(Bl),12
Dl (L 1, B1), D2(L2,B2)

51(Ll),52(L2)or 51,52
51,12
51(L1),52(L2)or 51,52

Rl,52(X2)

or Rl,52

Rl,52(X2)

or Rl,52

Rl,52(X2)

or Rl,52

Rl,52(X2)

or Rl, 52

or 51,52
or 51,52

Program Interruption
Possible

Type of
Instruction

Instruction

A
Subtract Normalized, Extended
Subtract Normalized, Long
Subtract Normalized, Long
Subtract Normalized, Short
Subtract Normalized, Short
Subtract Unnormaliezd, Long
Subtract Unnormailezd, Long
Subtract Unnormallzed, Short
Subtract Unnormalized, Short
Supervisor Call

RR,Floating Pt.
RX, Floating Pt.
RR, Floating Pt.
RX, Floating Pt.
RR, Floating Pt.
RX, Floating Pt.
RR, Floating Pt,
RX, Floating Pt.
RR, Floating Pt.
RR

Test and Set
Test Channel
Test I/O
Test under Mask
Translate
Translate and Test

SI
SI
SI
51
SS
SS

x
x
x

Unpack
Write Direct
Zero and Add Decimal

SS
SI
SS, Decimal

x
x
x

x
x
x
x

S

Ov P Op Other

x
x
x
x
x
x
x
x
x

E
E
E
E
E

x
x
x
x
x
x
x
x
x

I!
E
E
E

x

B,C
B,C
B,C
B,C
B,C
C
C
C
C

x
A
A
x

x
x
x x

0

A
Data

Condition Code Set

00

01

10

11

R
R
R
R
R
R
R
R
R
N

L
L
L
L
L
L
L
L
L
N

M
M
M
M
M
M
M
M
M
N

Q
Q
Q
Q
Q
Q
Q
Q
N

SS
JJ
LL
UU
N
PP

H,
II
CC
VV
N
NN

FF
EE

HH
KK

00

N
N
J

N
N
L

N
N
M

WW
N

N

N
N

0

Program Interruptions Possible
Under Ov:

Under Other:

0= Decimal
E = Exponent
F '" Fixed Point

A
B
C
0

Privileged Operation
Exponent Underflow
Significance
Decimal Divide

E
F
G
GA

Floating Point Divide
Fixed Point Divide
Execute
Monitoring

Condition Code Set
No carry
Corry
Result = 0
Result is not equal to zero
Result is less than zero
Result is greater than zero
Not changed
0 Overflow
Result exponent underflows
P
Q
Result exponent overflows
Result fraction = 0
R
Result field equals to zero
S
Result field is less than zero
T
Result field is greater than zero
U
Difference::; 0
V
W Difference is not euqal to zero
Difference is less than zero
X
Difference is greater than zero
Y
First operand equals second operand
Z
First operand is less than second operand
.AA
First operand Is greater than second operand
BB
CSW stored
CC
Channel and subchannel not working
DO
Channel or subchannel busy
EE
Channel operating in burst mode
FF
Page stat."
GB
GC Page transislon
GG Burst operation terminated
Channel not operational
HH
Interruption pending on channel
II
Channel available
JJ
Not operational
KK
Available
LL
MM I/O operation initiated and channel
proceeding with its execution
H
I
J
K
L
M
N

NN

00
PP
QQ
RR
SS

H
UU
VV
WW
XX
YY
ZZ
AM
MB
AAC
MD
ME
MF
MG
MH
MI
AAJ
MK
ML
MM
MN
MO
MP
MQ
MR

MS
Nonzero function byte found before
the first operand field is exhausted
AAT
AAU
Last function bytes are zero
MV
All function bytes are zero
AAW
Set according to bits 34 and 35 of the
new PSW loaded
Set according to bits 2 and 3 of the
MX
register specified by Rl
Leftmost bit of byte specified = 0
MY
Leftmost bit of byte specified = 1
Selected bits are all zeros; mask is all zeros MZ
ABA
Selected bits ore mixed (zeros and ones)
Selected bits are all ones
ABB
Selected bytes are equal, or mask in lero
Selected field of first operand is low
ABC
Selected field of first operand is high
ABO
First operand and second operand counts
ABE
are equal
ABF
First operand count is lower
ABG
First operand count is higher
No movement because of destructive overlop ABH
Clock value set
ABI
Clock value secure
ABJ
Clock not operational
ABK
Channel 10 correctly stored
ABL
Channel octivity prohibited during 10
ABM
Clock value is valid
ABN
Clock value not necessari Iy valid
Channel working with another device
Subchannel busy or interruption pendiflg
Clock in error state
Segment- or page-table length violation
Page-table entry invalid (I-bit one)
Reference bit zero, change bit zero
Reference bit zero, change bit one

Reference bit one, change bit zero
Reference bit one, change bit one
Segment table entry invalid (I-bit one)
Translation available
First and second hand operands equal,
second operand replaced by
the third operand
No operation is in progress for
the addressed device
Order code accepted
Status stored
Successful, block was disconnected,
index returned
Page was already disconnected,
index returned
Not successful, index returned
Page was connected
Page was already disconnected
Index returned, page is addressable
Index returned, page is connected
Index not returned, page is
d i sconn e cted
Index not returned, address is invalid
Page was already addressable
Page was addressable
Page was already connected
Save valid
Save invalid

Appendix IV: Machine InstruQtion Mnemonic Operation Codes

399

RR Format
Operation

Name

Mnemonic

Set Program Mask
Branch and Link
Branch on Count
Branch on Condition
Set Storage Key
Insert Storage Key
Supervisor Call

SPM
BALR
BCTR
BCR
SSK
ISK
SVC

OE
OF

Move Long
Compare Logical Long

MVCL
CLCL

10
11
12
13
14

Load Positive
Load Negative
Load and Test
Load Complement
AND
Compare Logical
OR
Exclusive OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract Logical

LPR
LNR
LTR
LCR
NR
CLR
OR
XR
LR
CR
AR
SR
MR
DR
ALR
SLR

Load Positive (Long)
Load Negative (Long)
Load and Test (Long)
Load Complement (Long)
Halve (Long)
Load Rounded (Exiended to Long)
Multiply (Extended)
Multiply (Long to Extended)
Load (Long)
Compare (Long)
Add Normalized (Long)
Subtract Normalized
Multiply (Long)
Divide (Long)
Add Unnormalized (Long)
Subtract Unnormalized (Long)

LPDR
LNDR
LTDR
LCDR
HDR
LRDR
MXR
MXDR
LDR
CDR
ADR
SDR
MDR
DDR
AWR
SWR

Load Positive (Short)
Load Negative (Short)
Load and Test (Short)
Load Complement (Short)
Halve (Short)
Load Rounded (Long or Short)
Add Normalized (Extended)
Subtract Normalized (Extended)
Load ( Shor t )

LPER
LNER
LTER
LCER
HER
LRER
AXR
SXR
LER

Remarks

Code

00
01
02
03
04
05
06
07
08
09

OA
OB
OC

15
16

17
18
19
lA
IB
lC

10
IE
IF

20
21
22
23
24

25
26
27
28
29

2A
2B
2C
2D
2E
2F
30

31
32
33
34

35
36
37
38

Appendix IV: Machine Instruction Mnemonic Operation Codes

401

RR Format
Name

Mnemonic

Compare (Short)
Add Normalized (Short)
Subtract Normalized (Short)
Multiply (Short)
Divide (Short)
Add Unnormalized (Short)
Subtract Unnormalized (Short)

CER
AER
SER
MER
DER
AUR
SUR

4B
4C

Store Halfword
Load Address
Store Character
Insert Character
Execute
Branch and Link
Branch on Count
Branch on Condition
Load Halfword
Compare Halfword
Add Halfword
Subtract Halfword
Multiply Halfword

STH
LA
STC
IC
EX
BAL
BCT
BC
LH
CH
AH
SH
MH

4E
4F

Convert to Decimal
Convert to Binary

CVD
CVB

50
51

Store

ST

AND
Compare Logical
OR
Exclusive OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract Logical

N

Operation
Code

39
3A
3B
3C
3D
3E
3F
RX Format
40

41
42
43

44
45
46

47
48
49
4A

52

53
54
55
56
57
58
59
SA
5B
5C
5D
5E
SF

60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F

402

CL

o

X

L
C
A

S
M
D

AL
SL

Store (Long)

STD

Multiply (Long to Extended)
Load (Long)
Compare (Long)
Add Normalized (Long)
Subtract Normalized (Long)
Multiply (Long)
Divide (Long)
Add Unnormalized (Long)
Subtract Unnormalized (Long)

MXD
LD
CD
AD
SD
MD
DD
AW
SW

Remarks

RX Format
Operation

Name

Mnemonic

Store (Short)

STE

Load (Short)
Compare (Short)
Add Normalized (Short)
Subtract Normalized (Short)
Multiply (Short)
Divide (Short)
Add Unnormalized (Short)
Subtract Unnormalized (Short)

LE
CE
AE
SE
ME
DE
AU
SU

Remarks

Code
70
71
72
73
74
75
76
77
78
79

7A
7B
7C
7D
7E
7F

RS,SI, and S Format

80
81
82
83
84
85
86
87
88
89
8A

8B
8C
8D

8E
8F
90

91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F

Set System Mask

SSM

Load PSW
Diagnose l
Wr"i te Direct
Read Direct
Branch on Index High
Branch on Index Low or Equal
Shift Right Single Logical
Shift Left Single Logical
Shift Right Single
Shift Left Single
Shift Right Double Logical
Shift Left Double Logical
Shift Right Double
Shift Left Double

LPSW
WRD
RDD

BXH
BXLE
SRL
SLL
SRA

SLA
SRDL
SLDL
SRDA
SLDA

Store Multiple
Test under Mask
Move (Immedia'te)
Test and Set
AND (Immediate)
Compare Logical (Immediate)
OR (Immediate)
Exclusive OR (Immediate)
Load Multiple

STM
TM
MVI
TS
NI
CLI
OI
XI
LM

Start I/O, Start I/O Fast Release
Test I/O
Halt I/O, Halt Device
Test Channel

SIO,SIOF
TIO
HIO,HDV
TCH

See Note 2
See Note 1

AO
Al
A2
A3
A4
A5
A6

Appendix IV: Machine Instruction Mnemonic Operation Codes

403

RS,SI, and S Format
Operation

Name

Mnemonic

Code
A7
A8
A9
AA

AB
AC
AD
AE

Store Then AND System Mask
Store Then OR System Mask

STNSM
STOSM

AF

BO
Bl
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF

CTP
Connect Page
LRA
Load Real Address
(First byte of two~byte operation codes)
Insert Page Bits
Set Page Bits
Store Control
Load Control
Load Frame Index

IPB
SPB
STCTL
LCTL
LFI

Compare Logical Characters under Mask
Store Characters under Mask
Insert Characters under Mask

CLM
STCM
ICM

Move Numerics
Move (Characters)
Move Zones
AND (Characters)
Compare Logical (Characters)
OR (Characters)
Exclusive OR (Characters)
Retrieve Status and Page

MVN
MVC
MVZ
NC
CLC
OC
XC
RSP

Translate

TR

SS Format
CO
Cl
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF

I

DO
Dl
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC

404

Remarks

SS Format
Operation

Name

Mnemonic

Translate and Test
Edit
Edit and Mark

TRT
ED
EDMK

Shift and Round Decimal
Move with Offset
Pack
Unpack

SRP
MVO
PACK
UNPK

Zero and Add Decimal
Compare Decimal
Add Decimal
Subtract Decimal
Multiply Decimal
Divide Decimal

ZAP
CP
AP
SP
MP
DP

Remarks

Code
DD
DE
DF
EO
El
E2
E3
E4
E5
E6
E7
wa
E9
EA
EB
EC
ED
EE
EF
FO
Fl
F·2
F3
F4
F5
F6
F7
Fa
F9
FA
FB
FC
FD
FE
FF

NOTES
1. Under the System/370 architecture, the machine operations for Halt Device and Halt
I/O ar,e as follows:
11001

1110

XXXX

xxxol

Halt I/O

HIO

~OOI

1110

XXXX

XXXII

Halt Device

HDV

eX denotes an ignored bit position)

Appendix IV: Machine Instruction Mnemonic Operation Codes

405

2. Under the System/370 architecture, the machine operations for Start I/O and Start
I/O Fast Release are as follows:'
1001 1100 XXX X XXXO Start I/O

SIO

1001 1100 XXX X XXX1 Start I/O Fast Release

SIOF

(X denotes an ignored bit position)

Operation
Code

Name

Mnemonic

AE
BA
BB
9D01
B202
B203
B204
B205
B206
B207
B208
B209
B20A
B20B
B20D

Signal Processor
Compare and Swap
Compare Double and Swap
Clear I/O
Store CPU ID
Store Channel ID
Set Clock
Store Clock
Set Clock Comparator
Store Clock Comparator
Set CPU Timer
Store CPU Timer
Set PSW Key from Address
Insert PSW Key
Purge Translation
Lookaside Buffer
Set Prefix
Store Prefix
Store CPU Address
Reset Reference Bit
Clear Page
Deconfigure Page
Disconnect Page
Make Addressable
Make Unaddressable
store Capacity Counts

SIGP
CS
CDS
CLRIO
STIDP
STIDC
SCK
STCK
SCKC
STCKC
SPT
STPT
SPKA
IPK

B210
B211
B212
B213
B2l5
B2lB
B2lC
B2lD
B2lE
B2lF

406

PTLB
SPX
STPX
STAP
RRB
CLRP
DEP
DCTP
MAD

MUN
STCAP

~-;-~ /

Technical Newsletter

This Newsletter No.
Date
Base Publication No.
File No.
Prerequisite Newsletters

GN20-9372
28 December 1981
GC33-40 10-5
S370-21
None

OSjVS-DOSjVSE-VMj370 Assembler Language
© IBM Corp. 1972, 1979

This technical newsletter, a part of Release 4 of OS/VS1, Release 3 of OS/VS2, Release 2 of VM/370,
and DOS/VSE, provides replacement pages for the subject publication. These replacement pages remain
in effect for any subsequent releases unless specifically altered. Pages to be inserted and/or
removed are:
cover, ii
vii, viii
xi, xii
135
139, 140
167-170
189, 190
223,224
279,280
285,286
291,292
297,298
305,306
327-330
333,334
391-408
447,448

A change to the text or to an illustration is indicated by a vertical line to the left of the change.
Summary of Amendments
This technical newsletter contains maintenance changes.
Note: Please file this cover letter at the back of the manual to provide a record of changes.

IBM Corporation, P.O. Box 50020, Programming Publishing;.San Jose, California 95150
Printed in U.S.A.



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2012:06:08 14:22:43-08:00
Modify Date                     : 2012:06:08 18:50:51-07:00
Metadata Date                   : 2012:06:08 18:50:51-07:00
Producer                        : Adobe Acrobat 9.51 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:1599d36a-1397-47e1-9026-f30bbe0ea815
Instance ID                     : uuid:3c17a610-bf15-4fe5-a777-3bc58d75b90b
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 470
EXIF Metadata provided by EXIF.tools

Navigation menu