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: 468

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
GC33-4010-5
File No. 5370-21

o
"

Systems

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

o

o

---- ----_.-

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

Page of GC33-40 10-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 OS/VS1, Release 3 of OS/VS2, Release 2 of VM/370, DOS/VSE, 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-000 1, 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, progr'1mming, 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

o:~

Read This First

This manual describes the OS/VS - DOS/VSE - VMj370 assembler
language.
The OS/VS - VM/370 assembler languag~ offers the following improvements
over the 08/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

4.

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

The 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 DOS/VS assembler language over the OOS/360 assembler
language as processed by the D assembler.
NOTE: Sections I through L, describing the macro facility and the
conditional assembly language, have been expanded to include more
examples and detailed descriptions.
Note for VM/370 Users
The 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.
Where 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

o

COMPARISON OF ASSEMBLERS
Assemblers

Language Fe~ur~
OOS/360 (0)

OS/360 (F)

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

231 .,

C4E

32
10

number of digits
binary:
decimal:
hexadecimal:
character:

24

24

24

8
6

8
6

8
6

8

3

3

3

4

no
truncated to
24 bits

yes
truncated to
24 bits

no
truncated to
24 bits

yes
31 bits

number of operators:
levels of parentheses:

15
5

15

15

5

5

19
6

5.

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

ALIGN/
NOALIGN
option not
allowed

constants
notaJigned

constants
aligned

constants
not aligned

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

4.

7.

8.

Relocatable and Absolute Expressions
unary operators allowed:
value carried:

C6B

02

D1H

E1A

END Instruction
generated or copied END
instructions:

I

OOS/VSE

OS/VS VM/370

9.

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

10.

External Symbol Dictionary Entries
maximum allowed:

255

511

255

399
(including
entry symbols
identified by
ENTRY)

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
Cl'rrent 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:

E2G

G2A

1v

G3B

COMPARISON OF ASSEMBLERS

b

Assemblers

Language Feature
DOS/360 (D)
15.

Bit-length specification allowed:

16.

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

yes

OSNS-

Described in

VM./370
yes

G3B
G3C

I

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.

Q.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

23_

no

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

ves

26.

mixing positional and keyword:

27.
28.
29.

30.

31.

o

yes

no

OS/360 (F)

yes

17.

()

DOSNSE

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
Assemblers

Language Feature

!

00S/360 (0)
33.

34.

35.

36.

SET Symbol Declaration
global and local mixed:

OOS/VSE

Described in

.... ,---

OS/360 (F)

OS/VS -

L2
no, global must
precede local

no, global must
precede local

no, global must
precede local

yes

global and local must immediately follow prototype statement, if in macro definition:

yes

yes

yes

no

must immediately follow any source
macro definitions, if in open code:

yes

yes

yes

no

255

4095

2500

32,767

no

no

no

yes

a

255

a

255

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:

3a.

Options for Assembler Program
ALIGN
ALOGIC
MCALL
EDECK

MLOGIC
L1BMAC

L2

L3B

L4A
no
16

yes
16
5

no
16

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

5

vi

5

yes
up to 25
up to 11
L6C

02
La
JaB
Order No.
GC33-4024
La
JaA

Page of GC33-40 10-5
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 its use.
The manual is not intended as a text for learning the assembler language.

Who This Manual Is For
This 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 (aside from the
nlntroduction W and the Appendixes) :

o

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 ~xcept 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 Systern/360 languages.

o
vii

Page of CC3 3-40 1o-S
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.
-

USING

Tab .

OS-DOS DIFFERENCES: Wherever the OS/VS and DOS/VS 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/37Q
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 Commdttee X3.

References You May Need
You may want to refer to
11311 System/370 Principles of Operation, GA22-7000, or 18H 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

o

Contents

56
57
58
59
60

9
10

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

61

10
10
10

SECTION D: MACHINE INSTRUCTIONS •

1

WHAT THE ASSEMELER DOES • • ••
-- THE ASSEMBLER LANGUAGE • • • ••
Machine Instructions • • •
Asse~bler 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 • • • • • • • •

1
2
2.
3
3

A1

A2

A3

A4

-0

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

SECTION A: INTRODUCTION • • • • • • ••

PART I: CODING AND STRUCTURE • • • ••

C4C

3

4
5
5
8
9

11
11
11
13

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

CODING SPECIFICATIONS • • • •
B1A -- Field Boundaries • • • •
The Statement Field • • • • • •
The Identification-Sequence
Field •• • • • • • • • •
The Continuation Indicator
Field •• • • • • • • • • •
Field Positions • • • • •
Bla -- Continuation Lines • • • • •
alC -- Comments Statement Format ••
B1D -- Instruction Statement Format
Fixed Format • • • • • • • • • •
Free Format • • • • • • • • • •
Formatting Specifications • • •

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

SECTION C: ASSEMBLER LANGUAGE STRUCTURE 25

o

Cl -- 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 • • • • • ••
Restrictio~s on Symbols • ••
C4E -- Location Counter Reference.

• 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 • • • • •
EXAMPLES OF COCEC MACHINE
06
INSTRUCTIONS • • • • •
RR Format
RX Format ••

11

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

44
46
46
50
53
53
55

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 • • • • •
SI Format • • • • •
S Format • • • • • •
SS Format • • • • •

• • • • • • 9q
• • • • ••
95
• • • • • • 96
• • •
97

PART III: FUNCTIONS OF ASSEMBLER
INSTRUCTIONS • • • • • • • • • • • • •
SECTION E:

PROGRAM SECTIONING •

F2

99
101

SECTION G: SYMBOL AND DATA DEFINITION

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 Cifferent processing
Times • • • • • • • • • • • 108
E2B -- Types • • • • • • • • • • • 110
Executable Control Sections • • 110
110
Reference Control Sections • •
Location Counter Setting • • 111
E2C
113
E2D - T First Control Section • • •
The Unnamed Control Section 115
E2E
Literal pools in Control
E2F
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 • • • •
12q
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 •
• 1qq
ADDRESSING BETWEEN SOURCE MODULES:
SYMBOLIC LINKAGE • • • • • •
lq7
How to Establish Symbolic
Linkage • • • • • • • • • • • • lq7
F2A
The ENTRY Instruction • • •
150
F2B
The EXTRN Instruction • • • 151
F2C -- The WXTRN Instruction • • •
152
153

Gl -- ESTABLISHING SYMBOLIC
REPRESENTATION
• • • • • • • • 153
Assigning Values • • • • • • •
15q
Defining and Naming Data • • • 154
DEFINING SYMBOLS • • • • • • • • 155
G2
G2A -- The EQU Instruction • • • • 155
G3 -- DEFINING DATA • • • • • • • • •
161
G3A -- The DC Instruction • • • • • 162
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
Subfield 2: Type. • • • • • • 169
Subfield 3: Modifiers • • • • • 170
Subfield q: 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) • • • • • • • • • 186
Decimal Constants (P and Z)
188
G3H
Floating-Point Constants
G3I
(E, D and L) • • • • • • • • 190
The A-Type and Y-Type Address
G3J
Constants • • • • • • • • •
194
The S-Type Address Constant 196
G3I<
The V-Type Address Constant 198
G3L
G3M
The Q-Type Address Constant 200
G3N
The DS Instruction • • • • • 201
How to Use the rs Instruction • 201
Specifications • • • • • • • • 206
G30 -- The CCW Instruction • • • • 209
SECTION H: CONTROLLING THE ASSEMBLER
PRO~RAM • • • • • • • • • • •

ADDRESSING. • • • • • • • 133

Hl -- STRUCTURING A PROGRAM • •
H1A -- The ORG Instruction •
H1B -- The LTORG Instruction •
The Literal Pool • • • • •
,
Addressing Considerations • • •
Duplicate Literals • • • • • •
Specifications • • • • • • • •
H1C -- The CNOP Instruction • •
H2 -- DETERMINING 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

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

0,
I".

'.Y

x

".'

Page of GC33-4010-5
As Updated 28

o

D~\.·

By TNl 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 Easic 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 rEFINITION •
• 251
J 1A -- Purpose • • • • • • • • • •
251
J1E -- Specifications
• 252
Where 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
• 265
and Keyword Parameters
266
J4 -- MODEL STATEMENTS • • • • •
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

o

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
Sta tements • • • • • • • • •
•
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
K2
E N T R I E S . . . . . . . . . . . . 292
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
K4 -- SUBLISTS IN OPERANDS • • • • • • 300
K5 -- VALUES IN OPERANDS • • • •
302
K6 -- NESTING IN MACRO DEFINITIONS • • 307
K6A -- Purpose • • • • • •
307
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 CONDITIONAL ASSEMBLY
• • • 317

•••
L1 -- ELEMENTS AND FUNCTIONS
L1A -- SET Symbols • • • • • •
The Scope of SET Symbols •
Specifications • • • • • •
Subscripted SET Symbols Specifications • • • •
L1B -- Data Attributes • • • •
What Attributes Are. • • •
L1C -- Sequence Symbols • • • • • •
xi

317
318
319
320
322
323
323
334

198!

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, GELS, 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
Arithmetic (SETA)
Expressions • • • • • • • •
L4B -- Character (SETC) Expressions
L4C -- Logical (SETS) Expressions •
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 • • • • • • • • • •
L 7A -- Purpose • • • • • • • • • •
L7B -- Specifications • • • • • • •
L8 -- LISTING OPTIONS • • • • • • • •

336

APPENDIX I:

336

APPENDIX II:

CHARACTER CODES • •

.377

HEXADEClMAL-DECI~.AL

CONVERSION TABLE
340
343
343
345
347
349
349
355
359
364
364
367
367
369
370
373
374
374
374
376

APPENDIX III:

~ACHINE

FOR~AT

IAPPENDIX IV:

383

INSTRUCTION
• •

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

""
C
xii

,

I

I'

I."

o

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 assembler language is a
symbolic prograa~ing language that ypu 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 ~ake 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 tefore 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

o

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 scun:e
deck. This dec'k, also known as a source module, is the
input to the assembler.
(You can also enter a source
module as input to the assembler through a terminal.)
The assembler' processes your source module and produces
an object module in rrachine language (called object cede).
Assume that the assembler punches this object module into
a deck of cards called the object deck.
The object deck or object module can be used as input to
be processed by another processing program, called the
linkage editor. lhe linkage editor produces a load module
that can be loaded later into the main storage of the
computer, which then executes the program. Your source
module and the object code produced is printed, alcng with
other information on a program listing.

Al - The Assembler Language
The assembler language is the symbolic prograrrroing language
that lies closest to the machine language in form and
content. You will, therefore, find the asserrbler language
useful when:
• ¥ou need to control your program closely, down to the
byte and even bit level or
• you must write subrcutines for functions that are not
provided by other symbolic programroing languages such as:
ALGOL, COBOL, FORTRAN, or PI/I.
The assembler language is made up of statements that
represent instructions or comments. The instructicn
statements are the working part of the language and are
divided into the following three groups:
1. Machine instructions

2. Assembler instructions
3. Macro instructions.

Machine Instructions
A machine instruction is the symbolic representation of
a machine language instruction of the IBM Systerr/370
instruction set. It is called a machine instruction because
the assembler translates it into the machine language cede
which the computer can execute. Machine instructions are
described in FART IIi SECTION t of this manual.
2

o

Assembler Instructions

An assembler instruction is a request to the asserrbler
program to ~erform certain operations during the assembly
of a source module, for example, defining data constants,
defining the end of the source module, and reserving storage
areas. Except for the instructions that define consta nts,
the assembler does not translate assemtler instructions
into object code. !he assembler instructions are described
in PART Ill; SECTIONS E, F, G, and H and PAR~ IV; SECTIONS
J, K, and L of this manua 1.

Macro Instructions
A macro instruction is a request to the assembler program
to process a predefined sequence of code called a nacro
definition. From this definition, the assembler generates
machine and assembler instructions which it then ~rocesses
as if they were part of the original input in the source
module.
IBM supplies macro definitions for input/output, data
management, and supervisor operations that you can call
for processing by coding the required macro instructi~n.
('I'hese IBM-supplied macro instructions are not described
in this manua 1. )
You can also prepare your own macro definitions and call
them by coding the corresponding macro instructions. This
macro facility is introduced in PART IV; SECTION I. A
complete description of the macro facility, including the
macro definition, the macro instruction and the conditional
assembly language, is given in PART IV; SECTIONS J, K, and
L.

A2 - The Assembler Program

c

The assembler ~rogram, also referred to as the -assembler-,
processes the maqpine, assembler, and macro instructi~ns
you have coded in theassemtler language and produces an
object module in mac_hiqe _language.

Section A:

Introduction

3

A2A - ASSEMBLER PROCESSING SEQUENCE

The assembler processes the three types of assembler
language instructions at different times during its
processing sequence. You should be aware of the assembler's
processing sequence in order to code your program correctly.
The figure below relates the assembler processing sequence
to the other times at which your program is processed and
executed.
TIMES
PROGRAMMER

Coding
Time

Pre-Assembly
TitTle

ASSEMBLER

Assembly
Time

Linkage
Edit
Time

Program
Fetch
Time

Execution
Time

•

4

LOADER
can combine
linkage editing
and loading
operations
OS only

CPU of
COMPUTER

The assembler processes most instructions on two occasions;
first at ere-assembly time and later at assembly time.
•
HOwever, 1t does some processing, for example, macro
processing, only at pre-assembly time.

•

•

•
•
•

LINKAGE
EDITOR

I

The assembler also produces information for other
processors. The linkage editor uses such information at
linkage-edit time to combine object modules into load
modules. The loader loads your program (combined load
modules) into virtual storage (see GLOSSARY) at program
fetch time. Finally, at execution time, the computer
executes the object code produced by the assembler at
assembly t i n e . '

•

o

Machine Instruction Processing

The assembler processes all machine instructions and
translates them into oeject code at assemely tine, as shewn
in the figure below.

TIMES

Machine
Instructions

Coded

Assembled
into
object code

Linkage
Edit

Program
Fetch

Executed
Execution

Assembler Instruction Processing

Assembler instructions are divided into two «ain

o

ty~es:

1. Ordinary assembler instructions
2. Conditional assembly inst.r.octions anCt the macro
processing instructions ~ACRO, MENr, MEXl~ and MN01a •
Section A:

Introduction

5

~

The assembler processes ordinary assemtler instructions
at asserrbly time, as shown in the figure below •

TIMES

•

Ordinary
Assembler
Instructions and
assembly
time
expressions

•

ENTRY
EXTRN
WX?RN

DC
DS
CCW

Address constants

PUNCH
REPRO

.'

Coding
...•.•........•.

'e;
......

Pre-Assembly

.'<

Assembly

FuHy
pr~,
..

G
Linkage Edit

Provide
link.
information

V

C8nprov~

link.

oommarldJ.

...........

Program Fetch

PrtWid6·

hotd

acfdr~·••.. . . . .
Execution

'Dat.• .,..

A~"

AreasU$td

used in .

in execU-

executlQn o'f\

tionef

machine
instructiOfij:

maet\inEI inst:

NO'IES:

•
~

6

1. The assembler eva lua tes absol ute and relocatable
expressions at assembly time; they are sometimes called
asserocly tirre expressions.

2. Some instructions produce output for processing after
asserrcly tirre.

o

•

The assembler processes conditional asserotly instructicns
and macro processing instructions at pre-assembly time,
as shown in the figure telow.

TIMES

•

Conditional Assembly
(and macro processing)
instructions and
conditi?nal assembly
ex pressl~on1ifs~Y7:?Y;Y;;]

MNOTE

Coding

Pre-Assembly
Fully
processed

Assembly

•

statements

Linkage Edit

Program Fetch

Execution

NOTES:

o

•
•

1. The asserobler evaluates the conditional assembly
expressions (arithmetic, logical, and character) at
asserobly tirre.

~re­

2. The assembler processes the machine and asserrbler
instructions generated from pre-assembly processing at
assembly time.
Section A:

Introduction

7

~acro

•

Instruction Processing

The assembler· processes macro instructions at pre-assembly
time, as shown in the figure below.

Macro
Instructions

TIMES

Macro
Definitions

Coding

Pre-Assembly
Fully

Processed

Assembly
Generated
Statements

Linkage
Edit

Program
Fetch

Execution

•

NOTE: The assembler processes the machine and ordinary
assembler instructions genera ted from a macro definition
called by a macro instruction at assembly t~rre.
The assembler prints in a program listing all the
information it produces at the various processing tiues
described in the above figures.

8

c)

A3 - Relationship of Assembler to Operating System
The assembler is a programming component of the OSjVS,
VM/370, or DOS/VS. These system control programs provide
the assembler with the services:

•

For assembling a source module and

•

For running the assembled otject module as a

progxa~.

In writing a source module you must include instructions
that request the desired service functions from the
operating system.
Services Provided by the Operating System
OS/VS and DOSjVS provide the following services:
1. For assembling the source module:
a.

A control program

b. Libraries to contain source code and macro
definitions
c.

'(",:
,/

Utilities

2. For preparing for the execution of the assembler program
as represented by the otject module:
a.

A centrol program

b.

Storage allocation

c.

Input and output facilities

d.

A linkage editor

e.

A loader.

VM/370 provides the following services:
1.

For assembling the source module:
a.

An interactive control program

b.

Files to contain source code and macro definitions

c.

Utilities.

2. For preparing for the execution of the assembler programs
as represented by the object modules:

0 ';

a.

An interactive control program

b.

Storage allocation

c.

Input and output facilities

d.

The eMS Loader.

'"

Section A:

Introduction

9

A4 - Coding Aida

It can be very difficult to write an assembler language
program using only machine instructions. The assembler
provides additional functions that make this task easier.
They are surrmarized belew.
Symbolic

Re~resentation

of Program Elements

Symbols greatly reduce programming effort and errcrs.
You can define symbols to represent storage addresses,
displacements, constants, registers, and almost any elerrent
that makes up the assembler language. These elements
include o~erands, operand subfields, terms, and expressions.
Symbols are easier to remember and code than numbers;
moreover, they are listed in a symbol cross-reference table
which is printed in the program listings. Thus, you can
easily find a symbol when searching for an error in your
code.

Variety of rata Representation
You can use decimal, binary, hexadecimal or character
representation which the assembler will convert fer you
into the binary values required by the machine language.

Controlling Address Assignment
If you code the a~pro~riate assembler instruction, the
assembler will compute the displacement from a base address
of any symbolic addresses you specify in a machine
instruction. It will insert this displace~ent, along with
the base register assigned by the assembler instruction,
into the object code of the machine instruction.
At execution time, the object code of address references
must be in the base-displacement form. The computer obtains
the required address by adding the displacement to the
base address contained in the base register.

10

o

Relocatability
The assembler produces an object module that can be
relocated fro~ an originally assigned storage area to any
other suitable virtual storage area without affecting
program execution. This is made easier because most
addresses are assembled in their base-displacement forn.
Segmenting a program
You can divide a source module into one or more control
sections. After assembly, you can include or delete
individual central sections from the resulting object
module before you load it for execution. Control secticns
can be loaded separately into storage areas that are not
contiguous.

Linkage Between Source Modules
You can create symbolic linkages tetween separately
assembled scurce modules. lhis allows you to refer
symbolically from one source module to data defined in
another seurce module. You can also use symbolic addresses
to branch between modules.

o

Program Listings
The assembler produces a listing of your source rocdule,
including any generated statements, and the object code
assembled from the source module. You can control the
form and content of the listing to a certain extent. 1he
assembler also prints messages atout actual errors and
warnings abcut potential errors in your source module.

o
Section A:

Introduction

11

o
j

o

Part I: Coding and Structure

o

SECTION B: CODING CONVENTIONS
SECTION C: ASSEMBLER LANGUAGE STRUCTURE

o
13

o
·'

Section B: Coding Conventions

This section describes the coding conventions that you must
follow in writing assembler language programs. Assembler
language statements are usually written on a coding form
before they are punched onto cards, or entered as source
statements through other forms of input (for example,
through terminals or directly onto tape).

Standard Asserrbler Ceding Form
You can write asserobler language statements on the standard
ooding form (Order No. GX28-6509) shown celow. ,he cclunns
on this fern corres~cnd to the columns on a punched card
or positions on a source statement entered through a
terninal. ~he form has sface for program identification
and instructions to keypunch o~eratcrs.

IBM

GX28-6S09-5 U/M 050

IBM Sy,'"m 360 ,. ...mbl.r CodIng Form

o

25

•

30

a",,"'.ble

A ,,.,,dMd c.rd form. IBM .'.etTa 6509. is
fOT punching lOur~ ,FlItement. from this form.
Inrr",ct;onf for u,ing thi, form 8ft! in .ny IBM Svsrem1360 Auembler Reference M.tlual.
A~SI comments concerning this form to IBM NfNdic L"bor.to,'1. Public.tiOIJI Derelopmenr.

80.962 $.

'8' 09 Liding<' 9. $_""".

o
Section B:

Coding Conventions

15

Bl - Coding Specifications
B1A - FIELD BOUNDARIES
Assembler language statement usually occupy one SO-column
line on the standard form ~or statements occupying more
than SO 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 -Seguence 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

•

The "end" column is column 71, and

• The "continueR 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

,,---.'-=1

--------------r-

. ..

-~- "

A!i
i-:"" I
!

\
"

i

I

!

i

!

! :
i
\

16

..

,.

•

oo

-...

,0

"

T I

O!N

LI

I
!

I
i

I
I

I

I
I

I

j

I

!

I

I

i

t

I

!

i

:i

;

I

I

! I,

I

i i;
1

I

,A :,rintediA~

I

ll--:-:--Hc--+I-1--+--+I-f---+I-+--+c~T,oNuM'" V

.s

5S

I

i

i

:'"":;'0..

I

I

I'
COLUMN

16i

!

!

!

I!
I

I

I

i

I

r!
I

'MUS

,
!

;i
I

NIElS

I

R E MA R Kls
5T ART liN

I

i!

I

..

"

I

I

I

I

:

I
i

:

I

'.

OP coo OPER AN OS
c ojN T I NUA
I

/'..i: I I

I

GX28-6SQ9.S U/M 050

IBM System 360 Assembler CodIng Form

',OO'AM
t-"-OO-'A_-'-'

I

!

!

I

I

I

I

I

I
I I

I

I

i

.

i

i:

I

I

I
!

!

I

i
I

!

i

I

I

i

!

'0

i
!

i

I

I

5I'uu1!f1C1r

"

i

I

!

b<

I

I

i

i

l'

i

I

I

Ii

"

--:~-

loJor"l,,·,.t,on.

'~'----~\

....O
,

,

I

~

II

o

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 12. 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 standar1 begin, end, and
continue columns can create a field before the begin column.
This field can then contain the identification-sequence
field.

o
Section B:

Coding Conventions

11

B1B - CONTINUATION 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 tha t if a n ope rand is con tin ued af ter col umn 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
can have as many continuation lines as needed.

IBM

GX28-S509-5 UiM 050

IBM System 360 Assembler Coding Form
PUNCHlNO

I P.OO .........

tNSTAUCTI~S

10.TE

Printed in U S.A.

I ......'e
I

I

I

I

I

PUNCH

IPAO.

I

OF

I

"

STATeMeNT

No-

0_.. _"

B

I

i

, I
,

!

(

I

•

IA

,,-

IllniJ:"

I Nlr

NIE X[T

lL

h"n"f,~t,on·

,.

O";;~

2.

PU !NciH

,
I

"

5'

Als IEi3

:P

Com_"

l~iJ:"

I~

5tQ ... tI(.

6.

I...

13

,0 NIT ,I,N

I'

!liN

i

,

,

,
I

1

' 1+ 11+ ',+ 1L+ L+ !11+ '1 1+ 11,+ 11 ,+ !11+ i+
I
1+ 2 II 3 ~
I

+1 +

E

 : , 1.

:' L:.

IBIA .... IR

1114

alp

1110

II'IIR

115

3.

...-...

lOA,.

I GIl_

'NOT"""'-

n.,.....
31

I

.

*

-

•. . .if.......

II

~

NA ME

I·...

I

I
I

1..-

.. .. ..

:
IS,E .

GX2&fI508.5 U/M 060
Printed in U.s.,,-

IBM Sy.tom 360 A...mbler Coding , _

.~

""""-

.~

,.t

IE N TIR Y

IEIN IrlR Y 10M IT TIEIO
~

~,T;,O

11"15 Elc T

OP IE R ANIO

I~

InlR G

np '1=

It.

R .6.

N:n

N

TRY

N niT, 'R Ela!lI liB IE n
OM J

it" Elo

i
i
I
!

I

••
•o

i

An a-character name field starting in ccluan 1.
AS-character cferaticn field starting in cclurrn 10.
An oferand field that begins in column 16.
Note that with this fixed format onE tlank sefarates each
field.

Free Format
It is not necessary to code the naae, cferaticn, and c~erand
entries acccrding to the fixed fields on the standard
coding form. Instead, these entries can ce written in
any fcsiticn, subject to the formatting specifications
below.

20

C.,'

Formatting Specifications

I,,"

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 cclurr-n
(71) of any continuaticn lines.
The entries must be se{4rated from each other by one
O or3. more
blanks.
4It 4. If used, the name entry must start in the begin column.
5. The name and operation entries, each followed by at
4It anleast
one blank, must be contained in the first line cf
instruction statement •
•

6. Th: operation entry must start at least one
the r1ght of the begin column.

IBM

I

11M 5YII_ 3&0 AIAmbll. Coding Form

---NOGA_

,.

-...... ,.
BA L R
r- r--:I

NA ME

l-

.:

--

f-

DAn
STATa.....T

,.

,.

tI

1 4

15

3.

,.

~.:

..

tc

GXze....., U/M OlIO
"'nt..t In U SA

T 1

.

-

RE MA RKS

--

KS

-

1_...
............- I ........
r

..

f-I-"~

NA:M Elt'" BA L R:/1 4 1 5 I'R EM AR

•

colu~n

I

II

1

1

1

I

- ..

F I XIElo

Fa RM AT

F R EE

1

Flo RM AT

1

..

"

~

I

,i X

1-r-8!
ISA L R 1 4 1 5

15

f

OP ER!A N;C
! i

,ON L Y

AlMO

EN TRY

OM IT T E,O
; j I,

i)

~

AL lO MEO

!

~

I

~A ME

REM AR KJS EN TRV

i

I

I

I.

.1

i
i
I

I
;

I

II I

--

.1

!

i

j

I

1;1

HE RE

71

i

i
I

..

eNID IUCTI'IO IIIIw.1"

:

14

...

...

1--

L-

.

-

i

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 symbol at assembly time (after
substitution for variable symbols, if specified); for an
exception see the TITLE instruction (H3E).

o
Section B:

Coding Conventions

21

;I"'"

THE OPERATION ENTRY: The operation entry provides the
symbolic operation code that specifies the machine,
assembler, or macro instruction to te 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 syrrbolic
operation codes are five characters or less (see Appendixes
IV and V) •

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 sefarated 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,
C'J N') or in logical expressions (see L4C).

'
C
-~
22

o

'IH! REMARKS ENTRY: The renarks entry is used tc descrit:e
the current instructicn. The following applies to the
remarks entry:
1. It is

c~ticnal.

2. It can ccntain any of the 256 characters (or punch
combinations) of the IBM Systen/370 character set, including
blanks and s~ecial characters.

~ 3. It can follow any operand entry.
4. If an c~ticnal c~erand entry is orritted, renarks are
allcwed if the absence of the operand entry is indicated
~ by a comma, preceded and followed ty one cr «cre tlanks.

IBM Sy.'om 360 A...mbl.r Coding Form

---

II

l~ AYS

o

""",,"'''''
INIT ..

-'-"

. ..

lJCTtOfrd

-,

--~. ,.

11

,.

10 8
lR
10 9
SR
PU NCH r l AeEL

n

DATI

..

•0

OP CO DE OP

ITAllMlfrillT

..

I

GR.......IC

I """'"

•

iNo I~ 0

1

:-e

5E CT

I

~o ~O2

lEN 0

Co

...

I

'AG'

I

CA"OU.ICT"ON~"

RE

MA R KiS'
,

:i

Ii

RE

MAR K'S

j

I

I

1

I

i

I

' i

Ii
I I

,
i

I

EN CiE OF OP NO
. !
I
i

A~BS

i

I"

'0

I

i

I

"

I

CO MMA 'I N 01 CiAIT E.5
I..

.
_-

........

"

I

[~

I

I

AR EM AR KJ5 MU 5T BE 5 IE. PA RA TED FR olM
AN OP EIR AND EN TR V jev ONE o RI MO RE
OP R 2 ~ BL AN K51.

R1

5T ART

I

I

1
OM IT

GX28-650!H. U/M 050
Printed in U.S.A.

,

Section B:

'

I

' !

i

1

:

:

Ii I

I

I

I

Coding Conventions

;

23

o

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.

·"
C

I

o
Section C:

Assembler Language Structure

25

CI -- The Source Module
A source module "is a sequence of assembler language
statements that constitute the input to the assemtler.
The figure on the o~~osite ~age shows an overall picture
of the structure of the assembler language.

C2

Instruction Statements
The instruction statements of a source module are comFcsed
of one to four entries that are contained in the statement
field. Other entries outside the statement field are
discussed in B1A. Ihe 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 overail structure
of the statements that represent the assembler language
instructions and are not specifications for these
instructions. The individual instructions, their purposes,
and their specifications are described in other sections of
this manual (as cross-referenced in the figures). ~odel
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

o
Source Module
made up of
Source Statements

EITHER

INSTRUCTION
STATEMENTS

COMMENTS
STATEMENTS

o
NAME

REMARKS

OPERATION

CHARACTER
STRINGS

o

IBM SYSTEM/370
CHARACTER SET

Section C:

Assembler Language Structure

27

~
(_:y

•.

o

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.

NAME
Entry

OPERATION
Entry

OPERAND
Entry

A
Symbol
(or blank)

A symbolic
Operation
Code

One or more
operands
composed of

or

Exp (Exp)

or

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

or

o
or

Arithmetic
combination
of terms

Exp = Expression

any of the
following

A

Location
Counter
Reference
e.g. -Ie

Symbol
Length
Attribute
Reference
e.g. L'HERE

Which can be
any of the
following

o

Decimal

Hexadecimal

Binary

Cha'racter

e.g. 9

e.g. X'D9'

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 asse~bler 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.

o
30

NAME
Entry

OPERATION
Entry

A
Symbol
(or blank)

A symbolic
Operation
Code

OPERAND
Entry

One or more
operands

Operands can be
composed of

Operands can be
composed of one
to four subfields

Duplication
factor

Type

Modifiers

or
e.g.*+4

Character
String
e.g.
'TO BE
PUNCHED'

Symbolic
Option
e.g.
NOGEN

One or more
constants of
the format
below

e.g.

'Decimal
number'

o

El~~hefcllowing
. . . in~tr?8t:i.°~.~ :.;.:E~H( . 9R(~J . . . Cl~f1 . . p.p..!.~~~ . >O~l'l~~b~i·!~J.:'<, "aJ:~... P~~·~~~',,~~~;,,·1:~:~~~~j;:.II . .~~~<·~);)Q~~~n$f,~.~~
•

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
LOC

OBJECT CODE

ADDR 1 ADDR2

000000

1

000000

FFFFFE

STMT

, -••,1.
58506004

00008

42

A

START 0

•

2

ORG ;~+x I FFFFFE I
L

3

(Locatioh coun

000004

SOURCE STATEMENT

5,4(,6)

r overflow)

4

B

BR

15

5

C

DC

A(B)

6

o

EQU C

0)
\~,..:"

~.

Specifications
Loc. Ctr Ref

lccaticr. counter reference is
specified by an asterisk (*). 'Ihe
asterisk can be s~ecified as a
relocatacle term according to the
follcwing rules:
~he

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

Machine instructions

c.

The

Ie

2. It can alsc be s~ecified in
literal constants (see CS).
value of the location ccunter
reference (*) is the current value
cf the lccaticn ccunter cf the
control section in which the asterisk
~)
is s~ecified as a terrr. 'Ihe
asterisk has the sarr.e value as the
address cf the first byte of the
instruction in which it a~pears
(for the value cf the asterisk in
address constants with du~licaticn
factcrs, see G3J).
~e

•

Address
Value of.

Source
Statements

,/
000104' HERE
000108

•

I

B
B

HERE
*+8
} same
HERE+8 effect

DC
L

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

and IS instructions

c. 'Ihe EQU, ORG, and USING
instructions.
•

Location
in Hex

'OOOllC~ONSTANT
,OOO120KHERE
I

I

CONSTANT
THERE

(

o
5ection'C:

AssemD1er 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 as 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 C.).
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.

o
44

o

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 syrrbcl.
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 assembler assigns the length
attribute values to symbols in the
name field of instructions as
follows:
•

•

•

;'d_ .

F?r machine instructions, it assigns
2, 4, or 6, depending on
the format of the instruction.

e~ther

~or th~ DC a~d DS instructions «

MVC
L
LR

TO,FROM
3,ADCON
3,4

L'MACHA
L'MACHB
L'MACHC

TO
FROM
ADCON
CHAR
DUPL

OS
OS
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

self-defining terns

SOT 1
SDT2
SDT3

EQU
EQU
EQU

L'SDTI
L'SDT2
L'SDT3

lccaticn ccunter reference

ASTERISK

EQU

L'ASTERISK 8 1

~

LOCTREF

EQU

L I LOCTREF

LENGTH 1 DC

A(L'* )

'*
L
{4
L I LENGTHI. 4

For the E~U instruction, it assigns
the length attribute value of the
leftmost cr only term of the first
expression in the first operand,
unless a specific length attribute
is supplied in a second o~erand.
OrilyoneOt;:~randisall()wedinthe

£QUj.nstr'Uction. ".

~.

•.
~.

Value of Symbol
Length Attribute
(at assembly time)

Source Module

MACHA
MACHB
MACHC

ass~gns e~ther the implicit or
explicitly specified length. The
length attribute is not affected
~ a duplication factcr.
~t

Note the ler:gth attribute values
of the following terrrs in an EQU
instructicn:

•

Length A ttr.

~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.

•

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

L ' RELOC1
L'RELOC2
L'ABSOLI
L'ABSOL2

80
80
240
240

-n
0

L'*
LITO

1

6
80

For the rerraining assenbler
instructions, see the specificaticns
for the individual instructions.

o
section C:

Assembler Language Structure

45

C4D -- OTHER ATTRIBUTE REFERENCES

o

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 (R'), 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 TERMS

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. ~hese
terms have absolute values and can te used as absclute
terms in expressions to represent bit configurations,
absolute addresses, displacements, length or other
modifiers, or duplication factors.

.'0',·"
.

,

~

46

C:J

Specificaticns
Self-Defining

GENEFAL RULES:

· Refresent
O values

Self-defining terrrs:

Self-Defining
Term

rrachine language binary

• Are acsclute terrrsi their values
do not change upon prcgrarr
re1ccaticn.

15
241
B'11111
B ' 11110001 1
B ' 100000001 1
X'F '
X'F1'
X' 101'
C ' 1'

CiA'
C'AB'

'CI •

Binary
Value

Decimal
Value

!he assemc1er carries the values
represented cy self-defining terrr:s
to 4 tytes cr 32-titsi the higbcrder bit is the sign bit.

Valuesar.,carried,to3bytEs or
241:1ts.

•

1111
11110001
1111
11110001
100000001
1111
11110001
100000001
11110001
11000001
1100000111000010

15
241
15
241
257
15
241
257
241
193
49 , 602

4 bytes
(32 bits)

r

24

16

L.

I

8

I

J

value bits

31 30

•

Isign bit

lI
0

Ivalue bits I
I

1"'Negative Value
():=Positive Value

~ECl~AL:
~ decirral self-defining
term is an unsigned decimal number.
1he assemt1er allows:

O.

High-crder zercs

••

A maximum of 10 decirra1 digits

•

•

.:Q2

•

'2147483647'

• A range of values from 0 througt.
2,147,483,647.

=

2

31

-18

-; 'A,aa.xlaUlr,of Bdecimaldigits.
"',,,;ltlta;n<.Je of,
~,~,17712J5 •

values from

o through

o
S'ect1on C:

Assembler Language Structure

47

EINA~Y:
A tinary self-defining
terrr Rust ~e ceded in the fermat
shown in the figure to the right.
~he asserr~ler:
.

~.

Assemtles each tinary digit as
it is sJ;ecified

_____________ a1stroPhes must enclose digits

B ',110011 ••••• 101'

\.

\

1 to 32 binary digits
blnarYtMlIM

• • Allows a maximum of 32 tinary
digits
•

Examples

Allows a range of values frerr

•

",.t:

~

Allowact

rRJxl.itNi]iiC~2lfbiha:t:j··

digits.
e"

Al·10WS·.·.·......·• ·.• •

o· througb

ih

~i~~~:.~f. . ~al.ue$

·1'~771t~·1S'.·

.

fro.'
B'

NOTE: When used as an absolute
term in expressions, a tinary selfdefining tern has a negative value
. if the high-order tit is 1.

e

101011~t--O kll0~

B'11101010111'

High-order
~nbit

B "11111 ••• 111' =

I
.~,

32 d;9;ts.

<¥f.

B ',10 0 0 0 • • • 0 0.,9 ,
•

48

Binary Value

-2,147,483,648 thrcugh
2,147,483,641.

32 digits

111010101111

o

~r0ph" most enclose digit

"

X' FF ••• F56 '

\'
hexadecimal

1 to 8 hexadecimal digits

111111.111;:

Conversion Table:
4-bit
Hexadecimal Decimal
Binary
Digit
Equivalent Representation

BEXAtECIMAL: A hexadecimal selfdefining tern must be ccded as sho~n
in the figure to the right. ~he
assentler:

•

• Assembles each hexadecimal digit
intc its 4-tit binary equivalent
(listed in the f1gure to the r1ght)

•

• Allows a naxinun cf 8 hexadecimal
digits

•

• Allows a range cf values from
-2,147,483,648 through 2,147,483,647.
....4~"' ...:;o· .':,_.x~m ~f .

6 •hexadecimal

0

0

1

1

2
3
4
5

2
3
4
5

6
7

6
7

8

8
9
10
11
12
13
14
15

9
A
B

C
D
E
F

Examples:

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

Binary Value

,'~,<... ..,~"""" ..:/_ ........J''"lf'.. : of va 1 uesfrom
~~<>P!I~L •.,:I:~.~1r7 ~2t5.•

NOlE: When used as an absolute
term in an expression, a hexadecinal
self-defining tern has a negative
• · value if the high-order tit is 1.

X'A'

IOOOOllOH)f

X'FFA'

1111 illll111 0 1 01

8di9iU8

X'7FFFFFFF'
X'80000000'

•
o
Section C:

Assembler Language Structure

49

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

'.

CHABACTE~:

A character self-defining
tera aust te coded as shown in the
figure to the right. ~he asseatler:

c

-

l'

I,.

,LarstrOph81 must enclose characters

.... )·.{

C~
• Allows any of the 256 punch
combinations when using punched
cards as input. ~his includes the
printable characters, that is,
blanks and special characters.

O

\

1 to 4 characters
character.!;;_

Example.:
Character
self-defining Characten
Assembled
term

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

•
•

••

1100000~

~

X'Cl'

e'l',

1

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

11110001
01000000
01111011
01111100

X'50'
X'7D'
X'D37DC1'
X'7D7D'

01010000
01111101

(blank)

C'
C'II'

/-

e'@'

Allows a maximum of 4 characters.

Binary
Value

C'A'

I) •

• Requires that twc aIl1persands
or apostrophes be specified in the
character sequence fer each ampersand
or apostrophe required in the
assemEled term.

Hexadecimal
Value

e'&&'

C'" ,
C'L' 'A'
C" f'"

----

C'FOUR'

•

II
@

/e

&
,

L'A
II

FOUR

0

X'C6D6E4D9'

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

L
L

MVe

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

1. The data yeu enter as numbers
for computation, addresses, or
messages to be printed is visitle
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.

o
50

o·

The, assembler assembles the data
specified in a literal into a
-literal pool- (fully described
in H1B). 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 relocatatle
or atsolute values.
3. In what is assembled into the
object code of the machine
instruction in which theyaj;:pear.

The figure to the right illustrates
the first two points.
••

A

Compare:

Ii teral represents data.

• A constant is rej;:resented ty
• its relocatable address. Note t.1J.a t
a symbol with an atsolute value
does not rej;:resent the address of
• a constant, but represents immediate
data (see D5D) or an absolute
·
address.
•
•
A self-defining term represents
data
and has an absclute va lue.
•

•

A literal with a relocatable address

L

31Fe

DC

F'33'

3,=F'33' } same effect

L

F33

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

:~ ~~t4.~mee~~

FLAG
ZERO

DS X
EQU X'OO'

•

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

~
:

o

.

:' lUill'RE
I,

}same effect

• .

LOCORE EQU 1000

ITection C:

Assemoler Language Structure

51

Object Code
in Hex

Source Statements
Loe
nHex

The figure to the right illustrates
the thi rd point.
• • The address of the literal,
rather than the literal data itself
is asserobled into the abject code.
• • The address of a const ant is
asserobled into the object code.
Note that when a symbol with an
• absolute va lue reJ;:resents immedia te
data, it is the absolute value that
is assembled into the object code.
The absolute value of a self·defining
term is assembled into
O· the
obj ect code.

LITERAL

L

RELCON

L

ABSCON

TM

SELFDT

TM

FLAGCON

EQU X'B8'

248 F200

DC

F'200'

24C BYTE

DS

X

LTORG
250 1000000c8I

F'200'

r~1
Pool

c
52

o

Specifications

o

Literals

A literal must be ceded as shown
in the figure to the right.
The literal is specified in the
same way as the operand of a DC
instruction (for restrictions see

Literal Specification

'=I'IxB' F3 "

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.

~:

nominal
value

o

Because literals provide -read-onlydata, they rrust not be used:
1. In operands that re~resent the
receiving field of an instruction
that rroodifies storage
2. In any shift or 1/0 instructions.

o

C6 - Expressions
C6A --

o

PURPOSE
You can use an expression to specify:
An address
explicit length

•

An

•

A modifier

•

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 multi term expressions to
single values. Thus, you do not
have to ccm~ute these values
yourself.

A

EQU

B

MVC

C

DS

,

-i,

X-_-Y-+-1-3-_-P-I-Q

""'1

,

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

0/

•

<,X-Y,> XL (rIQ-IO)

..

o
S~ction

C:

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 expression described in this subsection
in a machine instruction or any assembler instruction cther
than a conditional assembly instruction. 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.

o
54

o

C68 -- 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

o
Relocatable
Expression

Operators Allowed
Unary: + Positive
- Negative
Binary: + Addition
- Subtraction
Multiplication
I Division

*

Abs. Exp = Absolute Expression
Rei. Exp

= Relocatable Expression

o
Section C;

.Assembler Language Structure

55

Absol~te

and Relocatable Expressions
Source Module

An expression i~ absolute if its
value is not changed ty 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 taired. 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:

paired terms must be defined
.in The
the saree control section of a

O source module

is, have the
same relocatabili ty attribute) •

•
•

•

~hat

• 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

e{

~O{
paired

CSECT

A
B
C
LOCTREF
ABSA
ABSB
ABSC

D·S
OS
DS
EQU
EQU
EQU
EQU

SECOND

CSECT

D
E
F

OS
OS
OS
END

·

··

F
F
F

*
X'F'
300

CiA'

x
X
X

Examples:
Paired Relocatable Terms •

B-A
~
C-A
~
+B-+C'
> B-C
-A--B ~ -A+B
LOCTREF-C
O-E
F-O

Absolute
Expressions

8

O-E+ABSC

F-D+B-C
'----'

Unpaired Relocatable Terms

• The value represented ty the
paired terms is absolute.

"

1
A+ABSA-B

paired

t....--.¥

paired

Relocatable
Expressions
Unpaired

B
C

LOCTREF

o

56

FIRST

I+ABSA
g+X'FF'
.-5* (B-C).
paired

o

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

o

The assembler reduces an absolute
expression to a single absolute
value if the ex~ression:

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 atsolute
terms, and if all these relocatable
• · terms are paired.

'*-A

EQU

ABSD

END
Absolute
Expressions

.{i~SA
L'A

•

.

{ABSA+ABSC-ABSC*15

~
J-. ~
ABSA+15-B+C-ABSD/(C-A+ABSA)

e{N

o
Section C:

AssemblE::=r

J ·ang\1age

Structure

57

Deloca~able

Expressions
Reloc. Exp.

A relocatable e~pression is one
Whose value changes, for example,
ty a 1000, if the cbject 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:

•
•

a. All the relocatable terms
but one are paired. Note that
the unpaired term gives the
expression a relocatable value;
the paired relccatable terms
and other absolute terms
constitute increroents or
decrements to the value of the
unpaired 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:
Oomple~

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'~'

C

DC

H'4'

ABSA

EQU

10

ABSB

EQU

ABSC

EQU

.

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

.---

'a+ABSA+I0
B-+A+c;:-10*ABSC

O~.

B-A+'+lOO*ABSA+ABSA/(C-A)

~o~

Rules for Coding Expressions
Operators

The rules for coding an absolute
or relocatable expression are:
1. Both unary

on one
value) and binary (operating on
two values) operators are allowed
in expressions.

o
•

(o~eratin9

2. An ex~ression can have one or
more latA operators J?receding any
term n
e expression or at the
beginning of the eXJ?ression.

•

3. An expression must not begin
with a binary oEerator, nor can
it contain two binary operators
in successicn.

•

4. An expr~ssion mus~ not contain
two terms 1n succeSS1cn.
5. No blanks are allowed between
an operator and a term nor between
two successive operators.
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.

7. A single relocatable term is
not allowed in a roul tiply o.r divide
operation. Note that paired
relocatable terms have absolute
values and can be multiplied and
divided if they are ,enclosed in
parentheses.

Unary

+, -

Binary

+,-.*.1

~.. - - ABS

~j.: ..

I

---....

-====~.

REL+ "ABS

Unary •

'--B-ina-ry--'I

~~J~

Context determines whether
+ or - is unary or binary
operator

-==-~.~

ABSC;~ABSD+15

REL~ 4ABS

-ABS

- REL-ABS

-====I.~

A+B
ABSC

----..

REL-ABS

I ABSO+15

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

I I
8
Multiply

,*3
*+3

INVALID
VALID

--,Locatlon counterl
I Reference J

8

~

, A* I B
-ABsA +

~

I

-----------,
Context determines whether
an asterisk (*) is the binary
INVALID operator for multiplication
VALID
or the location counter
INVALID reference

L-________________- J

Leftmost operator betwee
two terms is binary

-

X' FF' (10:!< A)

-.---

'e---

~

~

INVALID

>

15B'101'

INVALID

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

o
Section

c:

Assembler

Lan~uage

Structure

59

Evaluation of Expressions

Value of
Expression

Absolute Expressions

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

A=5
A*-- X'A'

~

•e
•

b. It performs the binary
operations of mUltiflication
and division befere the binary
operations of addition and
subtract ion.

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

o.

•

e

4. In parenthesized ex~ressions,
the assembler evaluates the inner
most expressions first and then
considers them as ~ in the ~
outer level of eXfressions. 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.

It is assurred that the
assembler evaluates paired
relecatable terrrs at each level
of expression nesting.
NO~E:

60

§:

+50

}

15

~.

2. It performs arithmetic operations
from left te right. Hewever:
a. It performs unar~ operations
before binary o~erat1ons, arid

5* + 10

A=10 {A+10/B

"

~ 10+10/2

B=2

(A+I0) /B ~ (10+10) /292 0/2 c:;

A=10

A/2

A=ll

A/2

A=l

{ A/2

}e

10*A/2 ~ 10

lU

)

5

~

5

)

0

* 1/2 ~ 10/2;;;:;

5

c

o

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

61-

o
;.Y'

o

Section D: Machine Instructions

This section introduces the main functions of the machine
instructions and ~rovides 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. GA226821

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

D1 - 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.
Also at assemtly time, the assembler creates the object
code of the data constants and reserves storage for the
areas you specify in your DC and [S assemtler instructions
~ee G3).
At execution time, the machine instructions
can refer to these constants and areas, rut the constants
themselves are not executed.

o
section D:

Machine InstructJol1d

63

D1A -- FIXED-POINT ARITHMETIC

purpose
You use fixed-point instructions
when you wish to perfcrm 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 paint yourself.
For your constants you must provide
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 instructicns 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

NOTE: Except for the conversion
ooerations, fixed-point arithmetic
is performed on signed binary values.
Constants Used

•

CVD

Type

#

64

Fixed-Point

Hand F

Binary

B

Hexadecimal

X

Character

C

Decimal (packed)

P

Address

Y, A, S, V and Q

.(....• \ .
:
I

. .:.-.Y

o

C1 E -- tECI~AL

ARITEME1IC

Furpose
You use the decinal instructions
~hen you wish to perform arith~etic~
cperaticns cn data that has the
binary equivalent of decimal
representatien, either in packed
or zoned form. These instructions
treat all nunbers as integers.
for example, 3.14, 31.4, and 314
are all processed as 314. You rr,ust
keep track cf the decirral peint
yourself.

Operaticns
(

P~rfer!ed

Becirral instructiens allo~ you to
perform the operations listed in
the figure te the right.

o

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 8 field to zero
and add contents
of another field

ZAP

Convert zoned to
packed decimal
data

PACK

rata Constants Used
In decimal instructions yeu can
refer tc the censtants listed in
the figure to the right.
•

NOTE: ExceEt fer the ccnversicn
operations, decimal arithnetic is
performed on signed packed decinal
values.

Convert packed to
zoned decimal
data

•

Constants Used

Decimal (packed)
(zoned)

UNPK

Type

P

Z

o
Section D:

Machine Instructions

65

t1C --

FICA~ING-POINT

ARI~HMETIC

Furpose
You use floating-point instructicns
when yeu wish tc ferfcrn arithmetic
operations on binary data that
represents rcth integers and
fractions. Thus, you do net have
to keep track ef the deci~al point
in ycur ccnfutaticns. Flcatingpoint instructions also allow yeu
to perfcrn arith~etic cferations
on both very large numters and very
small nurrbers, with greater precision
than with fixed-point instructions.

floating - Point
Operations

Add

Subtract

j

•

SDR, SO, SER, SE, SWR,
SW, SUR, SU, SXR
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-fcint instructicns allow
you to perform the operations listed
in the figure tc the right.

Load into floating·
point registers

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

tata 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

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

66

ADR, AD, AER, AE, AWR
AW, AUR, AU, AXR

Multiply

Operaticns Perfcrned

e

Mnemonic Operation
Codes

E, 0, and L

()

0 ";'·

,

\

',I

'

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 0 R
(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

o

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

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

o
Section D:

Machine Instructions

67

Branching
Operations

Mnemonic Operation

~~~dingl

SCR, BC

on the results of
the preceding
operation (that
sets the condition
code)

Codes

a

C1E -- BRANCHING

Purpose
You can use several tYfes of
branching instructions, comcined
with the logical instructions listed
in 010, to code and control loops,
subroutine linkages, and the sequence
of processing.

Branch to a
subroutine with a
return link to
current code

BALR, BAL

.§!:!!l£.!:! according

BCTR,BCT

toa~con-

tained in a register
(count is decremented
by one before determining course of
action)
~by

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

o

68

NOTE: Additional mnemonics for
branching on conditicn are described
in section ~1H below.

comparing
value to fixed
comparand, (index
incremented or decremented before
determining course
of action)
~

Temporary Branch in
orderto~a

specific machine
instruction

BXH, BXlE

EX

o

Status Switching
Operations

Mnemonic Operation
Codes

Load program status information

P

LPSW

.I.J;w! sequence of control registers

P

LCTL

Set bit patterns for condition code
and interrupts for program

SPM

Set bit patterns for channel usage
by system

P

SSM

§!l protection ~ for a block of

P

SSK

P

SCK

P

15K

storage

e1F -- STATUS SWITCHING

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

m

for storage

purpose
Store time-of-day clock

o

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.

STCK

Store identification of channel
or CPU
(save) sequence of £Q!!!!:Q!
registers

~

P

STI DC, STIDP

P

STCTL

Call supervisor for system
interrupt

SVC

Call monitor for interrupts depending on contents of
control register

MC

!!!! bit which is subsequently

TS

set to 1

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

WRD, ROD

Write or Read directly to or
from other CPU's

P

Set Clock Comparator

P

Store Clock Comparator

P

Set CPU Ti mer

P

SPT

Store CPU Timer

P

STPT

Store Then AN 0 System Mask

P

STNSM

Store Then OR System Mask

P

STOSM

,SCKC
,~~KC

,-.

o
Section D:

Machine Instructions

69

c:;

01G -- INPUt/OUTPUt

Purpose
You can use the input/output
instructions, instead of the IB~­
supplied system macro instructions, •
when you wish to control your input
and output operations aore closely.

Operations Ferformed
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
Operation.

Mnemonic Operation

§W11/0

SIO, SIOF

!:i!!ll/O

HIO

!!!! state of channel

TIO,TCH

Cod••

or device being used
Halt Device

HOV

'0

o
Section D:

Machine Instructions

71

Page of GC33-40tO-O
Re,·jsed 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.
They can be used as operation codes for branching
~ instructions, replacing the Be and BeR machine instruction.
codes. Note that the first operand of the Be and BeR
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

o

0
\

Meaning

Extended Code

••

\02 (X; ,B2)
B
BR
R2
NOP
D2(X2,B2)
NOPR R2

}
}

Unconditional Branch

Format

RX

RR
No Operation

RX

RR

(Symbolic) Machine
Instruction Equivalent

••
BC
BCR
BC
BCR

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

BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC

2,D2(X2,B2)
2,R2
4 ,D2 (X2 ,B2)
4,R2
8,D2(X2,B2)
8,R2
13,D2(X2,B2)
13,R2
ll,D2(X2,B2)
ll,R2
7,D2(X2,B2)
7,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 on High

RX

RR
Branch on Low

RX

}
} Branch on Not

RX

RR

Branch on Equal

} Branch on
} Branch on

High

RR
RX
RR

Not Low

RX
RR

Not Equal

RX

Be

RR

BCR

RX

BC
BCR
BC
BCR
BC
BCR
BC
BCR
BC
BCR
Be
OCR
BC
BCR
BC

BCR

Used After Arithmetic Instructions

CI

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 Not Plus

RR
Branch on Plus
Branch on Minus

RX

RR
RX
RR
RX
RR

Branch on Not Minus

RX

Branch on Not Zero

RX

RR
RR

}

Branch on Zero

RX

}

Branch on No Overflow

RR
RX
RR

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)
ll,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
ll,D2(X2,B2)
Il,R2
7,D2(X2,B2)
7,R2

Used After Test Under Mask Instructions

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

0

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

RX

Branch if Mixed

RR
RX
RR

Branch if Zeros

RX

Branch if Not Ones

RX

RR
RR

}
} Branch

Branch if Not Mixed

RX

RR
if Not Zeros

RX
RR

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

Section D:

Machine Instructions

73

011 -- RELOCATION HANtLING

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

Operations Performed
The relocation instructions allow
you to perforll' the ct:erations listed
in the figure to the right. However,
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.

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 0 System
Mask

STNSM

Store and 0 R System
Mask

STOSM

0\

D2 - Alignment
Alignment

Purpose
The assemtler automatically aligns the object code of all
machine instructions on halfword toundaries. For executicn
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 fullwcrd machine instructions.
If the NOALIGN option is set, you do not need to align
constants and areas. They will te assemtled at the next
available byte, which allows you to save space ~o bytes
are skipped for alignment).

o

o
Section D:

Machine Instructions

75

10

Specifications

•

Source 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; it can
be specified as ALIGN or NOALIGN.

L

3 / AREA",-

A

3,CONS~
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 sup~lied.
• The assembler checks all
expressions that represent storage
addresses 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 assell'bler 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 fer boundary
alignment.

I,.y

L

3.AREA>

A

3,CONST
CONST

NOTE 1: The asserrbler 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

xxxxxxxx

DS
CONST DC
DC

F'200')
000000C8
FL4' 200' Equiv.
rI",',
.)

l}J.1

,

76

Mnemonic Operation Codes
for Privileged Operations

NOTE 2: When NOALIGN is s~ecified,
the CNOP assembler instruction can
be used to ensure the ccrrect
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.

1SK

Insert Storage Key.

SSK

Set Storage Key.

LCTL

Load Control registers.

SCK

Set Clock.

ST10P

Store CPU Identification

STCTL

Store Control registers.

(Diagnose - not handled by assembler)

o

o
Section 0:

Machine Instructions

77

D3 -- Statement Formats
Length of Object Code
Reguired 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 tasic
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).

•
•
•

•

•

78

I

The assembler converts only the
operation code and the operand
entries of the assembler language
statement into object code. The
ass emtl er ass igns 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 sarre symbol in
the operand of an assembler language
statement, the asserrbler uses this
address value in converting the
symboli<: operand intc its object
code form. The length attribute
assigned to the syrrbcl 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

RS

4

SI

4

s

4

SS

6

•

(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

( ) ~ - Mnemonic Operation Codes

Furpose
You Rust s~ecify an c~eraticn code
for each machine instruction
stateRent. 'the Il'nell'cnic cperaticn
code indicates the type of e~eraticn
to te perfcrll'ed; fer exam~le, -Aindicates the -addition- cperaticn.
Appendix IV ccntains a coa.plete
list of mnemonic operation codes
and the fcrnats of the corres~onding
machine instructions.
Specificaticns

o

'the general format of the machine
instructicn c~eraticn ccde is sho_n
in the figure to the right.
'the vert nust always be present.
It usually consists of one or two
characters and s~ecifies the
operation to te perforroed. 'the
other iteRs in the c~eration code
are not always present. 'they
include:

e.

the

'Ihe modifier which further defines
c~eraticn

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

• 'the fcrnat qualifier, :R cr I,
which indicates that an :R:R or 51
nachine instructicn fcrll'.a t is
assemtled.

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

Examples:

o{
e{

ih
Ir--Io-gj-ca-I'""I

_~B~~(~·~~~~:i~1~• •"~/

I
I

binary

·.~.ij'>··..;

•

I

"·,t.:.,,·:·:,

character

I

E><
........

. . ;/;rr';!'irr;;;i.ll.llll'lllil'\);:
...-.------'"-------,

8R

•

o
section D:

Machine Instructions

79

os -

o

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 to be ~erfcrtted. The
operand entries consist of cne or
a.ore fields cr sUbfields de~ending
on the format of the instruction
teing ccded. They can s~ecify a
register, an address, a length,
and irrreediate data.
You can code an operand entry either
with synbcls cr ~ith self-defining
terms. You can omit length fields
or sutfields, which the assembler
will compute for you from the otter
operand entzies.

General Specifications for Coding
Operand Entries
'Ihe rules for coding
are as fcllc~s:
•

A

o~erand

entzies

comma must separate operands.

~Farentheses nust enclcse subfields.

e

A conna nust seearate subfields
enclosed in parentheses.

If a sutfield is cnitted because
it is in implicit in a syrntolic
address, the farentheses that ~ould
~have enclosed the sutfield ~
te cnitted.

80

L!

LM

4, 8, SA'{E5

MVI

4 (12),C'F'

'e
,,/

•

MVC

TO (80), FROM

MVC

0(80"'),240(8)

MVI

~
II
4 (12), C 'F'

MVI

KEY, C'F'

/
Implicit
Address
See D5B

C-"\
~

If twc sutfields are enclcsed in
parentheses and separated ty conrras,
the fcllcwir.g a~~lieE:

e
•

•

•
•

"\
----

If both sub fields are orr-itted tecause
they are in'~licit in a synbclic
entry, the separating comna and
the farentheses that ~culd have
been needed must also te omitted.

L

2,48(4,5)

L

2,FIELD

If tbe first subfield is
the ~ that separates
the seccnd subfield nust
as well as the enclosing

L

2,48(4,5)

L

I
2,48(,5)

MVC

32 (

MVC

32(8,10) ,40(10)

MVC

32(16,6) ,48(6)

MVC

TO(l 6),_F-R-O-M------__

emitted,
it frorr
be ~ritten
parentheses.

If the seccnd subfield is omitted,
the comma that separates it frcrr
the first subfield rrust be omitted,
however, the enclosing parentheses
nust te written.
~OTE:
flanks must not appear within
the c~erand field, except as part
of a character self-defining terrr
or in the s~ecif1caticn cf a
character literal.

"

MVC

I

Implicit
Address
See D5B
Index Register
is omitted

'-

,/0') ,4 0 (10)

Length
Specification
is omitted

~

L

Base Register
implicit in symbolic
address TO

32(C· ··S).=CL64'A/B'

I

• •

o
Section D:

Machine Instructions

81

(~

\~;L,.;i)

t5A -- 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:

••
o
•

a.

The double-shift instructions

b. The fullword multiply and
divide instructions
c. The move long and compare
logical long instructicns.
3. The floating-point registers
o and 4 must be specified for the
instructions that use extended
floating-point data:
AXR, SXR, LRDR, MXR, MXDR, MXt.
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 asseRbler issues
a diagnostic message and does not
assemtle the instruction.

82

Operation Code

L

Examples:

;~tAREA

LE- liFLTAREA

•
.{
o{

•

SLDA

ifjl

SRDA

ji:!2

SLDL
SRDL
M

D
MVCL
CLCL
AXR

Both register operands
must be even-numbered

o

REGISTER USAGE BY HACEINE
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:
base registers that are
implicit in the symbolic addresses
specified. These implicit addresses
are described in detail in DSB •
The registers can be identified
by examining the object cede of
the assembled machine instruction
or the USING instruction(s) that
assigns base registers for the
source module.
1.

•
•

Source Module

START
BALR

0'

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.

USING

o

12,0

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

* ,12

•

•

L

3,FIELD

IS81310lclxxxi

M

4,TWO

Isc 14 10 IC Ixxx I

...

MVCL

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.

•
•
•

0

~he

2. The registers that are used by
machine instructions in their
operations, but do not appear even
in the asserrbled object code.
They
are as follows:

•
•

Object Code
in Hex

4,6

Register 5 and 7
are also used

BXH

TRT

3,4,ADRESS

18613141clxxxi

ARGUMENT(10),TABLE

d. For the Translate and Test
(TRT) instruction ,registers
1 and 2 are also used.
e. For the Load Multiple ~)
and Store Multiple (STM)
instructions, the registers that
lie between the registers
specified in the first two
operands.

LM

19813171clxxxi

REGISTER USAGE BY SYSTEM: The
control program of the IEM System/310
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 System/370 requires that
all addresses be assembled in a
numeric tase-displacement format.
This format allows you to specify
addresses that are relocatable or
absolute.
You must not confuse the concept
of relocatability 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.
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
into
form
into

_

Symbolic
Addresses
(Defined)

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

that is, in a form
the assembler must first convert
an explicit base-displacement
before it can be assembled
object cede.

••
•

•

Address
References

DC

3F'37Q'

EQU

II• •

L

L

4,hll• •

L

4,~/_.~Sj­

B

~.~

Relocatable

Addresses

EQU

LA

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

5,_5,11:.]1"

5 ,.illl.'-::'

LA

84

3,_jt

Absolute
Addresses

Relocatability of Addresses

o

Source Module

Addresses in the base-displacement
form are relocatable, because:

I
•

• Each relocatable address is
assembled as a displacement from
a base address and a base register.

in Hex

0

llo
it)
(.)

X

• If the otject 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.

~

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

• The base register contains the
tase address.

• Your addresses have been assem~led
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.

Object Code

...c::
II

~

Q.

5

...c::
Q)

E

B
(U

C.
~

i5

I Displacement I

TO
DS
FROM DS

CLBO
CL240

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

LA

END

O

o
Section D:

Machine Instructions' B5

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

Specifications

Addresses

o

OR OBJECT CO~E FORMAT: All addresses asserrbled
into the object cede of the IBM System/370 machine
instructions have the format given in the figure telow.

~ACHINE

Format

Coded or Symbolic
Representation of
Explicit Addresses

Object Code
Representation
of Addresses

I

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

R5

02(B2)

'op
ccio-e: . R; -:- R3 .... _------'. _.- B2

5I

01(Bl)

OP CODE: . -- i£ -- -I

55

01 (,Bl) ,02 (B2)

~~ ~Q~~C -. ~ ~ ~ _. ~ ~

RX

02(X2,B2)

5

____ e . ____ • • __

Bl

I

01
~"i

02

01 (Bl1

Rl 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·

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 ccntents
~of a base register, and the contents of an index register.

86

V

o

Implicit Address

I
•

Source Module

Object Code
in Hex

An implicit address is specified
by coding one expression.
The

expression can be relocatable or
absolute. The assembler converts
all implicit addresses into their
tase-displacement form before it
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
be 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.

AREA

o

START
BALR
USING

12,0
*,12

L

""Ee!
3,AREA

OS

F

LA

4,1000

~""

:~;;,:,:::;>:).

158 I 3 I 0

Ic I xxx I

~

/\
~....

Base Register/

•

DisPlacement}

14114101013E81

r---",,--I-.."\
Always used as
base register for
absolute address
between 0 and

END

~
Displacement

4095

Explicit Address
An explicit address is specified
by coding two absolute expressions
as follows:

o

•

•

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).

o I

NOTES (for implicit and explicit
addresses) :
1. An explicit base register
designation must not acconpany 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 ether as
an implicit address.

Object Code
in Hex

LA

The second (enclosed in parentheses)
is an absol ute expression for the
base 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 program
relocation, the assembled address
is a1:solute.

•

Source Statement

•

4,X'400' (,10)

L

vc

~~

0(80,10},FIELD

"~

1~~}poolC I x';';1
..'..

Section 0:

Machine

~<:(

Instructio~s

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
assembled into the object code of the instruction. The
implicit length is either of the following:

•

1. For an iroplicit address (see D5B 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 symbols and other
terms see C4C.
EXPLICIT LENGTH: When a length subfield is specified in
an SS-type rea chine instruction, the explicit length thus
defined always overrides the implicit length.
.

•

NOTES:
1. An implicit or explicit length is the effective length.

length value assembled is always one less than the
O The
effective length. If an assembled length value of 0 is
I

•

desired, an explicit length of 0 or 1 can be 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.

/~

"

~"J~/\

o

Lengths

Assembler
Language
Statement

Length Attribute
of term (symbols)

Object Code

in Hex
L- Length Value
,

MVe

L'TO

TO,FROM

Add ....

TO

L

Implicit Lengths

=

FROM

I D214F Ixxxx IxXXX']

80

0
L

o

= 80

MVC

TO+SO,FROM

L'TO

AP

A.REA,TWO

L'AREA = 8
L'TWO =

L1 L2

IFAI7131 xxxxi xxxxi
L

e:

MVC

,.
\

0
MVC

ID214F)xxxxlxxxxl

0 ( ,lO) , SO (10)

;1

I D21 00 I AOOO IA0501

L

L

FROM-TO(,lO) ,SO(10)

L'FROM =240
I

Explicit Lengths

MVC

o

TO (160) , FROM

MVC

o(8.0 , 1 0)

CLC

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

CLC

0(b,10) ,256(10)

TO
FROM
AREA
TWO

DS
DS
DS
DC

, S0 (1 0 )

•
•
•
•

L'TO = SO

ID21 EF IAO AO IA050J
~

Address

TO

FROM

I D219F I xxx x Ixxx'il
L

1

I D214FIAOOOIA0501

1

ID5100lAOOOIAlOOI

1

I D5100lAOOOIAlOOI

+

...

CLSO
CL240
PLS
PL4'2'

section D:

Machine Instructions

S9

DSD --

I~MEDIATE

CATA

Purpose
In addition to addresses, registers, and lengths, some
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. Co not confuse it with address references
to constants and areas cr with any literals you specify
as the operands of machine instruction (for a compariscn
between constants, literals, and immediate data, see C5).

Specifications

o

90

Immediate data must be specified ~s absolute expressions
whose range of values depends on the machine instructicn
for which the data is required. The immediate data is
assembled into its 4 -bi t or ~ tinary representaticn •
according to the figure on the opposite page.

o

Immed. Data

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

SRP

(SS)

Range of Values
allowed for
immediate data

othrough 9

Object Code
in Hex

Examples

SRP

A'B'~
IFOl7131xxxxlxxxxi

Z

~--;;:--e

/lenQth oj
Field A

o

All BCR
All BC

(RR)
(RX)

o through
othrough

15
15

BCR

~.

BC

11,AAA 1471BI Olxxxxi

"

107 18 13 1

,-

I
ICM
STCM
CLM

o

(RS)

othrough 15

Addresses

A AA
Address

10

·

---

STCM 3,~BBB IBEI31Flxxxxi
BBB
Address

NI
CLI
XI
MVI
OI
TM
ROD
WRO

(SI)

SVC

(RR)

othrough 255

CLI
TM

•
-.

SLOT,C'A'
KEY,"?F'

Address

-

SLOT

195 1C11 xxxx I

----

19l17Flxxxxi
Address

KEY

othrough 255

SVC

3;28

•

1OAI80 I

Section D:

Machine Instructions

91

D6 - Examples of Coded Machine Instructions
The examples in this sutsection
are grou~ed according to rrachine
instruction format. They illustrate
the various ways in which you can
code the operands of machine
instructions. Both syrrbolic and
numeric representation of fields
and subfields are shown in the
examples. You must therefore assurre
that all syrebcls used are defined
elsewhere in the same source module.
!he otject code assembled from at
least one coded statement per group
is also included. A ccmplete summary
of machine instruction formats with
the ceded assembler language variants
can be found in Appendix I I I and
IV.

RR Format
You use the instructions with the
RR format mainly to move data tetween
registers. !he oFerand fields must
th us designate registers, with the
following exceptions:

o

In BCF branching instructions when
a 4-tit branching rrask reFlaces
the first register specification

•

In SVC instructions, where an
immediate value (between 0 and 255)
replaces both registers •

•

instruct~ons

Name

Operation

ALPHAI

LR

1,2

ALPHA2

LR

INDEX,REG2

GAMMA 1

BCR

DELTA 1

SVC

200.

DELTA2

SVC

TEli

Operand

Cl

¥

0 8 ,12

Syrrbols used in RR
are assumed to be
equated tc absolute values tetween
o and 15.
NO'IE:

Assembly Examples:
Assembler Language Statement

ALPHAI
,

Object Code of
Machine Instruction
in Hex

LR

RR Format

2 bytes

92

0'\
1

RX Format

Name

Operation

Operand

.,r

ALPHA1

L

1,200(4,10)

ALPHA2

L

REG1,200(INDEX,BASE)

BETA1

L

2,200(,10)

BETA2

L

GAMMA 1

L

GAMMA2

L

In Be branching instructicns a 4-

DELTA1

L

tit tranching roask, with a value
between 0 and 15, replaces the first
register specification.

LAMDA1

BC

LAMDA2

BC

You use the instructions with the
RX format mainly to move data bet~een
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:

"'.~

Literal Specification

•

NOTES:
•

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

Assembly Examples:

4,

See C5

•

'. . •.,. ADDRESS

15.

•

o

2. Symbols used to rel=resent implicit
addresses can be either re10catatle
or atsolute.

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

Assembler Language Statement

ALPHA1

~.

Object Code of
Machine Instructio
in Hex

1'fOO(4,10'

5

o

8

Operation
RX Format

Code

15 81

Registers
R1

2

I~ I

C

8

Displacement

Base from Base

1 Ixlx
4

X

X

I

GAMMA 1

o
Section D:

Machine Instructions

93

RS Format

Name

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).

O

In the Insert Characters under Mask
(ICM) and the Store Characters Under
f.'!ask (STCM) instructions, when a
4-hit mask, with a value between
o and 15, replaces the second
register specification.

Operation

(C!

Operand

ALPHAl

LM

4,6,20(12)

ALPHA2

LM

REG4,REG6,20(BASE)

BETA1

STM

4,6,AREA.

BETA2

STM

4,6,DISPL(BASE)

GAMMA 1

SLL

2,15

GAMMA 2

SLL

2,O(1S}

DELTA1

ICM

3,

DELTA2

ICM

REG3 ,MASK, IMPLICIT.

~.~

•

NOTES:
1. Symbols used to

•

re~resent

registers are assumed to be equated
to atsolute values between 0 and

0

15 •

•

2. Symbols used to re~resent imElicit
addresses can be either relocatatle
or absolute.

•

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

1024(10}

Assembly Examples:
Assembler Language Statement

Object Code of
Machine Instruction
In Hex

ALPHA1

1
RS Format

DELTAl

94

4

Displacement
from Base

o

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

o

SI Format

o

You use the instructions with the
SI format mainly to move immediate
data into virtual stcrage. The
operand fields must therefore
designate inmediate data and virtual
storage addresses, with the following
exception:
An immediate field is not needed
in the statements whose o~eration
codes are: LPSW, SSM, TS, TeE, and
TIO.

Operation

Name

ALPHAl

CLI

ALPHA 2

CLI

BETAl

CLI

BETA2

CLI

Operand

40(9) ,X'40'

8 DISPL40 (NINE) ' • •;.
."'"'-IMPLICIT , , . . . . . - .

~EY,C'E'

o [GAMMAI

LPSW

o (9)

GAMMA 2

LPSW

NEWSTATE .........

NOTES:

•

•

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 reFresent
displacements in explicit addresses
are assumed to be equated to absolute
values between 0 and 4095.

ALPHAl

Object Code of
Machine Instruction
In Hex

o
SI Format

o
Section 0:

Machine Instructions

95

Page of GC33-4010-O
Revlsed September 29, 1972
By TNt GN33-8148

,0,·

(4..:_c;J
Mnemonic
Operation
Codes

Description

Assembled
Operation
Code in
Hex

SIO

9COO

Start I/O

SIOF

OC01

Start I/O fast
release

HIO

9EOO

Halt I/O

HOV

9EOl

Halt Device

STIOP

B202

Store CPU 10

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

STIOC

8203

Store Channel

SCK

B204

Set Clock

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

STCK

8205

Store Clock

SCKC

B206

Set Clock Comparator

STCKC

B207

Store Clock Comparator

SPT

B208

Set CPU Timer

STPT

B209

Store CPU Timer

PTLB

B200

Purge Translation
Lookaside Buffer

RR8

8213

Reset Reference Bit

S Format

10

/'~~\

96

~:l

o

55 Fonnat
You use the instructions with the
55 format mainly to move data between
two virtual storage locations.
The operand fields and subfields
must therefore designate virtual
storage addresses and the ex~licit
data lengths you wish to include.
However, note the following
exception:

O

In the Shift and Round r;ecimal (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 S5 instructicns with
two length specifications.

•

4:)

Name

Operation

ALPHAI

AP

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

ALPHA2

AP

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

ALPHA3

AP

FIELDl,FIELD2

ALPHA4

AP

AREA ( 9) , AREA2 ( 6 )

ALPHA5

AP

DISP40(,8) ,DISP30(,7)

".:>:i/.

....

......,,

.::::~~!£~1~~t~?i
as~ig~<3' to ·~,e·.· . . p~~~~d!n9+<;:on~Q+···
sect ioit~, '
, ",

;,1"'_···"';'1

'~

112

o

E2D -- FIRST CONTROL SECTION -

SPECIFICATIONS

Any Machine Instruction
The Following Assembler Instructions:

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

-

•

INSTRUCTIONS THAT ESTAELISH THE
FIRST CONTROL SECTION: Any
instruction that affects the location
counter or uses its current value
estatlishes the beginning of the
first executable control section.
The instructions that establish
the first control section are listed
in the figure to the right.
The statements copied into a source

by a COpy instruction, if
O module
specified, determine whether or
not it will initiate the first
control section.
fi+ ;':0$
f,lnty

NO'IE: The [SECT, COM, andJ:XD
instructions initiate reference
control sections and de net establish
the first executable control section.

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.

o

First Contrl Sect.
Source Module

ICTL

WHAT MUST COME EEFORE THE FIRST
CONTROL SEC'IION: The following
instructions or groups of
instructions, if s~ecified, must
appear before the first control
section, as shown in the figure
to the right.
• The ICTL instructien, which,
if specified, must be the first
statement in a source module

O

.(seeAnyJ1 B)source macro

OPSYN

MACRO
MACl
MEND

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

MACRO
MAC 2
MEND

definitions

• The COpy instructien, if the
code to be copied contains only
OPSYN instructions or com~lete macro
definitions.

MACRO
MAC 3
MEND

o
Section E:

Program Sectioning

113

wHA~ CAN CF~ICNALLY CO~E EEFORE
THE FIRST CON~ROL SEC~ION: ~he
instructions or groups of
instructions that can c~tionally
be specified before the first control
section are shown in the figure
to the right •

•
•

Source Module

Any instructions copied 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 specified,
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.

COpy
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

I

I
Dummy Control Sections I

Common Control Sections

External Dummy Control Sections

I

Any Conditional Assembly Instruct.§ii]

&E

c
114

o

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

2. By coding any instruction,

O

Type Code
Assigned for
External Symbol
Dictionary

PC

Notes

I/START

1/

othe~

than the START or CSECT instruction,
that initiates the first executable
control section.
The unnamed control section is
sometimes referred te as private
code.

Unnamed Control
Sections in separate
Source Modules

G.."

END
Unnecessary unless
dictated by specific
programming purpose

~

PC

"-

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 centrol 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.

o

~~ ~ 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 code"

COannon control sections
COM instruction)

••••••td.····.a-opy ·controlsections

theD$EC'l'···instruction)

E2F -- LITERAL POOLS IN CONTROL
SECTIONS

Location
in hex

o

Source Modultt

SECT!

START

Literals, collected into pools by
the assembler, are asse~bled as
pa rt of the e xecutabl e control
section to which the pools belong.
If a LTORG instruction is specified
at the end of each control sectien,
the literals specified for that
section will be assembled into the
OpoOI starting at the LTORG
instruction. If no LTORG 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.

0

O

o

=A (ADR)

NOTE: If any control section is
divided into segments, a LTORG
instruction should be specified
at the end of each segrrent to create
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

,~

',,:...:p'

Name

Instruction

Entry

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

optional

1. Its symbolic name, if cne is
specified

•

•

optional
DQ$,

The figure to the right lists:

.bl~j:i:,~

1. The assembler instructions that
def ine control sections and dummy
control sections or identify entry •
and external symbols,

optional

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.

SD}

CSECT
START

SO

Any instruction that
initiates the unnamed
control section

3. Its individual identification
4. Its starting address.

START

CSECT

2. Its type code

o

TVpe code entered into external
symbol dictionary

'COM

if nam.e
entry IS
present

PC } if name
entry is
PC omitted
PC

CM

OSECT

none

ENTRY

LD

EXTRN

ER

DOS
~Wi

•

DC(V-type adER
dress constant)
WXTRN

0

WX

DOS The' maxim_·~~~t>f·:external s~l~~;

dictionary entl::'ie~(cont~l, . sections r~j
dunu:ay .contr()l S.Ct.t~1 .an4 ext....+.;' ;~r

:r:~!:~.a~!=;·~:::;~i:~0~~·'· .•.
,.;;1

identifie4bythe.'UTRt' ins~cttCJ
.ts20i .•; ···;b(;;~\f;.,>

()
......

116

~

o

E3 - Defining a Control Section

You must use the instructions described telow to indicate
to the asse~bler:
•

Where a control section begins and

•

Which type of centrel section is being defined.

E3A -- THE START INSTRUCTION
Purpose
The START instruction can be used only to initiate the
first or only executable control section of a source ncdule.
You should use the S~AR! instruction for this purpose,
because it allows you:
1. To determine exactly where the first control secticn
is to begin; you thereby avoid the accidental initiation
of the first control section by some other instruction.

o

2. To give a symbolic name to the first control section,
which can then be distinguished from the other contrel
sections listed in the external symtol dictionary.
3. To specify the initial setting of the location counter
for the first or only control section.
Specifications
The START instruction rrust be the
first instruction of the first
executable control section of a
source module. It must not be
preceded by any instruction that
affects the location counter and
thereby causes the first control
section to be initiated.
The format of the START instruction
statement is given in the figure
to the right.

START
Name

Operation

Any Symbol
or blank

START

Operand
A self-defining
term, or blank

o
Section E:

Program Sectioning

117

Source Module

Location In
Hex

000000

FIRST

START

o

000000

•
•
•
••

118

The symbol in the name field, if
specified, identifies the first
control section. It must be used
in the name field of any CSECT
instruction that indicates the
continuation of the first control
section. This symbol represents
the address of the first byte of
the·control section and has a length
attribute value of 1.
The assembler uses the value of
the self-defining term in the operand
field, if specified, to set the
location counter to an initial value
for the source module. All control
sections are aligned on a doubleword
boundary. Therefore, if the value
specified in the operand is not
divisible by eight, the assembler
sets the initial value of the
location counter to the next higher
doubleword boundary. If the operand
entry is omitted, the assembler
sets the initial value to O.

000004
000004

/~ . ""

~-I

END

Further Examples:

•
••

001000
001000
000020

A
B
C

START
START
START

000000

0

START

X'1000'
4096
30

0'"

Source Module

"

FIRST

•

•

e

o

o

START

The source statements that follow
the START instruction are assembled
into the first control section.
If a CSECT instruction indicates
the continuation of the first control
sect ion, the source statements tha t
follow this CSECT instruction ar,e
also assembled into the first control
section.
Any instruction that defines a ne~
or continued control section marks
the end of the preceding control
section or portion of a control
section. The END instruction marks
the end of the control section in
effect.

E3B -- THE CSECT INSTRUCTION

END

Purpose
The CSECT instruction allows you to initiate an executable
control section or indicate the continuation of an
executable control section.

Specifications
The CSECT instruction can be used anywhere in a source
module after any source macro definitions that are
specified. If it is used to initiate the first executable
control section, it must not be preceded ty any instructicn
that affects the location counter and thereby causes the
first control section to be initiated.
The format of the CSEC~ instruction
statement is shown in the figure
to the right.

o

CSECT

Name

Operation

Any Symbol
or blank

CSECT

Section E:

Operand
Not required

Program Sectioning

119

Page of GC33-4010-0
Redscd September 29, 1972
By n~L GN33-8148

Source Module

FIRST

o

•
•
o

START

o

The symbol in the name field, if
specified, identifies the control
section. If several CSECt
instructions within a source module
have the same symbol in the name
field, the first occurrence initiates
the control section and the rest
indicate the continuation of the
control section. If the first
control section is initiated by
a START instruction, the symbol
in the name field must be used to
indicate any continuation of the
first control section.
NOtE: A CSECT instruction with
a blank name field either initiates
or indicates the continuation of
the unnamed control section (see
E2E) •
The symbol in the name field
represents the address of the first
byte of the control section and
has a length attribute value of

END
(~,
I

1.

•
•

•

The beg inning of a control section
is aligned on a doubleword boundary.
However, the continuation of a
control section begins at the ~
available location in that control
section.
The source statements that follow
a CSECT instruction that either
initiates or indicates the
continuation of a control section
are assembled into the object code
of the control section identified
by that CSECT instruction.

Locin
Hex

•

000

Source ~. ~odule

FIRST

START 0

NOTES:
1. The end of a control section or
portion of a control section is
marked by:
a. Any instruction that defines a
new or continued control section
or
b. The END instruction.
00&

2'~>.~1'i~:t'

··.,t

~er()~a,clJ ...... , ·•. ,'.

en~()'"'J1~~II'~'SS····,. •. ,·. ,. ,·.·•.,. ~~;.~~~~~~

fl9UJ:'e()ft~.> .·ri,~~~,t~~~'Wa,~.t< .... ,
location . c()Qnt.eJ:'setting~ wben:"lls'
the· OS/VS· asselfltil.er.)'

120

'

~-f

END

Object Module

o

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 sectien 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
Loc

The figure to the right illustrates
a dummy control sectien.

Source Module

Dec

FIRST

A dummy control section (dummy

o

O
•

•

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.
Therefore, to use a dummy section
you must:

•

• Reserve a storage area for the
unformatted data

Object Modu Ie

in

•

o

fl

o
o

I

4
24
44
54
62
68

o

START

.
LA

{ US:N
CLI

I

0
IO,BUFFER
UMMY,10
KEY,C'X'

Bt1FF,R DS
DUMMY
DSECT
KEY
OS
C
//
CODE
OS
CL3 / /
NAME
OS
C~c(
ADDR
OS
/,/-CL20
WAGES
D§.-/
CLIO
HRS
/' -I1s
CL8
DEDu.e'f OS
CL6
p~1
OS
CL12
END

• Ensure that this data is loaded
into the area at execution time
• Ensure that the locations of
the symbols in the dumIrY 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) •

o

You can then refer to the unformatted
• , data symbolicall¥ by using the
symbols defined 1n the durrmy section.

Section E:

Program Sectioning

121

o

specifications
The DSECT instruction identifies
the beginning or continuation of
a dummy control section (dummy
section). One or more dummy 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 tSECT instruction
statement is given in the figure
to the right.

•
•

The symbol in the name field, if
specified, identifies the dummy
section. If several tSECT
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.

DSECT
Name
Any Symbol
or blank

Operation

Operand
Not required

DSECT

Location in
Source Module

Hex

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 fer 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.
END

122

0

o
FIRST

START

o

USING

DUMMY1,lO or USING A,lO

DS
DS
OS
•

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

•

e

.,:

.

•

CL30

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

o

•

e

SECOND

CSECT

ADCON

DC

~

A (FROM-TO

2. When establishing the
addressabili ty 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 Shbol
• · is paired with another symbol rom
the same durrmy section, and if the
symbols have the opposite sign.

END

o
Section E:

Program Sectioning

123

E3D

THE COM INSTRUCTION

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

How to Use a COffmon Centrol Section
Lac

The figure to the right illustrates
a common control sectien.

•

•

in

Source Modules

O
•

8{

The assembler assigns locations
to the symbols you define in a
common section relative to the
beginning of that ceremen 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 sectien in every
source module in which it is
specified (see F1A). If you code
identical common sections in two
or more source modules, yeu can
communicate data symbolically cetween
these modules through this common
section.

L 10,=A(AREA)
USING AREA,lO
ST

When the separately assembled object
modules are linked as ene program,
the required storage space is
reserved tor the corr~en control
section. Thus, two or more modules
share the common area.

NOTE: You can alse cede a common
control section in a source module
written in the FORTRAN language.
This allows you to communicate
tetween assembler language modules
and FCRTRAN modules.
124

START 0

A

A common control section (cornmon
section) allows you to describe
a common storage area in one or
more source modules.

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 previde the
data for the common area at execution
time.
•

Object Modules

Dec

•

3,SUM

START 0

B

8{

8,=A(AREA)
USING AREA,8

L

L

•

3,SUM

60

END

~··"~·

O
'""""

\

Page of GC33-4010..l)
Revised September 29, 1972
By TNL GN33-8148

o
L

Specifications

The COM instruction identifies the
beginning or continuation of a
common control section (common
section) •
One or m¢re common sections can
be defined in a source module.

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.

Not required

COM

Source Modules

Location in
Decimal

()

Operand

'''''~'''''' . ''''.__~'''' 'field. if

common

.Q~ttc~e

START

A

CON

''I[11111'J,'.:a

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

IICdUle

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.

•

o

The location counter for a common
section is always set to an initial
value of O. However, the
continuation of a co~mon sectien
begins at the next available location
in that comroon sectien.

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

END

•
0
0
80

B

XY

TO
FROM

START

0

COM
DS
OS

CL80
CL240

Section E:

1200
bytes

•

Program Sectioning

125

•

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

FIRST

START

USING

1. The assembler language statements

that appear in a common control
section are not assembled into
ob ject code.

•

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

o

Source Module

•

or USING A,ll

A
B

C

DOS Because the name entry of the COM
ins,tru"ction must be blank, a symbol
. , defined in tbe,common section must
be used as the base address in'a
USING instruction.

D
E
F

END
,.,rr-~
"

\

"V

,.

(",'~J
,

126

\

6

t14. -Iztem.al·Du.mzny sectiON
;;\;0$

;i~1Y

Purpose
An external dummy section is a reference control section

that allows you to describe storage areas for one or ncre
source mod~les, to be used as:
1. Work areas for each source module 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 froR 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.

o

FIRST START 0

.{ ~IAB=====D=XD====3D==~.
DXD
2FL4

Area allocated to
contain external
dummy sections

•

offset to A

Generating an External rummy Section

I
•

8

You use the Q-type address constant
to reserve storage for the offset
to the external du~my 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.

o

E2
E3
E4

SECT
DS
3C
DS
lC
DS
10H
DS
20F

QA
QB
QEXT

DC
DC
DC

EXT

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

EI

e{

L~ttOB
offset to
EXT

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

•

DUMMY DSECT
D1
DS
F
D2
DS
2D

Not an external
dummy section

END

Section E:

Prcgram Sectioning

127

How to Use External

Cu~ay

Sections

use an external dumroy section, you rrust do the fcllcwir.9
(as illustrated in the figure telow) :

~o

~IdentifY and define the external dURmy section.

asseabler w111

ccm~ute

~he

the length and alignrrent required.

~provide a Q-type ccnstant fcr each external du~~y section
defined.

•

Use the exc instruction to reserve a full~ord area into
which the linkage editor or loader will insert the tctal
length of all the external dURny sectiens that are specified
in the source modules of your program. ~he linkage editer
computes this length frcm the lengths of the individual
external dun-my sections supplied ty the assentler.

~Allocate

a sterage area using the cemputed total length.

~Ioad

the address of the allocated area into a register
(for this exalTple, register 11). Ncte that register 11
~ust contain this address throughout the whole pregralT.

.j'

~Add, to the address in register 11, the cffset into the

allocated area of the desired external dUlTlTY secticn.
The linkage editor inserts this offset into the fullword
area reserved by the appropriate Q-type address ccnstar.t.
~Estatlish the addressatility of the external dUlT~y section

in conbination with the portion of the allocated area
reserved for the external dURa.y section.

~yoU can now refer s~bolically to the locations iT. the

external dUlTlTY sect1cn.
that the source statements in an external dUlTlTY secticn
are not asseatled into object code. ~hus, at execution
time you a.ust insert the data descrited into the area
reserved for the external duaa.y sections.
~ote

,.

128

t.

o
Area to contain
external dummy

. Boundary

-/

B
ITEM
NO
SUM

DSECT
DS
DS
DS

F
F
F

TWO

START

0

~/
II

i'l
:,;:1
°1
1

I

O{~R

0

•
•
BOFFS

USING

I

1

100
bytes

200
bytes

3,BOFFS
3,11
B,3,.._/

;

I

DC

Q(B)O

ST

9,SUM

•
o
Section Z:

Prog~am

Sectioning

129

£8 -Defining an Extem.l· Dum-:!'
OSf:

~*
E5A

THE DXD INSTRUCTION

Purpose
The DXD instruction allows you to
identify and define an external
dummy section.

Specifications
The DXD instruction defines an
external durrmy sectien. ~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-type address
constant in the same source module.
Otherwise, a DSECT instruction
defines a dummy section.
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 of 1 •

•

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.
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 twC 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

Name

Operation

Operand

A symbol

DXD

Same format as the operand
of a OS instruction

Example:

A

l

DXD

,

AOFFSET

DC

..

10FL3
Q(Ar

c

o

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 ~rcgram.

()
Specifications
The CXD instruction reserves a
fullword area in storage, a.nd it
can appear in one or more of the
source modules assembl~d 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
~f a fullword 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 program.

Object Code
in Hex

Example:

LENGTH

o
Section E:

Program Sectioning

131

.
C

1

;;/

This page left blank intentionally.

-J'

r"'\

I~;

,.

o

'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 ar~ more ~eaningful
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.

Fl - Addressing Within Source Modules: Establishing Addre88ability

o

•

4It

By establishing the address ability
of a control section. yeu can refer
to the symbolic addresses defined
in it in t be operands of ma chine
instructions. This is much easier
than coding the addresses in the
base-displacement 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

Xl'O"

I
LA

The assembler will convert these
implicit addresses fer 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 it

•

can compute displacements to the
addresses wi thin a control section
and

•

2. A base register to hold this

1411 A 10 iC()401

•
I

Equivalent ~

:eSB.

•

10,ADDRESb

\

•
40

~DDRESS DC

C'SAMPLE'

END

tase address.

o
, Sect.i..OIl F:

Addrcssin c;

133

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

O.the specif
a base address
assemEler can

com~ute

from which

displacements

•

• Assign a base register to contain
this base address

• • write the instruction that loads
the base register with the base
address.

•

At assembly time, the implicit
addresses you code are converted
into their eXFlicit case-displacement
~; then, they are assenhled intc
the object code of the machine
instructions in which they have
been coded •

•

At execution tin.e, the case address
is loaded into the case register
and should renain there thrcughout
the execution of your ~rogram.

o

FIRST

2
2

BEGIN

o

START 0
BALR
USING

BE~IN,

DC

F'221

jOiSPlacement
22

CONADR

END

FIA - THE USING INSTRUCTION

Purpose
The USING instruction allows you to specify a base address
and assign one or more base registers. If you also load
the base register with the base address, you have
established addressability in a control section.
To use the USING instruction correctly you should:
1. Know which locations in a control section are made
addressable by the USING instruction
2. Know where in a source module you can use these
estaclished addresses as implicit addresses in instruction
operands.

134

Object Code
in Hex

Source Module

Location
in Hex

•

Page of G(,33-40 10-5
As Updated 28 Dec 1981
By TNL GN20-3

The Range of a USING Instruction
Source Module

·
O

The range of a USING instruction
(called the USING range) is the
4,096 bytes beginning at the ~
•
address specified in the USING
instruction. Addresses that lie
within the USING range can ce
~ converted frorr their implicit to
their explicit form; those outside
•
the USING range cannot be converted.

FIRST

, ' "

START

USING BASADR,BASREG ~

The USING range does not depend
upon the position of , the USING
instruction in the source module;
rather, it depends upon the location
of the base address specified in
the USING instruction.
NOTE: The USING range is the range
of addresses in a control section
that is associated with the base
• · register specified in the USING
instruction. If tha USING
instruction assigns reore than one
base register, the composite USING
range is the sum of the USING ranges
that would apply if the base
registers were specified in separate
USING instructions. If register 0
is specified as the base register,
the USING range will-se-location 0
through 4095 regardless of the base
address specified.

l

•

5,INSIDE

L

USING
domain

• ,.
BASADR

•

L

5,INSIDE

L

5,OUTSIDE

DS

F

DS

F

O

The Domain of a USING Instruction
BASADR+4095

•

The domain of a USING instruction
(called the USING domain) begins
where the USING instruction appears
in a source module and continues
to the end of the source module.
(Exceptions are discussed later
in this subsection, under NOTES
ABOUT THE USING DOMAIN.)
The
assembler converts implicit address
references into their explicit form:
1. If the address reference appears
in the domain of a USING instruction
and

ST

•

OUTSIDE

DS

END

2. If the addresses referred to
lie within the range of the same
USING instruction.
~ The assembler does not convert
address references that are outside
the USING domain. The USING domain
depends on the position of the USING
instruction in the source module
,
after conditional asserrbly, if any,
has been performed.

O

Section F:

Addressing

135

This page left blank intentionally.'

~

0)
136

o

How to Use the USING Instruction

I

You should specify your USING
instructions so that:
1. All the addresses in each control
section lie within a USING range
and
2. All the ~eferences for these
addresses lie within the
corresponding USING domain.
You should therefore place all USING
instructions at the beginning of
the source module and specify a
base address in each USING
instruction that lies at the
beginning of each control section.

•
•

o

FOR EXECUTABLE CONTROL SECTIONS:
The figure to the right illustrates
a way of establishing the
addressability of an executable
control section (defined by a START
or CSECT instruction). You specify
a base address and assign a base
register in the USING instruction •
At execution time the base register
is loaded with the correct base
address.
Note that for this particular
combination of the BALR and USING
instructions, you should code them
exactly as shown in the figure to
the right.

Source Module

Location

in Decimal

o
o

FIRST

2

BEGIN
6

10
A
B
C

USING
rmge

START
BALR
USING

0
12,0
* 12

t !1,;th1~""t-~-d;-r:-ss-"'"
II;

DS

F

DS
DS

F;'
F

as

BEGIN

4097

END

o
Section F:

Addressing

137

If a control $ection is longer than 4096 bytes, you must
assign more than one base register. This allows you to
establish the addressability of the entire control section
with one USING instruction as shown in the figure on the
opposite page.

O

The assembler assumes that the base registers that you
assign contain the correct base addresses. The address
of HERE is loaded into the first base register. 'Ihe
addresses HERE+4096 and HERE+8192 are loaded into the
second and third base registers respectively.

41tNote that you must define the address, EASES, within the
first part of the total USING range, that ~s, the addresses
covered by base register 9. This is because the explicit
~address converted from the implicit address reference,
is assembled into the LM instruction. At execution time,
the assembled address must have a case register which
already contains a base address at this point; the only ~
base register loaded with its base address is register
.
9.
.
••

The addressability of addresses in the USING range covered
the second and third base re isters is not completely
esta l~shed until after the LM instruction •.

NOTE: Addresses specified in address constants (exce~t
the S-type) are not ccnverted to their base-displacement
form.

,.

o
138

Page of GC33·40 I O·S
As Updated 28 Dec 1981
By TNL GN20·9372

o

Source Module
LONG

-

r8
HERE

aBASES
BEGIN

START
BALR
USING
LM
B
DC
DS

°

9,0
HERE,9,10,11

10,11,_S.
BEGIN
A (HERE+4:$'6, HERE+819 2 )
~H

II
USING

HERE+4095

J

I HERE+4096

J

I
I
I

l

I-

10

range

,,---"

D

USING

domain

J

l-

=-

o

I HERE+8192

I

i_

II

I'--

I
ioo.-

~

I

HERE+12287

J
END

o
Section F:

Addressing

139

FOR REFERENCE CONTROL SECTIONS:

o
•
•

•

•

The figure to the right illustrates
how to estatlish the addressability
of a dummy section. A durrmy section
is a reference control section
defined by the DSEC~ instructions.
Examples of establishing
address ability for the ether
reference control sections are given
in E3C and E4.
As the tase address, yeu sheuld
specify the address of the first
tyte of the durrrry seetien, Be that
all its addresses lie within the
~ertinent USIl\G range.

Source Module

FIRST

0
12,0
:::,12
11, INPUT

:.
DS

XL200

L

3,F-O

~SING ~INDATAlll

•

The address you load into the base
register must be the address of
the storage area being formatted
by the dummy section.
Note that the assembler assumes
that you are referring to the
symbolic addresses of the dummy
section, and it computes
displacements accordingly. However,
at execution time, the assembled
addresses refer to the location
of real data in the storage area.

START
BALR
USING
LA

INPUT

INDATA
A

DSECT
DS

F

DS

•

USING

range

8

F

o

END

o
140

Specifications for the USING Instruction
USING

The USING instruction must te coded
as shown in the figure to the right.
The operand, EASE, specifies a base
address, which can be a relocatable
or ~bsolute expression. 1he value
of the expr:ession must lie between
_22~ and 22~-1.
J
The rem~ining operands specify from
1 to 16 base registers. ~he operands
must be absolute expressions whose
values lie in the range 0 through

Name

Operation

Sequence
symbol or
blank

USING

Operand

BASE,BASREGl~BASEREG~

••

Example:

BASE,9,lO,11

USING

15.

Logical Equivalent

O
•

The assembler assumes tha.t the first
base register (EASREG1) contains
the base address BASE at executicn
time. If present, the subsequent
operands, BASREG2, BASREG3, ••• ,
represent registers that the
assembler assumes will contain the
address values, EASE+4096,
BASE+8192, ••• , respectively.

BASE,9
BASE+4096,lO
BASE+8l92,11

USING
USING
USING

BREAK

o

START

o

USING
BASEl
First and

second

•

DS

.

DROP

USING

NOTES ABOUT THE USING DOMAIN: The
domain of a USING instruction
continues until the end of a source
module except when:

range

BASE 2

O.specifies
A subsequent tROP instruction
the same base register
or registers assigned by the
preceding USING instruction.

Third
USING

DS
USING

range

• • A subsequent USING instruction
specifies the same register or
registers assigned by the preceding
-USING instruction.
eUSING

o

END

Section F:

Addressing

141

Source Module

CONFLICT

START

0

USING

DS

A

first
USING
domain

o
•
•

•

NOTES ABOUt tEE USING RANGE: t~c
USI~G ranges coincide when the same
tase address is Sfecified in t~c
different USING instructions, even
though the tase registers used are
different. When two USIN~ ranges
coincide, tte assentler uses the
higher numbered register for
asserrtling the addresses ~ithin
the ccmncn USING range. In the
example, this aff1ies cnly tc the
implici t addresses that appear after
the second USING instruction. In
effect, the first USING domain is
terminated after the seccnd USING
instructicn.

common
USING
range

•

DS

B

USING
,;/'

second
USING

(A+4095)

L

END

,.

142

•
•

()
'

,

.',',1

Source Module

OVERLAP

START

OS

o

'

OS

USING ranges overlap when the
tase address of cne USING instructicn
lies .ithin the range of another
USING instructicn. When twc ranges
overlap, the assembler computes
displacements frcn the base address
that gives the smallest displacement;
it uses the cerres~ending ~
re~ister .hen it assembles the
ad resses within the range everla~ •
~his applies only to imilicit
addresses ttat a~pear a ter the
seccnd USING instruction.
~wo

•
•
•
•·

OS
second
USING

range

L

(RANGE2 +4095)

END

EASE

lOR }'ESO~U1E
}.bselute/addresses used
in a source mcdule Rust alse be
~ade addressable.
}.bsolute addresses
require a base register cther than
the base register assigned to
relocatable addresses (as described
above) •
REGIS~E~S

AD~~ESSES:

However, the asserrbler does net
need a USING instruction to convert
•
absolute irrElicit addresses in the
range 0 thrcugh 4,095 to their
. . explicit forre. ~he assen:tler uses
~register 0 as a base register •
~isplacements are ceR~uted freR
•
the base address 0, because the
asseretler assumes that a base cr
inde~ of 0 implies that a zero
quantity' is te be used in fcrning
the address, regardless of the
contents ef register O. 1he USING
, domain for this automatic base---register assignRent is the ~hcle
of a source medule.

O

o

Source Module
ABS

Object Code
in Hex

START

USING

range

LA

0-4095

•
END

Section F:

Addressing

143

;£'h
\~,;i
Source Module

ABS

START

Object Code
in Hex

o

For acsolute implicit addresses
greater than 4095, a USING
instruction must be specified
according tc the fcllc~ing:
~. with a base address representing
an atsolute expressicn, and

USING

range
4096-8191

~.

with a base register that has
not been assigned by a USING
instructien ir; which a relecatable
base address is specified •

•

LA

This tase register Il'ust be leaded
with the base address specified.

END

FIB - THE DROP INSTRUCTION

purpose
You can use the DROP instruction to indicate to the
assembler that one or more registers are no longer available
as base registers. This allows you:
1. To free case registers for other programming purposes
2. To ensure that the assembler uses the base register
you wish in a particular coding situation, for example,
when two USING ranges overlap or coincide (as described
above in F1A, Notes about the USING range) •

144

1024

Specifications·

DROP
The CROP instruction must be coded
as shown in the figure to the right.
Up to 16 operands can be specified.
They must be absolute expressions
whose values represent the general
registers 0 through 15. A tROP
instructioh with a blank cperand
field causes all currently active
base registers assigned by USING
instructions to be dropped.

Name

Operation

BASREGI

DROP

Sequence
symbol
or blank

Operand

[BASREG~ ..•

or blank

Source Module

DROPS

BASE

o

•

After a DROP instruction, the
assembler will not use the registers
specified in a DROP instruction
as base registers. ~ register made
unavailable as a base register by
a DROP instruction can be reassigned
as a base register by a subsequent
USING instruction.

USING

range

START

o

USING

BASE,10

DS

DROP

10
Register 10
unavailable
as a base
register

restored
USING

domain

END

o
Section F:

Addressing

145

Source Module

CHANGE

A

START

o

USING

A,9

OS

first
USING

range

~

[ROP instructien is net needed:

•

If the base address is being
cy a new USING instructien,
and the same base register is
assigned. Hcwever, the new case
address must be loaded into the
•
tase register. Nete that the
~ implicit address "E" lies within
the first USING denain, and that
~ the base address to which it refers
lies within tr.e first USING range.
~ changed

•

9,8-··
.· •
B,9

second
USING

range

At the end of a source module.

END

()

~\

146

o

F2 - Addressing Between Source Modules: Symbolic Linkage

This section describes symbolic
linkage, that is, using symtols
to communicate between different
source modules that are separately
assembled and then linked together
by the linkage editor.

J

How to Establish Symbolic Linkage
You must establish symbolic linkage
between source modules so that you
can refer or tranch to sy~bolic
locations defined in the control
sections of external source modules.
~o establish symbolic linkdge with
an external source module you must
do the following:

o

•
•

1. In the current source module,
you must identify the symbols that
are not defined in that source
module, if you wish to use them
in instruction operands. These
symbols are called external symbols,
because they are defined in another
(external) source module. You
identify external symbols in the
EXTRN or WXTRN instruction or the
V-type address constant.
2. In the external source modules,
you must identify the symbols that
are defined in those source modules
and to which you ref~r from the
current source module. These symbols
are called entry symbols because
they provide points of entry to
a control section in a source module.
You identify entry symbols wltb
the ENTRY instruction.
3. You must provide the A-ty~e or
y-type address constants needed
by the assembler to reserve storage
for the addresses represented by
the external symbols.

Current Source
Module

Linked Object
Modules

A START
...-Bl
•

A

'Cl

Other
(External)
Source
Modules

B START

/BI
IIi;,....'- - - - - '

8----

•

/ 1--------1

,

'-

CI

_ The assembler places information
about entry and external symbols
in the External Symbol tictionary.
The linkage editor uses this
information to resolve the linkage
• addresses identified by the entry
and external symbols.

o
Section F:

Addressing

147

Source Modules

Linked
Object Modules

CURRENT START
EXTRN

e{LUSINGlO,ADBUFF
DATA,lO
CURRENT
DC

•

•
•

10 REFER 1C EXTERNAL tAT!: You
should use the EX1RN instructicn
to identify the external symtol
that represents data in an external
source module, if you wish to refer
to this data symtclically.
For example, you can identify the
address of a data area as an external
symtol and load the address constant
specifying this symbol into a tase
register. 1hen, ycu use this tase
register when establishing the
addressat:ility of a dUlnry sect10n
that formats this external data.
You can now refer synt:clically tc
the data that the external area
contains.

DA..TA
KEY""
CODE ""
NAME
ADDR
WAGES
HRS
DEDUCT
PAY

D.SECT
DS
C
DS
CL3
bs CL20
DS' CL20
DS ""CLIO
DS
cbs-J'
DS
CL6 ""
DS
CL12 "END

OTHER

•

you reust also identify, in the
source module that contains the
data area, the address cf the data
• · as an entry symbol.

ENTRY BUFFER

END

,.

148

A (BUFFER)

"

c

10 BRANCH 1C AN EXTERNAL AttRESS:
You should use the V-ty~e address
~constant to identify the external
symtol that represents the address
in an external source module to
which you wish tc tranch. Fcr the
specifications of the v-type address
constant, see G3L •
•
•

For exampl:e, you can lead into a
J
register the V-tyte address constant
that identifies t e external synbcl.
Using this register, you can then
tranch to the external address
represented by the symtol.

Source Modules

CURRENT START 0

....

L 3,EXTADR

•

8B.R 3

EXTADR

o

DC V(OTHER)

END

•·

•

C'

If the syrrtol is tbe nane entry
of a STARt or CSEC1 instruction
in the other source ncdule, and
thus names an executatle control
section, it is autcnatically
identified as an entry symbol.
If the syrrtol re~resents an address
in the middle of a control section,
you !rust, hcwever, identify ita s
an entry syrobol for the external
source nodule.
You can also use a comtination of
an EXiRN instructicn tc identify
and an A-ty~e address constant to
contain the external tranch address.
However, the v-type address constant
is more convenient tecause:

GOTHER START 0
ENTRY SUBRTN8

SUBRTN PS OH

END

1. You do net have to use an EXiRN
instruction.

2. The syrr.bcl identified js not
considered as definep in the source
module and can te uSed as the nane
entry for any other statement in
the same source ncdule.

o
Section F:

Addressing

149

F2A - THE

E~TBY

o

INSTRUCTICN

Purpose
The entry instruction allows you
to identify symtcls defined in a
source module so that they can te
referred to in anether seurce nedule.
These symbols are entry symtols.
ENTRY

Specifications
The forrr,at ef the ENTRY instructicn
is shewn in the figure to the right.

•
•
•

ENTRY

A sequence
symbol or
blank

ENTRY SYMECIS: The fellewing applies
to the entry syncels identified
in the operand field:

Operand

Operation

Name

One or more
relocatable
symbols separated
by commas

They must te valid syntols.
j'

• They must be defined in an
executable control section.
• They must not be defined in a
durr,my contrel sectien, a cernren
contrel section, or an external
contrel section.
• The length attribute value ef
entry symtols is the sane as the
length attribute/value of the symtol
at its peint ef definition.

•

•

A syrrcol used as the name entry
of a START cr eSECT instructien
is also autematically considered
an entry syncol and dces not have
to be identified by an ENTRY
instruction.
The assembler lists each entry
symtol of a scurce ncdule in an
External Syrrbol r:ictionary along
w1th entr1es for external syrrccls,
corrmen centrol sections, and external
contrel sections. The maximum
number of External Syrrtcl Dictionary
entries for each source module is
399.

Source Module

•

FIRST

0SUBRTN
,.

•

DUMMY

Symbol

START 0

·
·

•

150

NOTE: A syrrce," identified in an
ENTRY instruction counts towards
~rraxinuIr, even theugh it roay
not be used in the name field of
a statement in the scurce module
nor constitute a valid entry point.

FIRST

ENTRY SUBRTN,INVALID SUBRTN
INVALID
DS

·

OH

DSECT

·
·

INVALID DS

i.$

Entry in External.
Symbol Dictionary

END

•

DUMMY

F

INVALID

Type Code

SD
LD
LD

none

-

o

F2B - THE EXTRN INSTRUCTICN

Purpose
The EXTRN instruction allows you
to identify symtcls referred tc
in-a source module tut defined in
another scurce ncdule. These syrrbc;s
are external symbols.
Specificaticns

EXTRN

The format cf the ~XTRN instructicn
staterrent is shown in the figure
to the right.

Name

Operation

Sequence
symbol
or blank

EXTRN

Operand
One or more relocatable
symbols separated by
commas

EXTERNAL SY~EOLS: The follcwing
applies to the external symtols
identified in the c~erand field:
••

They must be valid syml:ols.
Source Modules

• They must not be used as the
name entry cf a scurce staterrent
in ~he sourc~ module in which they
are identified.

o

• They have a length attritute
value of 1.

CURRENT START 0

The asserrtler lists each external
symbcl identified in a source module
in the External Syrrtcl ~icticnar~
along with entries for entry sym ols,
COIlimcn control secticns, and external
contrcl secticns. The maximum
numl:er of External Syrrl:cl Dicticnary
entries for each source module is

•

·

L
BR

3,EXTAD
3

L
BR

4,ADSUBRT
4

EXTAD
DC
ADSUBRT DC

v (SUBRTN)

·
·

·

ihe Jtaximum number of external

-

}~yml:ol dictionat;y entries (contrcl
;;~ctions andel[ternal.symtols)

allowed is 1'11. The maxiltult
..11owable number of entry.symbol,s
identified l:y the EN'!RY.instruetion
is 200~
NOTE:

o

•

The syrrbcl s~ecified in a
address constant is implicitly
identified as an external s~rrbcl
and ccunts tOwards this max~mum.

OTHER

Type Code

CURRENT

SD

OTHER

ER

SUBRTN

ER

START 0

OTHER

SD

ENTRY SUBRTN

SUBRTN

LD

·

SUBRTN

Symbol

A(OTHER)

END

399 •
.DO$

•
•
•

EXTRN OTHER

• Tohey Iliust te used a lcne and
cannct be Eaired when used. in an
expression (fer ~air~:n9 cf texlIS
see C6) •
~

•

Entry in External.
Symbol Dictionary

DS

·

OH

v-ty~e

END

Section F:

Addressing

151

p2C -

THE wXTRN INSTRUCTICN

Purpose
The ~XTRN instruction allows you
to identify symtcls refer%ed tc
in a source module but defined in
another scurce Rcdule.
The ~XTR~ instruction differs from
the EXTRN instructicn as follc~s:
The EXTRN instruction causes the
linkage editor to rrake an autoRatic
search of libraries to find the
module that ccntains the external
symbcls that you identify in its
operand field. If tr.e rrodule is
found, linkage addresses are
resolved; then the rrcdule is linked
to your module, which contains the
EXTRN instruction.
The ~XTRN instructicn su~~resses
this autcmatic search cf litraries.
The linkage editor will only resolve
the linkage addresses if the external
syrobcls that you identify in the
WXTRN o~erand 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 cf an
EXTRN instruction in another module
linked and lcaded with ycurs.

WXTRN

Specifications

•
•

EXTERNAL SYMEOLS: The external
symbcls identif ied 1:y a wXTRN
instruction have the saIr.e ~rc~erties
as the external symbcls identified
ty the EXTRN instructicn. However,
the type code assigned to these
external syn1:cls differs.

NOTE: If a symbol, specified in
8 a V-type address constant, is also
identified by a wXTRN instruction
in the saRe scurce rr-cdule, it is
assigned the same type code as the
symtol in the WXTRN instructicn.
If an externaL symbol is identified
ty toth an EX7RN and WXTRN
instruction in the same source
module, tbe first declaration takes
• , arecedence, and subsequent
eclarations are flagged with warning
messages.
152

Operand

Operation

Name

The format cf the ~XTRN instructicn
staterr-ent is shown in the figure
to the right.

Sequence
symbol
or blank

One or more relocatable
symbols separated by
commas

WXTRN

Source Module.

Entry in External
Symbol Dictionary
Symbol

FIRST START 0
EX : RN OUT,A__ •
,. e
eWXTRN WOUT,A
•• WARNING •• ~
VCON

.

DC

END

•

v (WOUT)

, '

Type Code

FIRST

SD

OUT

ER

.. ~ ii

-ER

WOUT

WX

WOUT

WX

o

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

area~

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

By

Gl - Establishing Symbolic Representation
You define symbols tc be used as
elements in your programs. This
~ symbolic representaticn is superior
~ to numeric representation 'because:
• You can give meaningful names
to the element~:
• 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.

e..

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
RELOC

••

EQU
EQU
EQU
EQU
EQU

·

10
80
240
12

••
•

BALR 12,0
USING *,BASREG

·

B

•
••

INSTR

DATACON
TO
FROM

INSTR

•

......
U
r~

MVC
L

TO,FROM
DATAREG,DATACON

DC
DS
DS

F_' 3'

•

·

-

CL{EIGHTY)
CL (TW040)

•

END

Section G: Symbol and Data Definition

153

Assign1ng Values
You can create symbols and assign"
them absolute or relecatable values
anywhere in a source module with
an EQU instruction (see G2A). You
c~n 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 asserebly 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 syrebolic form are:

Source Code

5,LABEL
Equi valent {:

define the data

••

prov ide a labe 1 f or the data

••

refer to the data by its label.

IOOOOOOCAI

5,=F'202'

0

oj"

O.

.LABEL

The symbol used as a label represents

address of the ccnstant; it
O the
is not to be confused with the
I

•

•----

Object Code
in Hex

DC

---0

F'202'

•
'\;;;

-IOOOOOOOCA
,
..

assembled oJ: 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 fer insertion and
manipulation of data at execution
time. The three steps for reserving
virtual storage and using it in
your program are:

o.

define the space

••

provide a label fer the space

••

refer to the space by its label.

ST
.SPACE

Defining storage areas is discussed
in G3N.

154

DS

•

5,SPACE

o
F

CHANNEL COl'H~ANP 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;

o

• define the channel command word
• provide a label fcr the word.
Channel corrrrand words are discussed
in subsection G3C.

J

G2 - Defining Symbols
G2A --

IJ:HE

E~U

INSIJ:FUCIJ:'ION

INSTR

Purpose
~he E~U instruction allows you to
assign atsolute or relecatable
values to symbols. You can use
it for the following ~ur~eses;

o

•

1. To assign single al:solute values
to syrrl:ols

8

2. 1]:0 assign the values of previously
defined syrr.tols or ex~ressiens te
new symbols, thus allowing you to
use different mnerrenics fer different

_-_-ABS
HEXA2

BALR

12,0

EQU

X'A2'

o

EQU

ABS

BEGIN

}

INSTR •

pur~oses.

~3. To comfute eXfres~icnS~bcse
values are unknown a~ coding time
or difficult to calculate. IJ:he
value of the expression is then
• . assigned to a syrrl:cl.

8

EXPR

EQU

\

•

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

o
Section G: Symbol and Data Definition

155

Specifications
The EQU instruction can be used
anywhere in a source module after
the ICTL instruction, o~after any
source macro definitions, that may
be specified. -Note, however, that
the FQU instruc·tion 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.
DOClJ

3

.• •

i.i J"

12
0-3

ALIGNMENT
First operand can
end on any byte
boundary

o

TOTAL

115-1S\
Bytes

.

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

Scale

Binary digits for fixed-point (H,F)
constants
He~adecimal digits fer fleatingpoint (E,D,l) constants

o
•

-

Allowable Range for
Scale Modifier

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

DC

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

DC

HS3~

DC

FS(A+B-C*3} '2.3'

HS-132'5.55'

A decimal self-defining term or
absolute expression enclosed
1n parentheses.
DC

ES12'19.3"

DC

LS22'3.414'

.p'-~"y'
Both types of specification can
be preceded by a sign; if no sign
is Fresent, a plus sign is assumed.

Fixed-point
Constants

(H,F)

- 187
through
+346

Floating-point
Constants

~n

~'~ . l;~

o

Examples:

I

(E,D)

o through 14

(L)

o through 28

Section G: Symbol and Data Definition

175

Object Code

o

Binary digits

OOOOOOOofOOOOO~

DC H'2'

OOOOOO°of°OOlO~ol

•
•
•

SCALE MODIFIER FOR FIXEP-POINT
CONStANTS: The scale modifier for
fixed-point constants s~ecifies
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 is
assemcled in its final "scaled"
form. Scaling causes the binary
point to move from its assumed f1xed
position at the right of the
rightmost bit position.

OOOOOOO+OOOl~
OOOOOOOofOOOlO.Oll
-J'

o

176

Object Code

Source Code
Converted to Binar~
Representation

Btnary digits

Binary
point

DC

Converted to Binary representation
~O'IES:

4It

•

o

1. When the scale ncdifier has a
value, it indicates the
number of binary positions to te
occu~ied ty tEe fractienal ~crticn
of the binary number.
~ositive

2. When the scale nedifier bas a
negative value, it indicates the
number of binary lositions to te
deleted fron the nteger Eorticn
of the binary numcer.

3. When ~esitions are lest tecause
of scaling (or lack of scaling) ,
~ rounding occurs in the leftmosttit of the lest ~crticn. the
rounding is reflected in the
rightnost pcsiticn saved.

Converted to Binary representation
Binary
point

4It

.I----+-------f , .

•

000001111

Converted to Binary representation

Binary
point

DC

1

o
section G: Symbol and Data Definition

177

SCALE MODIFIER ~:OR FLOA'IING-POINT
CONSTANTS: The scale modifier for
floating-point constants roust 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 leftroost 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 tecause the eXfonent in
• the characteristic portlon 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.

O

O

("~.,

Object Code
in Hex

Source Code

I~",,)j

DC E'4'

••
•
I

.L

DC ES2'4'

1"4 31010@ 000

I

I

Unnormalized
Fraction

DC E'3.3'

ROUND DC ES2'3.3'

(,...-.. _.-.....\

\,--,

I

o

EXPONENT MODIFIER: The exponent
modifier specifies the power of
10 by which the nominal value 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,L) constants. The exponent
modifier is written as En, where
n can be either of the following:
A

decimal self-defining term.

. . An absolute expression enclosed
V in parentheses.
symbols used in the ~xpression
most be" previously defined.

DOS Any

•

178

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

Exponent

Source
Code

•
•
•

DC H'4'

DC HE2'4'

....-

Binary digits

4

I0 0 0 0 0 0 0 o~ 00001001

400

1000000011100100001

DC FE (A-B::'3) '4

-

DC HE-2'400'

4

,

Object Code

Decimal Value
before conversion to binary
form

:

100000000100 000100\

!

o

NOTES:
•

•

•

•
•

o
•

1. 'the exponent ~odifier is not
to be confused with the expcnent
that can be specified in the nominal
value subfield of fixed-~oint and
floating-point constants ~ee
sections G3G and G3I).

'l'he exponent modifier affects each
nominal value specified in the
J
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 •

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

2. The value of the constant, after
any exponents have been applied,
must be contained in the implicitly
or explicitly specified length of
the constant to be assembled.

o

DC FE-20'2.25E+80'

2.25xl0

60

o
Nom. Value
Formats of Nominal
Value Subfields

Subfield q: Noroinal Value

Constant
Type

The nominal value sub field must
always be specified. It defines
the value of the ccnstant (or
constants) described and affected
by the sul::fields that ~recede it.
It is this value that is assend:led
into the internal binary
representation of the constant.
~he formats for s~ecifying nominal
values are described in the figure
to the right.

C

o

Multiple
Nominal
Values

'Value'

Not allowed

'Value'

' / ' value,.....•val ue:

B'
X

H
F
p

Imultiple values must

Z
E
0

LI,OSOnly one nominal value is allowed
.
1nbinary(S) and bexadecimal.·""lX)
constants.

How nominal values are specified
and interprete1 by the asserebler
is explained in the subsections
that descril::e each individual
constant, begiDlling at G3:c., - -

Single
Nominal
Values

.1

I

-\

L..

A}
e
Y

be separated by commas

Address

Const.nts (Value)

(V~.

v.lue........valuei

section G: Symbol and Data Definition

179

Page of GC33-4()1D-4
Revised Feb. 25, 1975
By TNL: GN33-8193

o

G3C -- LITERAL CONSTANTS

Purpose
Literal constants allow you to
define and refer to data directly
in machine instruction operands.
You do not need to define a constant
separately in another part of your
source module. The difference
between a literal, a data constant,
and a self-defining term is described
in CS.

Specifications
A literal constant is specified
in the same way as the operand of
a DC instruction. The general rules
for the operand subfields of a DC
instruction (as described in G3E
abov~ also apply 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 CC operands in the following
ways:
must
• Literals
O equal
sign.

be preceded by an

• • Multiple operands are not allowed •
•

o

3,=F'32'

L

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

MVC

•

FIELD(24},=6CL4'CANT'

,.

o
180

o

Data Constants
G3C -- EINARY

CONS~AN~

(B)

Furl=cse
The-tinary ccnstant allcws ycu tc s~ecify the I=recise tit
I=attern ycu :want assemtled into storage.
Specifications
The ccnstants of the sutfields defining a binary constant
are described in the figure telow.
Each tinary ccnstant is assenbled into the integral
O NOTE:
number of bytes required to contain the tits sl=ecified.
Binary Constants

a Constant Type

Subfield

Binary (B)
1. Du lication Factor

o

Yes

2. Modifiers

As needed

Implicit Length: (Length
Modifier not present)

B

Alignment:
(Length Modifier not present)

DC B'10101111'
C DC B'101'

L'B
L'C

Byte

Range for Lengtrn
f

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

4. Nominal Value

Binary digits
(0 or 1)

Represented by:

o

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

o

G3E -- CHARAC!ER CONS!AN! (C)
Fur~ose

The cr.aracter constant allo~s yeu tc s~ecify character
strings such as error messages, identifiers, or ether text,
that the asseabler ~ill convert into their cinary (EECrIC)
representation.
Specificaticns
!he centents of the sucfields defining a character
are descriced in the figure en the c~pesite ~age.

cc~stant

~ Each character s~ecified in the neainal value subfield
is assembled into one cyte.
Multi~le noainal values are
is s~ecified in the nominal

•

•

net allc~ed, because if a comma
value sutfield, the asseatler
considers the comma a valid character and therefore
';/
asseacles it intc its cinary (EBCDIC) re~resentatie~.
.
NOTE: When apostrophes or ampersands are to be included
in the asseabled ccnstant, doutle a~ostrephes or dcutle
ampersands aust ce s~ecified. !hey are asseabled as single
apostro~hes and am~ersands.
(

~""'­

U

182

\

o
Character Constants
Subfield

3. Constant Type
Character (C)

1. Duplication Factor

Yes

2.~

As needed

Implicit Length: (Length
Modifier not present)

C DC C'LENGTH'

Alignment:
(Length Modifier not
present)

Byte
''W

•

L'C

6

Range for length:

o

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

4. Nominal Value
Represented by:

Enclosed by:

Characters (All 256
&bit combinations)

DC C'A' 'B'
A'B
Assembled
A&B
DC C'A&&B'

Object Code (hex).

Apost rophes

Exponent aUowed:

Number of values per
Operand:

One

DC C'A,B'
Assembled A

ICI16BI c21

With blanks at right
Padding:

(X'40')

Truncation of
Assembled value:

At right

o
s~ction

G: Symbol and Data Definition

183

G3F --

HEX~tECIM~L

CCNS!~~T

~.

(X)

\,,-p!

Furt:0 se
You can use hexadecirral ccnstants to generate large tit
~atterns rr.ore conveniently than ~ith binary constants.
~lso, the hexadecimal values you specify in a source ncdule
allow you tc cOlq:are theIr.. directly "ith the hexadecimal
values generated for the object code and address locaticns
printed in the ~rograrr listing.

Specificaticns
!he contents of the sutfields defining a hexadecinal
constant are descrited in the figure on the o~posite fage.

~ Each hexadecimal digit specified in the noninal value
•
•

sutfield is assent led intc four 1:i ts (their binary ~a. tter9S
can be found in C4E) • The implicit length in tytes cf a .
hexadecimal ccnstant is then half the nurrber of hexadecimal
digits specified (assuming that a hexadecinal zerc is added
to an odd nurrter cf digits) •

,.

184

o
Hexadecimal Constents
Subfield

3. Constant Type
Hexadecimal (X)

1.Duplication Factor
allowed
2.Modlfiers
Implicit Length: (Length
Modifier not present)

Alignment:
(Length Modifier not
Range for Length:

o

Ves
As needed

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

L'X
L'Y

Byte

.1 through .2048 (bit length

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

4. Nominal Value
Represented by:

Hexadecimal digits (0
through 9 and A through

Enclosed by:

Apostrophes

F)

Obiect Code (hex)
10001111111

DC X'lF'
DC X'91F'

Exponent allowed:

Number of Values
per Operand:

Multiple

Padding:

With zeros at left

Truncation of
Assembled value:

At left

. Onty...
~

o
.

.'

.

Sect.ion G: Symboi '''and Oata Definition

185

G3G -- FIXE[-FeINT CCNSTANTS (E AN[ F)

l'i-~\

1~""J»

Purpose
Fixed-point constants allow you to introduce data that
is in a fcra suitable fer the eperatiens of the fixed-point
rr-achine instructions of the standard instruction set.
The ccnstants you define can alse be autematically aligned
to the prcper fullword or halfword toundary for tte
instructicns that refer te addresses on these boundaries
(unless the NCALGN option has teen specified; see (2) •
You can perform algetraic functicns using this type of
constant because they can have positive or negative values.
Specifications
The contents cf the subfields defining fixed-point constants
are described in the figure on the opposite page.

~ 1he nominal value can be a silned (plus is Assumed if the/
•

number is unsigned) integer, raction, or aixed number.
follo~ed by an exponent (positive or negative).
the
exponent must lie within the perrr.issible range. If an
· exponent rr.odifier (see G3E) is alsc specified, the algebraic
~ ef the exponent and the exponent mOdifier aust lie
•
within the perrr-issible range.

O

( ...;''\
"

186

.,"'--..

o

H or F

Fixed·Point Constants
3. Constant T~ee

Subfield
:

Fuliword(F)

Halfword (H)
J

1. Duelication Factor
Allowed

Yes

Yes

2. Modifiers
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

4. Nominal Value
Represented by:

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

.

o

2 bytes

Implicit Length: (Length
Modifier not present)

+ 346

+ 75

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

Apostrophes
Yes

DC/F'2E6'
Number of Values
per Operand:

Multiple

Padding:

With zeros at left

Truncation of
Assembled value:

Not allowed

•

- 187 through

- 85 through

I

•

+ 346

+ 75

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

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

DC H '2E-6'
Multiple

With zeros at left
Not allowed
(error mes:age issued)

o
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.

Length

The range of values depends on the
imPliCitl~ or-,explicitly specified
length (1 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.

8

A

fixed-~cint

constant is asse«bled as

0

Range of Valu6~ that
can be Assembled

4

_2 63 through 2 63 _1
_2 31
2 31 _1
"

2

_2 15

"

215 _1

1.

_2 7

"

27_1

-

fcllo~s:

1. ~he s~ecified num~er, multiplied ty any exponents,
is converted to a tinary numter.
2. Scaling (see G3E) is ~erfcrRed, if s~ecified.
If a
scale modifier is not provided the fracticnal portion cf
the number is lost.

3. The tinary value is rcunded, if necessary. ~he
resulting number ~ill not differ from the exact nURter
specified ty Rore than cne in the least significant 'bit
~osition at the right.
4. A negative

nUR~er

S. Cu~lication is
asseRt:led.
G3H -- CECIMAL

CONS~AN~S

is carried in 2's

a~~lied

cOR~lement

forrr.

after the constant has been

(P AND Z)

Furpcse
The decimal ccnstants allc~ ycu tc intrcduce data that
is in a forre suitable for the operations of the decinal
feature machine instructicns. ~he ~acked decimal constants
(P-ty~e) are used for processing ty the deciRal instructicn
se~.
The zcned decirral ccnstants (Z-ty~e) are in the form
~BCCIC representation) that you can use as a print inage
(exce~t the digits in the rightmost tyte).
Specifications
The contents cf the sutfields defining decimal constants
are described in the figure on the opposite page.

•

•

~he nominal value can t:e a signed (~lus is assumed if the
nun:ber is unsigned) decimal number. A dec7!r'.al ~oint can
be written any~here in the numter, tut it does net affect
the assembly of the constant in any way. ~he specified
digits are assurred tc ccnstitute an integer. Decimal
constants are assemt:led as followS:

FAC:KEt CECI~AI CCNSTAN~S: Each digit is ccnverted into.
its 4-bit binary equivalent. The sign indicator is
asserrbled intc the rightmost four tits of the ccnstant.
ZONEC

D~CIMAL CONS~AN~S:

Each digit is converted intc •
sign indicatcr
~its
lo~-crder byte of the

its 8-bit EECtIC representation. The
O· replaces
the first fcur
cf the
constant.

188

o

Page of GC33-40 10-5

As Updated 28 Dec 1981

o

By TNL GN20-9372

P or Z
Decimal Constants
3. Constant Ty~e

Subfield

Packed (P)
1. Duelication Factor

Yes

Allowed

Zonec1 (Z)
Yes

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

As needed

As needed

P DC P'+593'
L'P = 2

Z DC Z'-593'
L'Z = 3

Alignment:
(Length Modifer not present Byte

o

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)

DC P'+555'

DC Z'-555'

Represented by:

I

8

Is(sl;'ce

~~IDISI

•

Enclosed by:

Apostrophes

Apostrophes

Exponent allowed:

No

No

Number of Values
per Operand:

Multiple

Multiple

With Binary zeros
at left

With E BCDle zeros

Padding:

DC P' 5.5'

lol5151 c

8

DC P 1 55'

(XIFO')
at left

Truncation of
Assembled value:

At left

At left

o
- Section G: Symbol and Data Definition

189

the range of values that can be
assemcled into a decireal constant
is shown in the figure to the right.

Type of Decimal
Constant

Range of Values that
can be Specified

PACKED

10 31 _1 through _10 31

ZONED

10 16 _1 through _10 16

G3I -- FLOAtING-POINt CONStANtS (E, 0, and 1)

constants allow you to introduce data ttat
is in a forn suitacle fcr the c~erations ef the floating~oint feature instruction set.
These censtants have tte
following advantages ever fixed-Feint censtants.

Floating-~oint

1. You do not have to consider the fractional perticn ef
a value yeu sFecify, ncr ~orry atcut the ~esitien ef tte
deei~al ~eint when algecraie o~erations are to be ~erferroed.

2. Yeu can specify coth much larger and nuch smaller values.
3. You retain greater Frocessing Frecision, that is, yeur
values are carried in more significant figures.

Specificaticns
the ccntents of the sucfields defining floating-~eint
constants are descrired in the figure cn the o~~osite Fage.

~ the neminal value can be a si ned (plus is assuned if the

1

numl:er is uns igned) integer, racticn, cr nixed number.
folle~ed by an exponent (~ositive or negative).
the
~exponent must lie within the permi$sitle range. If ar.
exponent rrodifier (see G3B under ~cdifiers) is also
specified, the algebraic sum of the exponent and the
exponent mOdifier must lie within the pe~rrissil:le range.

190

o

Of E or L
Floating Point Constants
Subfield

3. Constant T~l!e
:

..

SHORT (E)

LONG (D)

EXTENDED (L)

Yes

Yes

Yes

4 Bytes

8 Bytes

16 Bytes

Full Word

Double Word

Double Word

Range for Length:

1 through 8 (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:

o through 14

o through 14

o through 28

Range for Exponent:

- 85 through + 75

- 85 through

4. Nominal Value

Decimal Digits . _ _
(Othroug~

Decimal Digits
( 0 through 9)

Represented by:

DC E'+S25'''''
DC E'5.25'

Enclosed by:

Apostrophes

Exponent Allowed:

1. Duelication Factor
Allowed

2. Modifiers
I mplicit Length:
(Length Modifier Not
Precent)

Alignment:
(Length Modifier Not
Present)

o

+ 75

- 85 through + 75

•

•

DC D'1.525'
DC D'+.OOl' •

Decimal Digits
( 0 through 9)

DC L'525'
DC L'3.414'_. . . .

Apostrophes

Apostrophes

Yes

Yes

DC E' lE+60' 8

Yes

DC D'-2.SEIO'8

DC L'3.7l2E-3'

Number of Values per
Operand:

Multiple

Multiple

Multiple

Padding:

With hexadecimal zeros at
right

With hexadecimal zeros at
right

With hexadecimal zeros at
right

Truncation of Assembled
Value:

Not applicable
(Values are rounded)

Not Applicable
(Values are Rounded)

~~

Not applicable
(Values are Rounded)

o
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.

O
J.
'

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 SM S (1-16- 6 ) x 16 63

D

16- 65 SM S (1-16- 14 ) x 16 63

L

16- 65 s'M S.(1-16- 28 ) x 16 63

-

(For all ThreeJ
Approximately

5.4 x 10-79~MS7.2 x 10 75

.J

FORMAT: The format of the f1oatingpoint constants is described below.
The value of the constant is
represented by two parts:

Type

Called

E

Short
FloatingPoint
Number

Format

-

31

78

Bits 0 1

~ 1. An exponent portion, followed
by

•

2.

•

A

o

D
A

fractional portien.

sign bit indicates whether a
positive or negative number has
been specified. The number specified
must first be converted into a
hexadecimal fraction, befcre 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.

L

Long
FloatingPoint
Number

Extended
FloatingPoint
. Number

7-bit
+ Characteristic

56-bit
Fraction

t

$I: .

63

78

Bits 0 1

High-order half of
112-bit Fraction

7-bit
+ Characteristic

t

l

78

Bits 01
7-bit

63
Lo~-order half of
112-bit Fraction

,.

where a,b,c .•.. are hexadecimal d.igits, and E is
an exponent that has a positive or negative value
indicated by the characteristic

192

.J

,+'

o

'BINARY REPRESENTATION: The assembler
assembles a floating-point constant
into its binary representation as
follows:

o
•

•

O

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 representedJ
hexadeciIl1al digits and the sign
indicator. The fraction is then
entered into the leftmost part of
the fraction field of the constant
(after rounding) •

DC D'-9.75'

Object Code
in Hex

by

2. An exponent portion reFresented
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.

c

Binary Representation

NOTES:
1. The L-type floating-paint:. constant
resembles two contiguous D-type
constants. The sign of the second
doubleword is assurr.ed to be the
same as the sign of the first.
The charact.eristic· 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) •

Hexadeci"
7F
7f;

.
800

65

40

&(

-64.

foo

3F

63

3E

62

- 2

00

o

-64

Values Expressed
in Characteristic

-1

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
~ausing 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
by more than one in the last place.

o

4. Negative fractions are carried
in true representation, not in the
2's complement form.
S. Duplication is applied after
the constant has been assembled.
Section G: Symbol and Data Definitiun

193

-- THE

~3J

A-~YPE

ANt

Y-~YPE

AtDRESS

CC~S~AN~S

~his subsection and the three following sutsections describe
how the different ty~es of address constants are asserrbled
from expressions that usually represent storage addresses,
and hew the constants are used for addressing wittin ar.d
tetween scurce «cdules.

Furpese
In the A-ty~e and Y-ty~e address ccnstant, yeu can specify
any of the three types of assemtly-time expressiens (see
C6), whose value the asserrbler then corr~utes and asserrbles
into ebject code. You use this expressien cerrputaticr.
as fellows:
1. Relocatable expressions for addressing
2. Absolute expressions for addressing and value
computation.
3. CCRplex relocatable expressions to relate addresses
in different source ncdules.

/

Specificaticns
~he centents cf the subfields defining t~e A-ty~e and ytype address constants are described in the figure on the
opposite page.

NOTES:

~ 1. Nc bit-length specification is allowed when a relccatatle
•

or corrplex relocatatle eXJ:ression is s~ecified. ~he only
explicit lengths that can be specified with these addresses
are:
a.

3 er 4 bytes for A-type constants

b.

2 bytes for y-type constants.

2. The value of the lccatien ceunter reference (*) when
specified in an address constant varies frem constant tc
constant, if any cf the fcllewing cr a ccrrbination of the
follo~ing are specified:
a.

~ultiple

cperands

~

b.

Multiple nerrinal values

•

c.

A duplication factor.

lccation counter is incremented with the length cf
the previeusly.asserrtled constant.

~he

3. ~hen the location counter reference eccurs in a literal
address constant, the value of the locatien counter is
the address of the first tyte of the instruction.

194

o

Address Constants

A or Y
Address Constants (A and V)
Subfield

3. Constant Ty~

1. Duelication Factor
allowed

o

A - Type

V-Type

Yes

Yes
Object Code in Hex _

4 bytes

2 bytes

Full word

Half word

•

A DC 5AL1(*-A}
0001020304

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

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

.t-

1 through 2 (byte length)

I .1 through .16 (bit length)

4. Nominal Value

Absolute...locatable. or ~ Abtolute ...locatable. or

Represented by:

complex relocatable
expressions

complex relocatable
expressions

DC A (ABSOL+ 10 )

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 1*.+4)

o

.5ti

values

Padding:

o

Truncation of
Assembled value:

section G: Symbol and Data Definition

195

CAUaIQN: S~ecificatien of y-ty~e address constants with
relocatable expressions should be avoided in ~rograms that
are to be executed en ~achines having «-ore than 32,767
tytes of sterage ea~aeity. In any case, Y-type relocatal:le
address constants should not te used in ~rograrrs tc te
executed under IEM Systerr/370 ccntrel.

o

1he A-ty~e and Y-type address constants are processed
as follows: If the ne~inal value is an al:solute ex~ressicn,
it is com~uted to its 32-tit value and then truncated cn
the left to fit the implicit or explicit length of tte
constant. If the ncrrinal value is a relccatable cr ccrroplex
relocatable expression, it is not completely evaluated
until linkage edit time when the cbject mcdules are
transformed into load modules. ~he 24-tit (er srraller)
relocated address values are then placed in the fields
set aside fcr them at assemtly tirre by the A-ty~e and ytype constants.

G3K --

~HE

S-1YPE AttRESS CONS1ANT

Furpese
You can use the S-ty~e address censtant te assemble an
explicit address (that is, an address in tase-dis~laeener.t
form). You can specify the explicit address yourself cr
allo~ the assembler to compute it from an implicit address,
using the current l:ase register and address in its
computatien (for details cn ill'~licit and explicit addresses,
see I:5B) •

Specificaticns
The contents cf the sutfields defining the S-ty~e address
constants are descrited in the figure en tbe o~~esite ~age.
The ncminal values can be

4Dt 1.

an

•
•

s~ecified

in

t~e ~ays:

As one al:so1ute or relocatat1e expressicn re~resenting
im~1icit address

2. As two absolute eXEressions, the first of which
represents the displacement and the secend, the tase.
register.
-- ,

,.

196

o

o
Address Constants (8)
8ubfield

3. Constant T~l!e
§-Type

1. Duplication Factor
Allowed

Yes

2. Modifiers

0

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

4. Nominal Value

Absolute or
relocatable expression

Represented by:

Two absolute
expressions

Enclosed by:

Parentheses

Exponeot altowed:

No

Number of Values
per operand ;

Multiple

Padding:

Not app1icable

Truncation of
Assembled value:

Not applicable

0

}8

DC S(RELOC)
DC S(10~~
DC S(512(12»

o
Section G: Symbol and Data Definition

197

G3L -- THE V-TYPE ArrRESS CONSTANT
Pur~cse

The V-ty~e address constant allows you to reserve stcrage
for tte 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 external address
specified. This use is contrasted with another nethcd,
that is: of specifying an external syrrtcl, identified
by an EXTRN instruction, in an A-type address ccnstant
(for a conparison, 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
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.

Source
Module

Object Module
in Hex

Load Module
in Hex

A

START 0

DC V(OUTSIDE)

END
B

OUTSIDE

Specificaticns
The contents cf the sutfields defining the V-ty~e address
constants are descr~ted in the figure on the o~~csite ~age •

•

The symtcl specified in the ncninal value subfield does
not ccnst1tute a def1nition of the symtol for the scurce
module in wtich the V-ty~e address constant a~pears.
The symbol specified in a V-type constant nust nct
external data in an cverlay ~rcgran.

re~resent

,.

•
198

o

0'."

1-'

Address Constants (V)
Subfield

3. Constant Type
V-Type

1. Duplication Factor
allowed

Yes

2.~

0

Implicit l.ength: (Length
Modifier not present)

Alignment: (Length
Modifier not present)
Range for Length: ._
(inb~t

Full word

4 or 3 only
(no bit length)

Range for Scale:

Not allowed

Range for Exponent:

Not allowed

4. Nominal Value
Represented by:

0

4 bytes

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)

Section G: Symbol and Data Definition

199

Page of CC33-4CIO-J

Rev iscd S-:-ptember 29, 1972
iSy TNL GN33-8148

QS G3M - ... Tl!i Q-'lYPE
QlJIy

ADHI,,:CO,stA'.

~\

\-L,j

."

FurI=cse
You use this constant tc reserve sterage fer the cffset
into a storage area of an external durrrry section. '!he
offset is en~ered intc this sface ty the linkage editcr.
~hen the offset is added to the address of an overall tleck
of storage set aside fer external durrmy sections, it allows
you to address the desired section.
(FOr a descrifticr.
of the use cf the Q-tYfe address ccnstant in combination
~ith an external dummy section, see E4.)
Specificaticns
The contents cf the sutfields defining the ~-ty~e address
constant are descrited in the figure telow.

L.

~'lhe symtol specified in the norrinal value subfield must
be I=reviously defined as the latel of a [X[ or [SEC'!
stateu:ent.
Address Constants (a)
Subfield

3. Constant Type
a-Type

1. Duplication Factor
allowed

Yes

2. Modifiers

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}

o

G3N -- 'IB! tS

INS'I~UC'IICN

Purt=0se
The tS instruction allows you to:
1. Reserve areas cf stcrage
2. Previde :latels fcr these areas
3. Use these areas by referring to the symtols defined
as latels.
The tS instruction causes no data tc be assenbled. Unlike
the tC instruction (see G3E), you do net have te s~ecify
the nominal value (fcurth subfield) of a DS instructien
operand. 'Iherefore, the [5 instruction is tte test way
of sy~bolically defining storage for werk areas,
input/outt=ut buffers, etc.

Named (Mnemonic) Areas Aligned on
Areas for FixedBoundary
Point Instructions
•

o

Length Attribute of
Symbols Naming Areas
same as Implicit
Length of Areas

~F-A~R-E~A--D~S~F~~--F-U~II~w-o-rd----~-----------~--4---4
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
lenBjh calculation, yeu should not
supp y 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
(S ee individual tyt=es in sections
G3D through G3~ •

HAREA DS H

Half word

2

AAREA OS A

Full word

4

cull word

L'DUPF=4
.)uplication has no
effect on implicit
length

10 full words of

storage reserved

\

Named Areas for
Floating-Point
Instructions
EAREA OS 3E

Full word

DEAREAS D S 9 {)

Double word

8

LAREA D S L

Double word

16

~!~

o
Section G:

S~bo1

and Data Definition

201

Using a length modifier can give
you the advantage of explicitly
specifying the length attribute
value assigned to the label naming
the area reserved. However, your
areas will not be aligned
automatically_ acco.rding to their
•
type. If you.omit the nominal value
in the operand, you should use a
length modifier for the binary (S),
character (C), hexadecimal (X),
and decimal (P and Z) type areas;
otherwise their labels will be given
,
• a length attribute value of 1.

•
•

Area Specified

•

OS CLIO
TEN
TW056 OS XL256

Length
Attribute

10
256

t

256

F3
07

OS FL3
OS OL7

3
7

7

A2

OS AL2

2

2

C1
C2
C3

OS
OS
OS

16

16

Xl
X2

OS

•
~

CLl6

X3
Duplication factor
has no effect on
length attribute

202

Area
Reserved in
in ~ytes

16
1

3

IE]
/'7.'.
200

,f"'\

I,'

I

I,.lL .•,/

o

•
•
~

When you need tc reserve large areas ycu can use a
duplication factor. However, you can only refer tc tt.e
first area ty the .latel in this case. Ycu can also use
the character (e) and hexadecimal (X) field ty~es tc s~ecify
large areas using the length Kcdifier.

Area Specified

Reserved
in Bytes

Automatic
Boundary
Alignment

Length Attribute
of symbol used
as Label

3

4

o

Duplication has
no effect

LARGEC DS 1000C
C2

1000

DS

NONE

1

NONE

1000

.-

LARGERX DS 2XL200

4000

NONE

2000

NONE

2000

o
Section G: Symbol and Data Definition

203

Length Atribute
or computed
implicit length
Area
of area
Reserved (duplication
in bytes
disregarded)

Area Specified

Although the nominal value is
optional for a OS instruction, you
can put it to good use by letting
~ the assembler comEute the len~th
for areas of the E, C, X, and decimal
You achieve
(P or Z) type areas.
this by specifying the general
•
format of the 'nominal value that
will be placed in the area at
execution time.

0
16

16

2

2

60

2

3

3

P2 OS

15

3

Zl OS

5

5

CI OS
Xl OS X
X2 OS
PI OS P

.J'

TO FORCE ALIGNMENT: You can use
the DS instruction to force alignment
to a boundary that otherwise would
not be provided. You do this by
~ using a duplication factor of zero.
No space is reserved for such an
instruct ion, yet the da ta tha t
• follows is aligned on the desired
• toundary.
NOTE: Alignment is forced when
either the ALIGN or NOALIGN assembler
option is set (see C2).

0
OS

00

AREA

OS

CL128

0
OS OF
DC
KEY
ADCON DC

HERE

OS

C'A'
AL3{SOMWHERE)

0OH
3,SUM
3,CONST
3,RESULT

HERE addresses
same location as
following
instruction (LH)

204

•
••
•

Double word
AREA

J

jCJ
Full word

C
A

•

Address of
SOMWHERE
Half word

LH
AH
STH

0
-

-,

o
•

a
•
•

TO NAME FIELDS OF AN AREA: Using a du~lication factor
of zero in a [S instruction also allows you to Frcvide
a lakel for an area cf stcrage without actually reserving
the area. You can use [5 or [C instructions to reserve
storage for and assign labels tc fields within the area.
~hese fields can then be addressed symtolically.
(Ancther
way of acccn~lishing this is described in E3C.) The whcle
area is addressable by its lakel. In addition~ tt.e syntclic
label will have the length attritute value of the whcle
area. Within the area each field is addressable by its
label. ~he [ATE field has the same address as the sutfield
[AY. However, DA~E addresses 6 bytes, while DAY addresses
only 2 bytes.
Format of 80
Character Record

Symbol Length
Attribute

0

a

80

••
RECAREA os

os CL4

6
20
86
2
2

PAYNO
NAME
DATE
DAY
MONTH

2

YEAR

8
8

GROSS
TAXES

OS
OS
OS OCL6

OS CL2}

.I-

DS
OS
OS
OS
OS
OS

CL2
CL2
CLIO
CL8
CL8
CL18

Area not
Aligned

DATE
DAY
MONTH
YEAR

~2 byte~1

•
80

bytes
long

o
Sectio~

G: Symbol and Data Definition

205

Name

Operation

Operand

Any Symbol

DS

One or more

Specificaticns_
!he forroat of the rs instruction
stateRent is given in the figure
to the right •
•

or blank

The forroat cf the c~erand of a DS
instruction 1S 1dent1cal to that
of the tC o~erand (see G3B).

The two differences in the
specification of subfields are:
The nominal value subfield is
•
optional in a tS operand, but it
is mandatory in a tC cEerand. If
~ a no~inal value is specified in
a tS operand, it Rust be valid •

•

The rraximum length that can be
specified in a [S operand for the
character (C) and hexadecimal (X)
type areas is 65,535 bytes, rather
than 256 bytes for the same [C
operands.

OPTIONl
OPTION2
AMUST

DS
DS
DC

3FL3
o...-..A
3FL3 ............

LONGC
LONGX

DS
DS

CL655358
XL65535

LIMITEDC DC
LIMITEDX DC

3FL31

CL256'A'
XL256'00'

,.

o
206

o

!he label used in the name entry of a tS instructien, like
the label fer a CC instructien (see G3E) :
~ 1. Has an address value of the lefta-ost byte of the area

reserved, after any tcundary alignment is perforJred

8

2. Bas a len~th attribute value, de~ending on the implicit
or ex~liclt ength of the type of area reserved.

•

If· the CS instructien is specified ~ith ~ere than one
operand or:~ore than one nominal va)ue in the o~erand,
the label addresses the area reserved for the field tt.at
corresponds te the first nOIr:inal value cf the first o~erand.
1he length attribute value is equal to the length ex~licitly
specified or implicit in the first eperand.

8

Boundary
Alignment
Only if
Length
Modifier
is not
specified

0

Duplication has
no effect.

•
1

C DS 3C
1\

Symbol
Length
Attribute

2

H DS 2H
F

4

D

8

A DS 3A

4

F DS
D DS

I

l

1
I

Explicit Length

I

EXPL DS FL3

I

None

I•

DS 3DL5

,

DS XL7000

I

n

$CJc:::Jc::J

\(

3

None

5

None

7000

I
I

OPRNDS DS

3F'3C~
I
I

DS FL3,2HL5
VALUES DS A(P,Q,R) I

U

I

n I

]

Full word

•
4

II

None

n

Full word

4

Half word

2

I

3

I

MORE

DS

H'7.8;1

I

I

o
St::t,;tion G: Symbol and Data Definition

207

o

NOTE: Unlike the DC instruction,
bytes skipped for alignment are
not set to zero. Also, nothing
~iS assembled into the storage area
reserved by a DS instruction. No
assumption should be made as to
the contents of the reserved area.

_-----I End of Last
Data Entry

•
...---8 bytes--J

The size of a storage area that
can te reserved by a DS instruction
is limited only by the size of
virtual storage or by the maxin.um
value of the location counter,
whichever is smaller.

.,1

,.

208

o

(;30 -- TB:E CC" INS'IRUC'IION

Purpcse
You can use the COW instruction to define and generate
an eight-tyte channel ccnnand ~crd for input/output
operations.

Doubleword
Boundary

Byte

bits

0

"1

Command
Code
bits

1

8

31
Address of data to operate upon

o

The channel command word is an
eight-byte field aligned at a
doubleword toundary, and contains
the information described in the
figure to the right.

32

bits

Must be Specified
as Zeros

5

Set to Zeros
by Assembler

6

47

I

48

bits
./'

2-4

37 3839

40

bits

I

63

Byte Count Dr Length of Oa..

I

7-8

Specifications
Name

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

Any symbol

or blank

Operation

ccw

Operand
Four operands separated
. by commas

o
Section G; SyrlU?ol and Data Definition

209

•

L'WRITE=8

WRITE CCW 1,DATADR,X'48',X'50'

Values are
right justified
in fields

Assembled
into

fcur operands must te sEecified
in the order descrited in t e figure
O All
to the right. The generated channel
command word is aligned on a
4It 'skipped
doubleword boundary. ~ny bytes
are set tc zerc.

•

~he symbol in the name field, if
~resent, is assigned the value of

the address of the leftmost tyte
of the channel ccaaand word
generated. The length attritute
value of the symbcl is 8.

Double Word
Boundary
bits

Must be Specified
as Zeros

Treated as
as 3-byte
A-Type
address
constant

o
210

o

Section H: Controlling the Assembler Program

This section describes the assembler instructions that
request the assembler to perform certain functions that
it would otherwise perform in a standard predetermined
way. You pan use these instructions to:
1. Change the standard coding format for writing your
source statements

2. Control the final structure of your assembled program
3. Alter the format of the source module and object code
printed on the assembler listing
4. Produce punched card
deck

out~ut

in addition to the object

5. Substitute your own mnemonic operation codes for the
standard codes of the assembler language
6. Save and restore ~rograrnming environments, such as the
status of the PRINT options and the USING base register
assignment.

o

HI -- Structuring a Program
instructions described in this subsection affect the
location counter and thereby the structure of a control
section. You can use them to interrupt the normal flew
of assembly and redefine portions of a control section
or to reserve space to receive literal constants. Alse,
you can use them to align data on any desired boundary •
~he

.1-

o
'.

Section H: Ccntro11ing the AsssmLler Program

211

o

H1A -- THE ORG INSTRUCTION
Purpose
You use the ORG instruction to alter
the setting of the location counter
and thus control the structure of
the current control section. This
allows you to redefine portions
of a control section.

o
•
•

•

•

Source Module

For example, if you wish to build
a translate table (to convert EBCtIC
character code into soree other
internal code) :

FIRST

START

0

TABLE

DC
ORG
DC
DC

XL256'00'
TABLE+O
C'O'.
C'l'

ORG
• -,1

TABLE+13

DC
DC

C'D'
C'E'

ORG
DC
DC

TABLE+C'D' +196
AL1(13)
OD
AL1(14)
OE

ORG
DC
DC

TABLE+C'O' +240
AL1(O)
00
AL1(1)
01

1. You define the table as being

0

Object Code

TABLE
(in Hex)
+0
FO
Fl

filled with zeros.

2. You use the ORG instruction to
alter the location counter so that
its counter value indicates a desired
location within the table.

•

3. You redefine the data to be
assembled into that location •
4. After :epeating the first three
steps unt1l your translate table
is complete, you use an ORG
instruction with a blank operand
field to alter the location counter
so that the counter value indicates
the next available location in the
current control section (after the
end of the translate table).
Both the assembled object code for
the whole table filled with zeros
and the object code for the portions
of the table you redefined are
printed in the program listings.
However, the data defined later
is loaded over the previously defined
zeros and becomes part of your
object prograw, instead of the
zeros.
In other words, the ORG instruction
can cause the location counter to
point to any part of a control
section, even the middle of an
instruct~on, into which you can
assembleaesired data. It can also
cause the location counter to point
to the next available location so
that your program can continue to
be assembled ~n a sequential fashion.

+13
C4
C5

('~
(

I

~p'

+255
GOON

INPUT

ORG
DS

OH

TR

INPUT, TABLE

DS

CL20

END

,

o
212

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

Name

Specifications

Operand

Operation

OS
Any symbol
or blank

The format :of the ORG instruction
is shown in the figure to the right~

A relocatable
expression
or blank

ORG

Sourc;e Module

n Hex
OC08

•

OCOC

The symbols in the ex~ression in
the operand field must be previously
defined. The unpaired relocatable
term of the expression (see C6E)
must be defined in the sarre control
section in which the ORG statement
appears •

C
•
•

The location counter is set to the
value of the expression in the
operand. If the operand is omitted,
the location counter is set to the
~ next available locatiQn for the
current control section.

0080
100801

SECTA

START

HERE

L

MVC

•

3,ADDR
TO,FROM

•

ORG

• LA

ST

4,AREA
4,TWO
4,SUM

END

o

The expression in the operand of
an ORG instruction must not specify
a location cefore the beginning
of the control section in which
- it appears. In the example to the
• right, the CRG instruction is invalid
if it appears between the beginning
of the current control section and
500 cytes fro~ the beginning of
the same control section. This
is because the expression specified
• is then negative and will set the
location counter to a value larger
than the assembler can process.
The location counter will ·wrap
around· (the location counter is
discussed in detail in section C4B) •

•

Source Module

o FIRST

Section

Negative

START

.ORG

*-500

END

H:

Controlling the ASFemble!:' Prog:.ram

213

NOTE: using the ORG instruction
to insert data assembled later at
the same location as earlier data
will not always work.
•
•
•

O

ADDR

In the example to :the right, it
appears as if·the character constant
will be loaded over the address
constant. However, after the
charact.er constant is loaded into
the same location as the address
constant, the relocation factor
required for the address constant
is added to the value of the
constant. This sum then constitutes
the object code that resides in
the four bytes with the address
ADDR.

CHAR

•

DC

A(LOC}

ORG

'!'<-4

DC

C'BETA' •

0

Processing Sequence
~

Assembled

Loaded

ADDR

ADORe

1

IX X X XI

1

IC2CSE3Cli

··-4

Relocation facjor
added to value
of constant CHAR

ADDR

UL

(ADDR)

1

BETA

IC2CSE3Cli

H1B -- THE LTORG INSTRUCTION
Purpose
You use the LTORG statement so that
the assembler can collect and
assemble literals into a literal
pool. A literal peel ccntains the
literals you specify in a source
module either:
•

After the preceding LTORG instruction
or

•

After the beginning of the. source
module.

Source Module

START

0
=lit1

The assembler ignores the borders
between control sections when it
collects literals into pools.
Therefore, you must be careful to
include the literal pools in the
control sections to which they
belong (for details see Addressing
Considerations belcw).
=lit5

The creation of a literal pool gives
the following advantages:

,.

1. Automatic organization of the
literal data into sections that
are properly aligned and arranged
so that no space is wasted
2. Assembling.of duplicate data
into the same· area
3. Because all literals are crossreferenced, you can find the literal
constant in the pool into which
it has been assembled.
214

o

The Literal Pool
Source Module

A literal pool is created immediately
after a LTORG instruction or, if
no LTCRG instruction is specified,
at the end of the first control
section.
Each Ii teral pool has four segments
into which the literals are stored
(1) in the order that the literals
are specified and (2) according
to their assembled lengths, which,
for each literal, is the total
explicit or implicit length, as
described below.
•

o

J

The second seQIl'ent contains those
whose assembled lengths are a
multiple of four, but not of eight.

•

The third segment contains those
whose assembled lengths are even,
but not a multiple of four.

•

The fourth segment contains all
the remaining literal constants
Whose assembled lengths are odd.

START

0

MVC

TO,=3F'9'

AD

2,=0'7'

IC

2,=XLl'8'

Assembled into
Segment

,=~L3'JAN'

The first segment contains all
literal constants whose assembled
lengths are a multiple of eight.

•

FIRST

Literal Pool
Start

•

,=2F'l,2'
,=1}'33'
,=~(ADOR)

,=XL8'OS'

••
••
••
••

•

The beginning of each literal pool
is aligned on a doubleword boundary.
Therefore, the literals in the first
segment are always aligned on a
doubleword boundary, those in the
second segment on a f~llword
• • boundary, and those i-n the third
•
segment on a halfword boundary.
•

section H: Controlling the Assembler Progr.am

iis

Addressing Considerations
Source Module

If you specify'literals in source
modules with multi~le control
sections, you-should:

•

•
•

1. write a LTORG instruction at
the end of each control section,
so that all the literals specified
in the section are assembled into
the one literal pool for that
section.' If a contrel section is
divided and interspersed among other
control sections, yeu should write
a LTCRG instruction at the end of
each segment of the interspersed
control section.

ONE

START

0

USING

ONE,BASREGI

USING

range
ONE

2. When establishing the
addressability of each control
section, make sure (a) that the
entire literal pool for that section
is also addressable, by including
it within a USING range, and (b)
that the literal specifications
are within the corresponding USING
domain. The USING range and domain
are described in FlA.
NOTE: All the literals specified
after the last LTORG instruction,
or, if no L'IORG instruction is
specified, all the literals in a
source module are assembled into
a literal peol at the end of the
first control section. You must
then make this literal pool
addressable along with the addresses
in the first control section. This
literal pool is printed in the
program listing after the END
instruction.

USING

range

TWO

,.

o
216

Cuplicate Literals
Source Module

•

•
•

If you specify duplicate literals
within the part of the source module
that is controlled by a LTORG
instruction, only one literal
constant is assembled into the
pertinent literal peel. This also
applies to literals assembled into
the literal pool at 'the end of the
first or only control section of
a source module that contains no
LTORG instructions.
Literals are duplicates only if
their specifications are identical,
not if the object code assembled
happens to be identical.

BEGIN

START

Action

0

first is stored
J

Literal pool 1

both are stored, each
into a separate literal
pool

SECOND

When two literals specifying
identical A-type (or y-type) address
• , constants contain a reference to
the value of the loeation counter
(*), both literals are assembled
into the literal pool. This is
recause the value of the location
counter is different in the two
literals.
Literal pool 2

o

END

Specifications

.r-

format of the LTORG instruction
is given in the figure to the right.

~he

If an ordinary symbol is specified
in the name field, it represents
the first byte of the literal poo1~
this symbol is aligned on a
do'ub1eword t:oundary and has a length
attribute value of one. If bytes
are skipped after the end of a
literal pool to achieve alignment
for the next instructien, constant,
or area, the bytes are not filled
with zeros.

LTORG
Name
Any symbol
or blank

Operation

LTORG

Operand
Not required

o
Section H: Controlling the Assembler Program

217

H1C -- THE CNOP INSTRUCTION

Register
2

Assume location

Purpose
You can use the CNOP instruction
to align any instructicn cr other
• da ta on a specific halfword l:oundary.
The CNOP instruction ensures an
unbroken flow of executable
instructicns by generating ~
~operation instructions to fill the
bytes ski~~ed to ~erforrn the
alignment that you specified.
For exam~le, when ycu code the
1inkage to a subroutine, you may
• wish to pass parameters to the
subroutine in fields irrrr-ediately
following the branch and link
~instruction. These parameters,
for instance, channel command words
(see G30) , can require alignment
on a specific boundary.
•

The subroutine can then address
the parameters you pass through
the register with the return address.

LINK BALR

Contents
Return address
(LINKt2)
Address of sub- .
routine

o

2,10

CCW

lONE

CCW

I TWO

CCW

I THREE I
Layout of
Object Code
double
word

r

CR

8

BCR

BCR
LINK BALR
CCW
CCW
CCW

0,0

half

double
word

.j'

BCR
BALR
CCW ONE
CCW TWO
CCW THREE

o

Specificaticns
!he CNOP instruction forces the
a1ignrrent of the 1ccation counter
to a halfword, ful1word, or
doub1eword l:cundary. It does not
affect the location counter if the
counter is already ~ro~erly aligned.
If the specified alignment requires
the location counter tc be
incremented, one to three nooperation instructions ~CR 0,0
occupying two bytes each) are
generated to fill the skipped l:ytes.
Any single byte ski~~ed to achieve
alignment to the first no-operation
instructicn is filled ~ith zeros.

218

,.

o

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

o

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

•
•

CNOP

The operands must be absolute
expressions, and any symbols must
have been previously defined.
The first oEerand, b, s~ecifies
at.which even-numbered byte in a
fullword or doubleword the location
counter is set. The second operand:
w , specifies whether the byte is
in a fullword (w=4) or a doubleword
(w=8). Valid pairs of b and ware
as indicated in the figure to the
right.
NO'IE: Both 0,4 and 2,4 specify
two locations in a doubleword.

Name

os

Operation

Any symbol
or blank

Operand
b,w

CNOP

••
,
I \

>.~,~

'GOIorJ)t..

..

2,4

04

1
~

./.

2,4

o,~

~

FULLWORD

FULLWORD

HALFWORD HALFWORD HALFWORD HALFWORD
Byte

I Byte

Byte

I

0~8

2/

I Byte

Byte

I Byte

DOUBLEWORD

!
4,8

Byte

I Byte

I
6·8
,

H2 - Determining Statement Format and Sequence

o

You can change the standard coding conventions for the
assembler language statements or check the sequence of
source statements by using the fcllowing instructions.

H2A -- THE ICTL INSTRUCTION
purpose
The ICTL instruction allows you to change the begin, end,
and continue columns that establish the coding forrr.at cf
the assembler language source statements.
For example, with the ICTL instruction, you can increase
the number of columns to be used for the identificaticn
or sequence checking of your source statements. By changing
the begin column, you can even create a field before the
begin column to contain identification or sequence numbers.

o
Section H: Controlling the Assembler Program

219

r\

~

I Standard values for Columns I
BEGIN

CONTINUE

END

~~----...I---~ '-------'-:1 p...----r-'--t

You can use the ICTL instruction
only once, at the very beginning
of a source module. If you do not
use it, the assembler recognizes
the standard values for th~ begin,
end, and continue columns.

1

16

Columns

ICTl

I

Format

Specifications

Operation

Name

ICTL

Blank

The ICTL instructicn, if specified,
must be the first statement in a
source module.

Operands

•8

•

NOTE: The ICTt instruction does
not affect the format of statements
trought in by· a COpy instruction
or generated from a library macro
definition. The asserobler processes
these stateme~ts according to the
standard begin, end, and continue
columns described in Section B1A.

220

•

b,e,c

The operand entry must be one to
three decimal self-defining terms.
There are only three Fessible ways
of specifying the operand entry.

The operand b must always be
~ specified. The operand e, when not
specified, is assumed to be 71.
•
If the operand c is not specified,
or if e is specified as 80, the
assembler assumes that continuation
lines are not allowed. The values
specified for the three operands
depend on each other.
•

b or

b,e or

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

•

Operand

e

,.

I
Specifies

Allowable range

b

Begin column

1 through 40

e

End column

41 through 80

c

Continue column

2 through 40

•

Rules for interactibn of b, e an~ c

The position of the End column must
not be less than the position of the Begin
column + 5, but must be greater than the
position of the Continue column
The position of the Continue column
must be greater than that of the Begin
column

e ?!b+5
e >c

c>b

o

o

R2B -- THE ISEQ INSTRUCTION

8

•

J

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
!SEQ instruction you specify the
columns between which the assembler
is to check for sequence nu~bers.

1

,
)

assembler begins sequence
checking with the first statement
line following the IS!Q instruction.
The assembler also checks
continuation lines.
~he

•
•
•

o

80

73

PUrpose

•

Comp@res made

1

ONE

ONE with TWO

I

TWO

TWO with THREE

I

THREE

THREE with FOUR

1

FOUR

FOUR with FIVE

ttION CARD

[~

FIVE
~

and so on

Sequence numbers on adjacent
statements or lines are compared
according to the a-bit internal
EBCDIC collating sequence. When
the sequence numb~r 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.

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
The ISE~ instruction initiates or
terminates the checking of the
sequence of statements in a source
module.

Operand

Operation

Name

ISEQ

Blank

I,

r

8}

or blank

I

format of the ISEQ instruction
is shown in the figure to the right.

~he

Specifies

Column

•

•
•
•

o

The first option in the operand
entry must be two decimal selfdefining terms. This format of
the ISEQ instruction initiates
§equence checking, beginning at
the statement or line following
the ISEQ instruction. Checking
begins at the column re~resented
by land ends at the column
represented by r . The secohd
option of the ISEQ format terminates
the sequence checking operation.

•
•

I~

leftmost column of
field to be checked

Rules for interaction
ISr

I must not be
greater than r

r~1

r must not be
less than I

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

NOTE: The assembler checks only
those statements that are specified
in the coding of a source module.
This includes "any COpy instruction
statement or roacro instruction.

o

Source Module

FIRST

START

0

ISEQ

73,80

However, the assembler does not
check:

T

checking
occurs

1. Statements inserted by a COpy
instruction
2. Statements generated from model
statements inside macro definitions
or from model statements in open
code (state~ent generation is
discussed in detail in Section J)

-

+

ISEQ

T

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

1

The FRINT 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 rATA
will not apply. If NOGEN is
specified, rATA will not apply to
constants that are generated. The
standard options inherent in the
assembler program are ON, GEN, and
NO DATA.
"

222

2

Description
A !lUi.!:l.9. is printed

ON

No listinais printed

OFF

All statements generated by the
processing of a macro instruction
are. A.ti.D.Wl.

GEN

Statements generated by the
processing of a macro instruCfion
are .!lSU. p-rinted (Note: The
MNOTE instruction always causes
a message to be printed)

~

3

PR I NT options

NOGEN

Constants are printed.i!:Lfiill in
the listing

DATA

Only the leftmost eigtnRY.!!! of
constants are printed in the
listing

NODATA

o

Specifications
PRINT

format of the PRINT instruction
statement is shown in the figure
to the righ t.

~he

o

Name

At least one of the operands 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

Asequenee
symbol or
blank

PRINT

Operand

GEN ] [ NODATAl
{r'. ONOFF] LNOGEN
,DATA

I

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.
•
only

o

-rbe PUSH and pOp instructions~'
described in B6, also influence
the PRI NT options by saving' and
,z;estoring tbe PltlNT.fJ~tulI..
NO~E: 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 asse~bler option is
specified in the job control
language, the entire listing for
the assembly is suppressed.

o
Section

H~

Controlling the Assembler Program

223

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

o

TITLE 'THIS IS A HEADING'

Program Listing

H3B -- THE TITLE INSTRUCTION

o

THIS IS A HEADING

Purpose
The TITLE instruction allcws you
to:

~

•
•

1. Provide headin~s for each fage
of the assembly l~sting of your
source modules.
2. Identify the assembly output
cards of your ocject roodules. You
can specify up to 8 identification
characters that the assembler will
punch into all the output cards,
ceginning at column 73.

•
PROG

TITLE

' heading'

DOS Up to q identification char.lm:;er.S':,;
ar e allowed ..

O

()

PROG 0003

~he

assembler punches sequence
numbers into the columns that are
left, up to column 80.

PROG 0002
73

, Object Deck

80

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.

••
J'

--

Specifications
The format of the 7ITLE instruction
statement is given in the figure
to the right.

TITLE
-

Any of the five options can ce
specified in the name field.

~

224

"'-

--

----

Name

Operation

Operand

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

..Qfl tion

The first three options for the
name field have a s~ecial
significance only for the first
TITLE instruction in which they
are specified. For subsequent TITLE
instructions, the first three opticns
do not apply •.-

e{;
4

5

-

o

For the first TITLE instruction
of a source module that has a nonblank name entry that is not a
sequence symbol, the following
applies:

Object

Deck
•

to eight alphameric characters
can be specified in any combination
in the name field.

Up

Examples of TITLE instructions
in separate source modules:

•
•

o

These characters are Funched as
identification, beginning at column
73, into all the outFut 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
__
OD__
9_9A____+-___M_O_D_9_9_A____~
PGM&N1

TITLE

1234

TITLE

•

SYMBOL TITLE

200

PGM200
1234
SYMBOL

o
Section H: Controliling the Assembler Program

225

•

The character string intheopera:nd
field is printed as a heading at
the top ofeacb page of the assembly
listing. The heading is printed
beginning on ~he 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 NOGER 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:
single ampersand initiates
an attempt to identify a variable
symbol and to substitute its current
value.
•

•

TITLE 'HEADING ONE'

Examples of headings:

.---~--------~------------~----~------------~
Source Statement

•

TITLE 'HEADING aN'

A

TITLE • HEADING &~ •

• • Double ampersands or apostrophes
TITLE' HEADING FOU.,' FIVE'
specIfIed, print as single ampersands
or apostrophes in the headingA single apostro~he followed
by one or more blan s simply
terminates the heading prematurely.
If a non-blank character follows
a single apostrophe, the assembler
issues an error message and prints
no heading.

••

TITLE 'HEADING FOUR'REMARKS
"ERROR'"

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

Value
Printed Heading
of
Variable
Symbol

TWO HEADING TWO
HEADING

81

'

HEADING FOU

4:)

H3C -- THE EJECT INSTRUCTION
Purpose
The EJECT instruction allows you
to ~top the printing of the assembly
listing on :the current page and
continue the printing cn the next J
page.
EJECT

Specifications
Name

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

O
•

o

Operand
Not required

Asequenee
symbol or
blank

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 MECT
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_
NOTE: The EJECT instruction
statement itself is not printed
in the listing.

Operation

EJECT

Source Module

Listing

Page
Boundary

Page
Boundary

_ _ _ _ _ _ __

Page
Boundary

o
o

Section H: Controlling the Assembler Program

227

o

H3e -- THE SPACE INSTRUCTION
Purpose
You can use the SPACE instruction
to insert one or more blank lines
in the listing of a source module.
This 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 rerraining
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 f~ature you can:
1. Code PUNCH statements in a source module to produce
control statements for the linkage editor. The linkage
editor uses tbese 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

o

Specifications

Object Module
(Card Deck)

Source Module

The PUNCH instruction causes the
data in its operand to be punched
into a card. One PUNCH instruction
produces one punched card, but as
many PUNCH instructions as necessary
can be used.

•
•
•
•

MACRO
MACDEFl

MACRO
MACDEF2

ihe PUNCH itistruction statement
can appear anywhere in a source
module except before and tetween
source macro definitions. If a
PUNCH instruction occurs tefore
the first control section, the
resultant card punched will precede
all other cards in the object deck.

MEND

•

PUNCH

FIRST START

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.

0

PUNCH
PUNCH
END

o

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 charact,r set are
allowed in the charac~er string
of the operand field. Variatle
symbols are also allowed.

Name

Operation

Operand

A sequence
symbol or
blank

PUNCH

A character string of
up to 80 characters,
enclosed in apostrophes

o
Section H: Controlling the Assembler Program

229

PUNCH '~IIIIIIIIIIIIIIIIIIIIIIII

The position of each character
specified in the PUNCH statement
~corresponds to a column in the card
to be punched. However, the
following rules apply to ampersands
and apostror;:hes:

•

o

Position

1. A single amoersand initiates
an attempt to identify a variable
~SYmbOl and to substitute its current
value.

21

~

This position
is always
..
column 1

ampers~nds

3. A single aEostrophe followed
by one or more blanks simply
terminates the string cf characters
punched. If a non-blank character
follows a single apostrophe, an
error message is issued and nothing
is punched.

13 15

Only the characters punched,
including blanks, count toward the
maximum of 80 allowed.

Examples:

NOTES:

Source
Statement

1. No sequence number cr

identification is punched into the
card produced.
2. If the NC~ECK option is specified
in the EXEC statement of the job
control language for the assemtler
program, no cards are punched:
neither for the PUNCE or REPRO
instructions, nor for the object
deck of the assembly.

13 15

PUNCH

2. Double
or apostrophes
punched as s1ngle ampersands
8 orare
apostrophes •
•

123 4 56 7

PUNCH 'CHARS

PUNCH 'CHARS

••

&VAR'

/\

&& II,

PUNCH 'CHARS A' B'

~

•

21

Column

Value of

Characters

Variable

Punched

Symbol

ABC

CHARS ABC

CHARS &'

CHARS A

PUNCH 'CHARS A'REMARKS
* * )',: ERROR *

**

PUNCH 'CHARS At REMARKS

230

CHARS A

o

H4B -- THE REPRO INSTRUCTION
Source Module

Purpose
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
before the card is punched.

~he

Repro appears before
start of first control
section; punched card
will precede object
deck

o
data 2
data 3

Specifications

o

~e REPRO instruction
on the statement line
it to be punched into
corresponding columns
One REPRO instruction
punched card.

•

REPRO
REPRO

END

causes data
that follo'Ws
the
of a card.
produces one

The REPRO instruction can appear
anywhere in a source module exceEt
before and between source macro •
definitions. The Eunched cards
are not part of the object deck,
even though they can be physically
interspersed in the object deck.

OBJECT
DECK

REPRO

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

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

Operand
Not required

NOTES:
1. No sequence numbers or identification is punched in
the card.

o

2. If the NODECK option is specified in the job control
language for the assembleL program, no cards are punched:
neither for the PUNCa or REPRO instru~tions, nor for the
object deck of the assembly.
Section H: ControlLing the Assembler Program

231

H5A -- THE OPSYN INSTRUCTION

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 aust be written
after the ICTL instruction and can
be preceded only by the LJECT, ISEQ,
PRINT, SPACE, and TITLE instructions.
The CFSYN instruction must precede
any source macro definitions that
may be specified.

o

An
operation
code

The operation code specified in
the name field or the operand field •
must represent either:

The OPSYN instruction assigns the
•
properties of the operation code
specified in the operand field to
the symbol in the name field. A
~ t1ank in the operand field causes
the operation code in the name field
to lose its properties as an
operation code.

An operation
COde.

OPSYN

blank

•

1. The operation code of cne 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.

OPSYN

Operand

or

The OPSYN instruction has two basic
formats as shown in the figure to
the right.
•

Any
symbol or
operation
code

Operation

NEW

OPSYN

,.
MVC

OPSYN

MVC

•

No longer recognized
by the assembler as
a valid operation code
in current source module

ff-.".""\

'\.Y
232

o

•
•

•
•

NOTE: The symbol in the name field
can represent a valId o~eration
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 ..n.!m!t
field of two OPSXN instructions
the latest definition takes
precedence.

Both now possess the
properties of the LR
mechine instruction
operation code

ST

8TH •

Now represents
STH machine
operation

o
'3ec'i.:iol1 H: Cont.l:·olling Lhe

As~embler

Program

233

/~
~•.)

The instructions described in this sUbsection can save
and restore the status of PRINT options and the base
register assLgnment of your' program.
H6A -- THE FUSH INSTRUCTION
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 righ t.
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

:JPUSH

PRINT
USING
PRINT,USING
USING,PRINT

1
2
3
4

NOTE: When the PUSH instruction
is used in co~bination with the
POP instruction, a maximum of four
nests of PUSH PRINT - POP PRINT
or PUSH USING - POP USING are
allowed.
H6B -- THE FOP INSTRUCTION
Purpose
The POP instruction allows you to restore the PRINT or
USING status saved by the most recent PUSH instruction.
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 s~ecified.
The FCP 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
USING
:PRINT,U$ING
USING,PRINT

1
2
3
4

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

o

Source Module

MACRO
NEW
PUSH

USING

USING

BASENEW,l2

POP

USING

Storage Stack
for saved
USING status

MEND

FIRST START
USING

•

•

I

o

BASE,l2

In the opposite example, you can •
see how the USING environment is
saved and restored by a combination
of PUSH and PCP instructions.

lJ

NOTE: The PUSH instruction does
not change the current USING status;
you must do this yourself.
BASENEW,l2

o
Section H: Controlling the Assembler.- Program

235

o

o

,.

o
236

o

Part IV: The Macro Facility
SECTION I: INTRODUCING MACROS
SECTION J: THE MACRO DEFINITION

o

SECTION K: THE MACRO INSTRUCTION
SECTION L: THE CONDITIONAL ASSEMBL V LANGUAGE

o
237

This page left blank intentionally.

,.

'
\
-".'
0·,

o

Section I: Introducing Macros

This section introduces the basic macro concepti what you
can use the macro facility for, how you can prepare ycur
own macro definitions, and how you call.these macro
def~nitions for processing by the assemtler.
Read this section straight through ~fore 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. ~o ~rccess
these macro definitions ycu only have to write the macro
instruction that calls the definition •

.f'

o
Section I: Introducing Macros
,J,

1'v·

C

239·

Page of GC33-401G-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 program.

Pre-assembly
or macro processing time

Source Module

Macro Definition

Source Module

AFTER

BEFORE
Name=TEXTIN

o
E

o

F
G

J

H

K

I

L

K
L

call a named sequence of statements (the macro
definition) by using a macro instruction, or macro call.
The 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­
ass embly t iJl'le:
YOU

•

I

'Ihe expanded stream of code then l:ecomes the input for
processing at assembly time, that is, the time at which
the assembler translates the machine instructions intc
object code.
240

o

You may want to modify the
statements in a macro definition before they are generated.

lOR TEXT MODIFICATION:

I

You can do this by su~plying 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

~C

Macro Definition

~.ISeeK3>

8' SeeJ3 >

Generated Result

.

--.

D
E

Name = MODIFY

F

10

H
I
K

--•

'0'("
I ,,' I,~

Section I: Introducirg

~'1acj..·op

211

FOR TEXT MANIFULATION: You can also select and reorder
the statements to be generated from a macro definition
by using the conditional assembly language described later
in this section.
.

Source

Macro

Generated

Module

Definition

Result

p
Q

:1jlil

R
S

Name =SELECT

Parameter: X
If X=O, then generate
first sequence;
If X=1, then generate
second sequence
A
B

C

~.

F _____

o

+_~

~The conditional assembly language allows you to manipulate
text generation, for exam~le, by branching upon the result
of a condition test. You can choose exactly which
• statements will or will not be generated by varying the
values you specify in the macro call.

• I

See SECTION L )

,.

()
242

o

The Basic Macro ConceEt
To use the complete macro facility provided by the assembler
you must:
•

prepare a macro definition.and

•. Call

definition using a macro instruction.

t~is

J

Prototype •
-Th-e-se-s-ta'-te-m-en-ts-establish limits of
a macro definition

Body Of

a

macro
definition

~~_M,A_C_N_AME
_ _ _ _"

f

'
J

Sequence of
Statements

l------

o

MEND

Macro Instruction

[8

MACNAME

,t:

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 staten-ent 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 definiti-on.

~ I SeeJ2C

>

eISeeK2S)

o
Section I: Introducing Macros

243

~When you write a macro instruction in your source rrodu1e,

you tell the assembler to process a particular maC~
~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

using the macro facility you reduce programming effort,
because:

By

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 fro~
the macro definition.
When you are designing and writing large assembler language
programs, the above features allow you to:
• Prepare macro definitions, containing di~ficult 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 lates~ 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

o

~\

>

1 See SECTION k >

.1

See SECTION J

U

o

Defining a Macro
Defining a macro means preparing the statements that
oonstitute a macro definition. To define a macro you must:
1. Give it a name
2. -Oeclare:any parameters to be used
J

3. Write the stateroents it contains.
4. Establish its boundaries

....
Prototype

10

MACRO
MACIO &PARAMl,&PARAM2

... \

•
•
•
•
"

I

Body of Macro

~MEND

o

Macro Instruction

MACIO OPERAN01,OPERAN02

~The MACRO and MEN~ instructions establish the boundaries
of a macro definition •
..r-

I

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.

•

YOU

The bod of a macro definition contains the staten.ents
that wi 1 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.

t

••
••

SaeJ2D

SeaJ3
See K2C
SeeJ2E

>
>
>
>

o
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 def ini tion is called a source macro definition.

0

you can also insert a macro definition in a systeR 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 «aero
definitions.
Generated Result

Source Module

Macro Library

I:: I
MACRO

...

LIB2
LIB2
LIB2

Source
Module II
SoulCe
Module III

Source
Module I

Calling a Macro

~YOu 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.
246

1

See J 1 B

:>

o
•

WHERE YOU CAN CALL A MACRO tFFINITION: You can call a
macro definition by specifying a macro i.nstruction anywhere
in a source module, except before or between any source
macro defin~tions that may be specified.

0

I See K1 B

>

oil

Source
Module

Macro Definitions

MACRO

Generated
Result

MACRO

o
.t.

•

You can also call a macro definition from within another
macro definition. This type of call is an inner macro
£!!1; it is said to be nested in the macro definition.

8'

SeeK6A

>

o
Section I: Introducing Macros

247

The Contents of a Macro pefinition
The body of a macro definition can contain a combination
of model statements, processing statements, and comments
st atements.

•

Generated Statements

Model Statements

A

A

•
X==A
Y==B

z=c

•

I

100

QD

ml

110DEL STA'IE~ENTS: You can write assemtler language
statements 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.

.1,-~_J_4_-v~)

_

~.

,.

o
248

o

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 STATEMEN~S: 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

~ The 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 •
•

o

•

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
aefinition.

oI
8-1

SeeJ5D

SeeJ5E

>
>

Section I: Introducing Macros

249

o

COMMENTS 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).

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
-.1

6. Branching instructions

1. 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.

o

The conditional assembly language is fully described in
Section L.

,.

o
250

o

Section J: The Macro Definition

This section describes macro definitions: where they can
be placed in order to be available to call, how they are
sp~cified, 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

o

0

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 ~acro
definitions do nct generate assembler language statements,
but perform only internal processing, like some of the
macro definitions used for system generation.

1'

J,I.

Section J: The Macro Definition

251

f"\

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 roodule.
This type of macro definition is
called a source roacro 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 inctuded 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:

Open Code
Source Module

Conunents

4It Eefore all macro definitions •
•

Between macro definitions •

•

After macro definitions and before
open code

Conunents

All other statements of the assemcler
language must appear after any
source macro definitions that are
specified.

Open Code

o

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.

•
c

252

At coding time, it is important
to distinguish between source
statements that lie in open code
and those that lie inside macro
definitions.
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)

o
Section J: The Macro Definition

253

(r'

'Vi

12 - Part. 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 stateRent 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

o

J2 C -- THE

MACRO

PROTOTYPE STATEMENT:

CODI NG

Purpose
The prototype statement in a macro
definitio~ serves as a model
.
~rototype) of the macro instructi~n
you use to call the macro definition.

Specifications
The prototype statement must be
the second statement in every macro
definition. It comes immediately
after the ~ACRO instruction.
The format of the prctoty~e statement
statement is given in the figure
to the right.

o

-rile 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
_parated by

commas

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 ;pllowed by one
or more blanks.
~

o
Section J: The Macro Definition

255

Standard value for
column after End
column ;s72

The prototype statement can be
specified in one of the following
three ways:
•

The normal way, with all the syml:olic
parameters preceding any remarks.

16

A

•

combination of the first two ways.
MOVE

•
•

,&PARAM,~

Comma required
after each parameter
except last

NOTES:

•

7172

MOVEjO,&FROM,&LENGTH, •.•••
ARAM2,&PARAM3, •••••••••• &PAR
. { · ~ 1 , ••••• ,PARAM15 REMARKS-

~ An alternate way, allowing remarks
for each parameter.
•

o

Prototype Statements

Alternate Ways of Coding the
prototype statement

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.

T
FIELD TO
FROM, FLO. FROM WHICH
LENGTH, MOVE LENGTH

:;1

•

f

INDEXl
INDEX2

ARAM15
REMARKS CONTINUED
ON NEXT LINE,
AND THE NEXT

Column 16
One or more
blanks required

\
•

MOVE

Comma required
after each
parameter
except last

TO,
ATA MOVED TO
ROM, DATA MOVED FROM
LENGTH, NO OF BYTES
PARAMl,&PARAM2,&PARAM3, ••••••.
ARAM15 REMARKS CONTINUED
N LAST LINE

•
J2D -- THE MACRO PROTOTYPE STATEMENT: ENTRIES

'Ihe Name Entry

,.

Purpose
You can write a name-field parameter similar to the sy~bclic
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

o

o

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 nacre
instruction. Note that the value J
.assigned to the name field parameter
has special restrictions that are
listed in K2A.

•

Source Module

.-~'7"'-------I
MOVE

&NAM

The Operation Entry

MVC

Purpose
operation entry is a symbol
that identifies the macro definition.
When you specify it in the operation
field of a macro instruction, the
appropria te macro def ini tiOD. is
called and processed by the
assembler.
~he

o

~
HERE

MEND

START

•

0

MOVE FIELDA,FIELDB

~

HERE

Specifications
•

&TO,&FROM

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.

MVC FIELDA,FIELDB

END

<;?pe.ratiollcode8 have
m~;:;:W.'Ai.t! 'J:J':~OPS~

, the operation code
specified in the prototype statement
must not be the same as that
specified in:

1. A machine instruction.
2. An assemrler instruction.
3. The prototype statement of another
source (or library) macro definition.

o
Section J: The Macro Definition

257

The Cperand 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 parameters 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 sublis~,
in macro instruction operands, see R4.
.

,.

258

o

J2E -- THE BODY OF A MACRO PEFINITION

Purpose
The body of a macro definition
contains t~e sequence of statements
that constitutes the working part '"
of a macro. You can specify:
1. Model statements to be generated.
2. Processing staterr.ents 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.
". Conditional assembly instructions
to compute results tc be dis~layed
in the message created by the MNOT~
instruction~ without causing any
assembler language statements to
be generated.

Result of Macro
Expansion

Specifications
The statements in the body of a
macro definition must appear between
the macro prototype statement and
the MEND statement of the aefinition.
The three main types)Of statements
allowed in the body 6f a macro are:

4Dt • 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

o

Internsl
Ordinary

$ection J: The Macro Definition

259

ir"'\

J3 - Symbolic Parameters

~.)

Source Module

Purpose
Symbolic parameters allow you to

pass values into the body of a macro
O definition
from the calling macro

MVe

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 assiqned to them by
the calling macro instruction.
•

MEND

OPEN START
I

By using symbolic parameters with
meaningful names you can indicate
the purpose for which the parameters
~r substituted values) are used.
Generated
Result

END

General Specifications

,.----Ampersand
.Alphabetic character
.-0
0 to 6 alphameric character

Ar /

o
•

•

260

Symbolic parameters must be valid
variable symbols, as shown in the
figure to the right.
They have a local scoFe: that is,
the value they are assigned only
applies to the macro definition
in which they have been declared.
The value of the parameter remains
constant throughout the processing
of the containing macro definition
for every call on that definition.
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 J1, and local and
global SET symbols described in
L1A.

1&lplA

RAMI

prototype

MEND

o

SOurce Module

It

Macro
Definition

.

JI

DEFINED

Prototype

The two kinds of symbolic parameters
are:

I

• • Positional parameters
• • Reyword parameters.
•
•

Each positional or keyword parameter
used in the body of a macro
definition must be declared in the
prototype statement.

I

Macro
Instruction

0-

MACRO

• •

&TO,&FROM=

&Td

.

MVC
MEND
START

I

0

J DEFINED

FIELDA,FROM=FIELDB

\
MVC

FIELDA,FIELDB

END

Source Module

Subscripted Symbolic Parameters
Subscripted symbolic~arameters
must be coded in the~format shown
in the figure to the right.
•

•
•

'Ihe subscript can be any arithmetic
expression allowed in the operand
field of a SETA instruction
(arithmetic expressions are discussed
in L4A). The arithmetic expression
can contain subscri~ted 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 •
'Ihe subscript indicates the position
of the entry in the sublist that
is specified as the value of the
subscripted parameter (sublists
as values in macro instruction
operands are fully described in

Format:

MACRO

SUBLISTS

&POS,&KEY=

MVC

&POS(3)'&KEY(3~

MEND

• ~
•

START

o

SUBLISTS

(A,B,C,D),KEY=(E,F,G,H)

R4) •

MVC

o

C,G

END
Seetien J: The Macro Definition

2Gi

o

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 (described 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
parameters. The 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.

.-/

Pos. Paramo
Specifications

•
•

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
var iable symbol. Va lues a re assigned
to the positional parameters by
the corresponding positional operands
specified in the macro instruction
that calls the definition.

o

Source Module
MACRO
Macro

O~O:O~__

Definition J--_:_:_:_AR
___

-t

START

Macro

Instruction

POSPAR

..
END

ONE, TWO, THREE

•
o

262

o

J3B -- REYWORD PARAMETERs

Purpose
You should ~se a keyword parameter
in a macro definition for a value
that changes infrequently. By
specifying a standard default value
to be assigned to the keyword
parameter, you can owit the
corresponding keyword operand in
the calling macro instruction.
Reyword parameters are also
convenient tecause:
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.

/

~

Equal Sign

/._L

Ste,ndard Value

/

Specifications
a_---'--,

!he general specifications for
symbolic para.weters described in
J3 also apply to keyword parameters.
Each keyword parameter must· be
in the format show.n ill" the figure
to the right.
•

The actual parameter must be a valid
variable symbol.

•

value is assigned to a keyword
parameter by the corresponding
keyword operand through the name
of the keyword as follows:

qKEYWORDI= DEFAULT

Keyword Parameter
Specification

•

Keyword Operand
Specification

IKEYWORDJ= VALUE
Example:

A

~1.

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 passed see R5).

Varillble Symbol

Source Module

MACRO
Prototype

KEYS

&KEYWORD=ABC,&KEY2=(A,B,C)

MEND
START

o

Standard value of

KEYWORD

2. If the corresponding keyword
operand is specified, the value
after the equal sign overrides the
standard value in the prototype
and becomes the value of the
• • parameter for that call (see K5) •

8

Section

J~

The MaGro Definttion

263

•

•

NO'I'E: A null character string can
be specified as the standard value
of a keyword parameter, and will
be generated if the corresponding
keyword opera~.j is omitted.

Source Module

Null character
string

MACRO
FXDPT
L&TYPE ®,AREA
A&TYPE ®,CONST
ST&TYPE ®,SUM
MEND
OPEN

START

0

LH
AH
STH

Null character
string

3,AREA
3,CONST
3,SUM

END

o
264

o

J3C -- COMBINING POSITIONAL AND

MEYWORD PARAMFTERS
Purpose
By using positional and keyword
parameters in a prototype statement,
you combine :the benefits of both.
You can use positional parameters
in a macro definition for passing
values that change frequently and
keyword parameters for passing
values that do not change often.

Specifications
Positional and keyword parameters
can be mixed freely in the nacro
• prototype statement. The same
applies to the positional and keyword
• operands of the macro instruction
(s ee K3q. Note, however, tha t
the order in which the positional
• 'parameters appear deterreines the
order in which the positional
operands must appear. Interspersed
• • keyword parameters or operands do
not affect this order.

MEND
START

•
MIX

END

O
,

'

f;'

Section J: The Macro Definiti..on

265

14 - Model Statements
J4A -- PURPCSE
Model statements are statements from which assembler
language statements are generated at pre-assembly time.
They allow you to determine the form of the statements
to be generated. By specifying variable symbols as pcints
of substitution in a model statement, you can vary the
content of the statements generated from that model
statement. You can also use model statements into which
you substitute values in open code.
J48 -- SPECIFICATIONS
The following specifications also apply to model staterrents
in open code. Exceptions are noted where applicable.
,/
i

Model Stmnt

Format of Model Statements
Columns:

A model statement consists of one
or more fields separated by one
or more blanks.
Each field or subfield can consist
of:

o _________

Model Statement

~1

I~I-II

II

I

Fields:
Name

Operation

Remarks

Operand

ordinary character string

•

An

•

A variable symbol as a point of
substitution

•

Any combina tion of ordinary
character strings and variable
symbols to form a concatenated
string.
The statements generated at preassembly time from model statements
must be valid machine or assembler
instructions, but must not be
conditional assembly instructions.
They must obey the coding rules
described in Section E or they will
be flagged as an error at assembly
time.

Examples:

LABEL L 3,AREA

,.

LABEL L 3,20(4,5)
&LABEL

i

3, &AREA

FIELD&A L 3,AREA&C

·';-~·"
C,
:

266

)

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

O~"

~~~n
Alphabetic Character

Variable SyU'bols as Points of
Substitution

"

Format:

Values can be substituted for
variable symbols that appear in
the name, operation, and operand
fields of model statements; thus,
variable symbols represent points
of substitution. The three main
types of variable symbol are:
•

~ 0'0 6 Alphameric Characters

&

9 'ARIABL' .

Symbols

symbolic parameters (described in
J3 above).

~system variable symbols (described
in J7 below) , and
•

SET symbols (described in

Global
SETA
SETS
SETC

L 1A) •

NOTES:
1. Symbolic parameters, SF!' symbols,
and the system variable symbol,
'SYSLIST, can all be subscripted.
The remaining system variable symbols
'SYSNCX, &SYSECT, &SYSPARM, &SYSDATE,
and 'SYSTIME cannot be subscripted.

Local
SETA
SETS
SErC

used in
open code

Examples of
Subscripted
Variable
Symbols:

&PARAM(3)

o

Name

generated fron> a model statement
appear in the listings in the same.
• oolumns as in the model statement.
~ However, when values are substituted
for variable symbols the generated
fieldS can be displaced to the
• right.

&SETA (10)

&SYSLIST(2)

&SETC(lS)

Operation

Operand

10

16

trEL

MVC

AREAl,AREA2

model

+LABEL

MVC

AREAl,AREA2

generate

~NAAE

&Op

&TO, &FROM

model

0

2. The fields in a statement

&SYSLIST(l,3)

(LABEL)

(MVC)

+LABEL

(AREAl) (AREA2) values

AREAl, AREA2

MVC

.,

I rAt least one blank between fields

&A:

o

I
model

B &C,&D
(AREAl) ,

~

(LABEL)
+LABEL

FC

generated

(AREA2)

-I
f-REAl , AREA 2

}8

values to be
substituted

generated

Section J: The Macro Definition

267

Bules for Concatenation
When variable symbols are
concatenated to ordinary character
strings, the following rules apply
to the use of -~he concatenation
character (a period):
The concatenation character is
mandatory when:

•
•·

&FIELDoAG
&FIELDA

•
•
•

&DISP. (&BASE).

• An alphameric character is to
follow a variable symbol.

• A left parenthesis that does not
enclose a subscript is to follow
a variable symbol.

S
.

••
•
•

268

The concatenation character is not
necessary when:

DC D' &INT. &FRACT'

Value

&FIELD
&FIELDA

AREA
SUM

AREAA
SUM

&DISP
&BASE

100
10

lOO{10l

I

~,-.y1

99
88

DC 0 1 9 . 8 '

DC D'9988'

./

DC D'9988'

optional

• An ordinary character string
precedes a variable symbol.

The concatenation character must
not be used between a variable
syrr~ol and its subscript; otherwise,
the characters will be considered
a concatenated string and not a
subscripted variable symbol.

!(~\

Generated
Result

Variable
symbol

DC D'&INT.,:.:..&FRACT &INT
&FRACT

DC D ' &INT&FRACT '

• A variable symbol follows another
variable symbol.

Substitutet:

I Concatenation character is not generated .1

A period (.) is to be generated.
Two periods must be specified in
the concatenated string following
a variable symbol.

• A special character, except left
parenthesis or period, is to follow
a variable symbol.

Vai~esto~

Concatenated
String

1Concatenation character is not generated ]

• j
•
•
•
FIELD&A

B 3 O

&A,V /. -

&A
&A
&B

A
A
B

&A&B

10
&SYM (& SUBSCR)} &SUBSCR
&SYM(lO) ENTRY

r

FIELDA
B

*3-0

AB

{ENTRY

/

\

-'-

".

~-f

o

Rules for Model Statement Fields
The fields that can be specified
in model statements are the same
fields that can be specified in
an ordinary assembler language
statement. They are the name,
operation, operand and re~arks
fields. It is also possible to
specify a continuation - indicator J
field, an identification - sequence
field, and a field before the begin
column, if the appropriate ICTL
instruction has been specified.
Character strings in the last three
fields (in the standard format only
oolumns 72 through 80) are generated
exactly as they appear in the model
statement, and no values are
substituted for variable symbols.
Model statements must have an entry
in the operation field, and, in
most cases, an entry in the operand
field in order to generate valid
assembler language instructions.

Name
Field

Allowed

In~

THE NAME FIELP: The entries allowed
in the name field of a model
statement are given in the figure
to the right, including the allowable
results of generation.

O

Variacle syubols must not be used
to generate comments statement
indicators.
NOTE: Restrictions on the name
entry are further specified where
each individual assembler language
instruction is descrfbed in this
manual.

•
•
•
•
•

Statements
(before
generation)

In Generated
Statements

Not Allowed

blank
ordinary symbol
sequence symbol
variable symbol
any combination
of variable symbols
and other character
strings concatenated
together

• blank
• valid ordinary
symbol

:*l8

(generated
results)

o
Section J: The Macro Definition

269

THE OPERATION FIELP: The entries
allowed in the operation field of
a model statement are given in the
figure to the right, including the
allowable results of generation.

~ The operation codes ICTL and OPSYN
•

(Before
Generation)

are not allowed inside a macro
definition. The MACRO and MEN!:
operation codes are not allowed
in model statements; they are used
only for delirr:iting macro
definitions.

represents the operatlon
code for:
- any machine instructio...
- a macro instruction
- the following Assembler
instructions:

•

•

- Any machine instruction, or

•

- The assembler instructions listed.

•

NOTE: The MNOTE and MEXIT statements
are not model statements; they are
described in J5C and J5E
respectively.
The generated operation code must
not be an operation code for the
following (or their OPSYN
equivalents) :

•

- A macro instruction,

~- A conditional assembly instruction,
or

41»-

270

The assembler instructions listed.

.. The asse'1lbler
_ operation codes:

ICTL
8{.oPSYN

CCW

EJECT

II1II

COpy
CSECT

EQU
EXTRN
ISEQ
LTORG

START
TITLE
USING
WXTRN

g~~PE~~~Y • ~~i~~

DC

If the REPRO operation code is
specified in a model statement,
no substitution is perforn;ed for
the variable symbols in the statement
line following the REPRO statement.
Variable symbols can be used alone
or as part of a concatenated string
to generate operation codes for:

~~OP:'~.i
DSECT

:Dim

•

o

• blank

• An ordinarv...§Y.!.!l.b.gl that

C8!
•

.. Not AflOWed

Allowed

MACRO
{ME1'lD

•

•

:~~ii}

PRINT
PUNCH

• A variable symbol
• A combination of
variable symbols and
other charact8l1Strings
concatenated together

n Generated • An ordinary_symbol that
• _ _m_e_n_ts
represents the operation
Generated
code for:
Results)
- any machine instruction
- the following assembler
instructions:

CCW
CNOP
COM
CSECT

....

EJECT
~

ENTRY
EQU
EXTRN
LTORG
ORG

~..

DC
DROP
OS
DSECT
-~;

'

• blank
• a macro instruction
operation code
• a conditional
assembly operation
code:

SPACE
TITLE
USING
WXTRN

.• •
'- •
PRINT
PUNCH

(MNOTE)

ACTR
AGO
AGOB
AIF
AIFB
ANOP

the following
operation codes:

COpy
ICTL
ISEQ
MACRO
MEND

0

o

Operand
Field

Allowed

..

In~
§tatement~

(Before
Generation)

THE OPERAND FIELD: The entries
allowed in the operand field of
a model statement are given in the
figure to the right, including the
allowable results of generation.
•

.

~

An ordinarY_sv.mbol

~

A character string.
combining alphameric
and special characters (but not variable
symbols)

~

A variable sv.mbol

~

A combination of
variable symbols and
other character
strings concatenated
together

~

blank (if valid)

NOTE: Variable symbols must not
be used in the operand field of
a COPY, ICTL, ISEQ, or OPSYN
instruction.
In Generated

~(if.y~lid)

Not Allowed

~

operand field of a:

COPY, ICTL,
ISEQ or OPSYN

~1@ments

.. Character Slring_
that represents a
valid assembler or
machine instruction
operand field

(Generated
Results)

o

Remarks Field
Model

statement

•

'"'

~

&NAME+&OPlr

&TO,&F~REMARKS

Generated
./:

•

LABEL

!oWe

FIELDA,FIELDB

THE REMARRS FIELP: Any combination
Example I: LCLC
of characters can be specified in
the remarks field of a mod.el
statement. No values axe substituted
&ADDR SETC
into variable symbols in this field.

NOTE: One or more blanks must be
used in a model statement to separate
. t h e name, operation, operand, and
remarks fields from each other.
Blanks cannot be generated between
fields in order to create a complete
assembler language statement.

Model

LA

Generated

LA

&ADDR
BASE'

Model

o

•

LCLC

&A
&C

SETA
SETC

100
'&A

LA

3,&C LOOK HERE

,Ai.,

Generated

Conditional
Assembly
} Statements

Jne or more blanks
must be generated

Example II: LeLA

&A
&C

REMARKS ABOUT &TO

LA 3

&A NOW IN REGISTER'

';'\)~~iOnlJ .·remarks
,i;j~e.~
.............. .

'iB6i'oONOW IN "RE'2;I STER'£~~;~

Section J: The Macro Definition

271

c

J6 -- Processing Statements

Conditional Assembly
Instruction

Function Performed

J5A -- CONDITIONAL ASSEMBLY
INSTRUCTIONS

GBLA,GBLB,GBLC
LCLA,LCLB,LCLC

Declaration of initial values
of variable S'/mbois (global
and local SET symbols)

SETA,SETB,SETC

Assignment of values to
variable symbols (SET
symbols)

Conditional assembly instructions
allow you to deterreine 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.

Branching

AIF

- Conditional (based on
logical test)

AGO

- Unconditional

ANOP

- To next Sequential
instruction (No
operation)

f~CTR

Setting..b2,Qp Counter
j'

J5B -- INNER MACRO INS'IBUCTIONS
Macro instructions can be nested inSide macro definitions,
allowing you to call other macros from within your own
definitions. Nesting of rracro instructions is fully
described in 1<6.

J5C -- THE COpy INS!RUC!ION
purpose
The COpy instruction, inside macro definitions, allows
yo~ to copy into the macro 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 i~ E1A.

272

-

o

J5D -- THE MNOTE INSTRUCTION
Purpose
You can use the MNOTE instruction
to generate your own error messages
or .display intermediate values of
variable symbols computed at preassemtly time.

Specifications
The MNOTE instruction can be used

lin.slidlea:~c~~s d~~~!~f~~Sc~~I~~~
created by substitution. The
MNOTE instruction causes the
generation of a message which is
given a statement number in the
printed listing.
~he format of the MNOtE instruction
statement is given in the figure
to the right.

o

•

•

•

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 expression allowed
1n the operand field of a SETA
instruction. The expression must
have a value in the r~nge 0 through
255 •

2. If the severity code is omitted,
hut 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 code
subfield is omitted, including the
comma separating it from the message,
the assembler generates the message
as a comments statement.

MNOTE
Name

Operation

Operand

A sequence
symbol or
blank

MNOTE

One of four options allowed:
n, 'message' } error
, 'message'
message

•

*. 'message' } comments
'message'

Examples:
Source Statements

•
•
•

Generated Result

MNOTE

2, 'ERROR IN SYNTAX' 2,ERROR IN SYNTAX

MNOTE

,'ERROR, SEV l'

MNOTE *,' NO ERROR'

MNOTE8. NO ERROR I

,ERROR, SEV 1

.;~,NO

ERROR

NO ERROR

o
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 froK
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:

Y

e.

Variable symbols are allowed (NOTE: variable symbols
can have a value that includes even the enclosing
apostrophes) •

4It to~ generate
Double ampersands and double apostrophes are needed ~
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.

f

,.

o
274

ISeverity Code I

/

Value of
Variable Symbol

MNOTE Operand

3~'THIS

o

IS A MESSAGE'

,

Generated
Result

,

3,THIS IS A MESSAGE

&PARAM=ERROR

3,ERROR

&A=10

3,VALUE OF &A IS 10

&AREA=FIELD1

3,L'FIELD1

3, 'DOUBLE &S'

&S'

3,DOUBLE &

3,'DOUBLE L&APOS&AREA'

&APOS="
&AREA=FIELD1

3,DOUBLE L'FIELD1

3,
' MES SAGE
STOP'm:"
.
....c
.. ,.,0(,

.~

Invalid remarks,
must be separated
from operand by
one or more blanks

3'MESSAGE S:~OF

3,MESSAGE STOP RMRKS

Valid Remarks
entry

o
Section J: The Macro Definition

275

J5E -- THE MEXIT INSTRUCTION
MEXIT

Purpose

Name

Operation

Sequence

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 macro definition
(see J2B) •

MEXIT

symbol
or blank

o

Operand
Not reOlJirec.

MACRO

EXITS

Specifications

A
B
C

The MEXIT instruction statement
can be used only inside macro
definitions. It has the format
given in the figure to the right.

•

MEXIT
/'

The MEXIT instruction causes the
assembler to exit from a macro
definit ion to the next seguential
instruction after the macro
instruction that calls the
definition.
(This also applies
to nested macro instructions, which
are described in K6.)

F

MEND
START

,.

276

D
E

0

('"JI

i

o

J6 - Comments Statements
J6A -- INTERNAL MACRO COMMENTS STATEMENTS
Purpose
You write internal macro comments inJthe body of a macro
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.

c

No values are substituted for any
~ariable symbols that are specified
1n macro corements statements.

WILL NOT BE.

*
*

J6B -- ORDINARY COMMENTS STATEMENTS

Purpose
Ordinary co~ments staterr.ents
(described in B1C) 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.

o

Even though this type of statement
is generated along with the model
statements of a macro definition,
values ar~ not .. sub~ti tuted for any
variable ~ymbols specified~

Begin column
(standard

Columns

,

value)

(1) (2)

11/

Asterisk

}

Format

~AnY Character String

*

~NT WILL

HE GENERATED

Section J: The Macro Definition

277

Page of GC33-401Q-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 symbcls as points of substitution in
model statements and conditional assemtly instructions.

General Specifications for System Variable Symbols
The s stem variable symbols: 4St~J;>A'11 &SYSPARM, and
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, SE!B,
or SETC instructions (see L3).

,.

278

o

Syst. Var. Sym.
Source Module

MACRO
MACl
MEND
MACRO

MAC 2

Ie

I
O
.

•

THE SCOPE OF SYSTEM VARIAELE SYMBOLS:
The system variable symbols:

~:~:~~io~~iS!~:~. an~h~:~:'

KENO

OPEN

START

G
L

that they are assigned a read-only
value for an entire source module;
a value that is the same throughout
open code and inside any rr.acro
definitions called. The system
variable symbols: &SYSEC!, &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.

NOTE:

&SYSECT
&SYSLIST
&SYSNDX
are only allowed
inside macro
definitions

J"j·A'""-&SYSDATE

,II:

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 4 - - Corresponds to date
printed in the page
heading of listings,
remains constant for
each assembly

The global system variable symbol
&SYSDATE is assigned a read-only
value of the format given in the
figure to the right.

o

NOTE: The value of the type attribute
of &SYSDATE (T'&SYStATE) is always
U and the value of the count
attribute (K'&SYSDATE) is always
eight.
(Attributes are fully
described in L1B.)

~m/dd/YYI

Section J: The Macro Definition

279

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

i~

\~,-~

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
&NAME CSECT
DC

Specifications

INNER

The local system variable symbol
&SYSECT is assigned a read-only
value each time a macro definition
is called •
•

4It

•

•
•

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
ini tiated 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 asserrbler to assign
a value to &SYSECT that depends
on the control sectien in force
inside the outer macro when the
inner macro is called (see K6).
NOTES:
1. The control section whose name
is assigned to &S.YSECT can be defined
by a START, CSECT, tSECT, or COM
instruction.

2. The value of the ty~e attribute
of &SYSECT, T'gSYSECT, is alwa

u, and the value of the
os' attribute .(1' 'SYSIe!) 1.
only

.the: . n~r,.o(

.>a v.luet:O

chara<1~~'

u,yS~l::
ttr
are fully described in L1E.)

?-80

END

DC A (&SYSECT)
A(&SYSECT)

MEND

o

J7C -- 'SYSLIST
Purpose
You can use 'SYSLIST instead of
a positional parameter inside a
macro definition, for example, as
a point of!substi tution. Ey varying J
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
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.

10

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:
•

1. To refer to a pos1"tional operand

•

2. To refer to a sublist entry of
a positional operand (sublists are
fully described in K4 below).

•
•

&SYSLIST

Macro
Instruction

I &SYSLIST I

/

CLST 'P1,P2,P3,

~

Point of substitution
in macro definition

Macro
Instruction

CSUB

The subscript n indicates the
position of the operand referred
to. The subscript m, if specified,
indicates the position of an entry
in the sublist specified in the
operand whose position is indicated
~ the first subscri~t n.
Point of substitution
in macro definition

}

o
Sect:ion J: The Macro Definition

281

o
The subscripts nand m can be any
arithmetic expression allowed in
the operand of a SET~ instruction
(see L3A). The subscript n must
be greater than or equal to O.
The subscript m must be greater
than or equal to 1.

Macro Instruction:

NAME

The figure to the right shows
examples of the values assigned
to &SYSLIST according tc the value
of its subscript, m and n.

&SYSLIST(2)
&SYSLIST(3,2)

TWO
4

Null

&SYSLIST(9)

Null

&SYSLIST(3,3)

Null
:!'

&SYSLIST{3,5)

Null

&SYSLIST(2,l)
&SYSLIST(2,2)

TWO
Null

0

If the va. lue of subscript
NOTE:
, n is zero, then &SYSLIS~(n) is
assigned the value specified in
the name field of the macro
instruction, except when it is a
sequence symbol.

-

&SYSLIST(4)

&SYSLIST(O)
&SYSLIST(3)

,.

282

Value
Substituted

•
•
•
•

8

ONE,TWO,(3,4"6),,EIGH~

Point of substitution
in macro definition

0

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.
•

MACALL

NAME
(3,4,,6)

C""·'

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 L1B.)
However, the number
attribute of &SYSLIST, N"SYSLIST,
is -different from the number
attribute described in L1B. One
J
of the two forms given in the figure
to the right can be used for the
number attribute:

,I

•

Macro
Instruction

MACLST

•

• To indicate the number of Sublist
entries that have been specified
in a positional operand indicated
by the subscript.
NOTES:

MACLST
MACLST
MACLST

•

•

o

ON'&SYSLIST

• To indicate the number of
positional operands specified in
a call

•

1. For N'&SYSLIST, positicnal
operands are counted if specifically
omitted by specifying the comma
that would normally have followed
the operand.
2. For N' &SYSLIST (n) , sublist entries
are counted if specifically omitted
by specifying the comma that would
normally have followed the entry.
3. If the operand indicated by n
• is not a sublist, N'&SYSLIST~)
is 1. If it is omitted, __.
N' &SYSLIST (n) is zero.
/'.

1

Value of
N'&SYSLIST

1,2,3,4
A,B, ,D,E
,A,B,C,D
(A,B,C), (D,E,F)

MACLST
MACLST
MACLST

KEYI=A,KEY2=B
A,B,KEY1=C

eN'

MACSUB
MAC SUB
MAC SUB

~}.

2l

I

Counts sublists
as one operand

0

•

~ lKeyword operands
2 are not counted

Value of
N'&SYSLIST (2)

(n=2)
A, (1,2,3,4,5),B
A,(1,,3,,5),B
A, (,2,3,4,5),B
A,B,C

1

A\,C

0

A,.kl!;Y= (A, B, C)

0

0

•
~

I

&SYSLIST (n)

Macro
I.nstruction

MAC SUB
MACSUB
MAC SUB
MAC SUB

4

5

~}.

,I

o

Keyword sublists
are not counted

Section J: The Macro Definition

J

283

J1D -- &SYSNDX
purpose
You can attach &SYSNDX to the end of a symbol inside a
macro definitlon 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 iSYSNDX produces two
or more unique symbols. ~hus you avoid an error being
flagged for multiply defined symbols.

&SYSNDX

Source Module

Specifications
The local system variable symbol
&SYSNDX is assigned a read-only
value each time a macro definition
is called from a source module.
•
•

The value assigned to &SYSNI:X is
a q-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) •

&Pl&SYSNDX

•

MACRO
CONST

&Pl,&P2

DC

F'&P2 '

AREA&SYSNDX

F
Assume
&SYSNDX··O()()9'1

MEND
OPEN

START

NOTES:
1. &SYSNDX does not generate a valid
symbol, and it must:

•
•

a. Follow the symbol to which
it is concatenated
b. Be concatenated to a symbol
containing four characters or
~.

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.
~ttributes

AREAOOIO DS

NOTE:

F

TWO 00 10 and
TWO 0011 are
two different
symbols and
thus not multiply defined

\--~~TWOOOll

are fully described

DC

AREAOOll DS

F'200'
F

THREE 30

in L lB.)
,THREE0012,DC

F'300'

J1E -- &SYSPARM
F

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

()

Specifications
&SYSPARM

O

The global system variable symbol
'&SYSFARM 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 source
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 PAffi.1 field
of the EXEC statement is used to
specify its value, the PARM field
restrictions reduce its maximum
possible length.

EXlmple:

//STEP

Job Control Statement

EXEC ASMFC,PARM=(SYSPARM(DEBUG»

.----.~.~
Source Module

OPEN

START
AIF (. &SYSPARM' NE • DEBUG'). SKIP.

M$FllBLE

~U"act~'1need not .~.•~.f1.. ,d~qt)~'

'amper$ands forCMS - i ' :

.

2. Double apostrophes are needed
to represent single a~ostro~hes
because the entire PARM field
specification is enclcsed in
apostrophes •

. • SinceCMSdoesnot stripsill91e
apostrophes from the variable
$ymbol, you need. not specify
[t!I<)Uble apostrophes fQr CMS ..

o
Secti.on· J: Tl,1e Macro D'ef ini tion

285

3. If SYSPARM is net s~ecified in
a job control statement outside
the source roodule, &SYSPARM is
assigned a default value of the
null character string.

c~

o

5. CMs·~arse•.• tll.· . ~~; lin."
breakingtl1e ,. in,,~';.ln~(r ei

Page of GC33-40 10-5
As Updated 28 Dc.: 1981
By TNL GN20-9372

Specifications
Any keyword operand specified in
a macro instruction must correspond
to a keyword parameter in the macro
definition called. However, keyword
operands do not have to be specified
in any particular order.

Key Opnd

IKEYWORDI=VALUE
fL."

.;~'':

'~~jW·

o

.:. . ;...,

Identifying
"Keyword"
symbol has
up to 7
charcters
without
ampersand

A keyword operand must be coded
in the format shown in the figure
to the right. If a keyword operand
~iS specified, its value overrides
the default value specified for
• the keyword parameter.
The standard default value obeys
the same rules as the value specified
in the keyword operand (see KS) •

"'"'-_ _ _--J

•

Keyword
Operand

Value can be
up to 255
characters long

=DEFAULT

Examples Of KeywQrd Onerands :

MACKEY

Corresponding
Keyword
Parameter

Sublist
described
in K4

MACKEY

KEYl=1,KEY2=2,KEY3=3

MACKEY

KEY3=2000,KEYl=O,KEYWORD=HALLO

Section K: The Macro Instruction

297

The following examples describe
the relationship between keyword
operands and keyword parameters
and the values that the assembler
assigns to these parameters under
different concitions.

.,~N~U~II~ch~a~ra~c~te~r~.,~

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

string is default
value

Source Module

MACRQ
MACCORR &KEY1=DEFAULT,&KEY2=,&KEY3=123
SHOW

DC

C'&KEY1&KEY2&KEY3'

MEND

OPEN START 0

o

0

0

MACCORR KEY1=OVERRIDE,KEY2=O,KEY3=4:i6

SHOW DC

O
•

•

The keyword of the operand
corresponds to a keyword parameter.
The value in the operand overrides
the default value of the parameter.

MACCORR

o

The keyword operand is not specified.
The default value of the parameter
is used •
The keyword of the operand does
not correspond to any keyword
parameter. The assembler issues
an error message, but the macro
is generated using the default
values of the· other parameters.
The defaul t valu~ specified
for a keyword parameter can be the
null character string. The null
character string is a character
string with a length of zero; it
is not a blank, because a blank
occupies one character position.
NOtIE:

•

298

Null default
value of KEY 2

END

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

o

~3C

-- COMBINING POSITIONAL

AN~

KEYWORD OPERANDS

Purpose
You can use positional and keyword operands in the saRe
macro instruction: use a positional operand for a value
that you change often and a keyword operand for a value
that you cbange infrequently.
MACRO

2

3

4

5

•

MIXED &Pl,&P2,&P3,&P4,&P5,&KEYl=lO,&KEY2=A

Specifications
Positional and keyword operands
can be mixed in the macro instruction
operand field. However, the
~ positional operands must be in the
same order as the corresponding
positional parameters in the macro
•
prototype statement.

MEND

START
MIXED

, It.,~#a~C>:~:t:ands .must precede

•.

.()"Ji'.~ jiif . $pecified ..

1

2

3

4

5

END

o
&KEYI

AREA2

DC lOFLS'2024'

END

o

NOTE: The system variable symbol
~ &SYSLIST (n) refers only to the
positional operands in a macro
• instruction.

I
Section K: The Macro Instruction

299

K4 -- Sublists in Opera..'1.ds
Purpose
You can use ~ sublist in a positional
or keyword operand to specify several
values. A sublist is one or more
entries separated by commas and
enclosed in parentheses. Each entry
is a value to which you can refer
in a macro definition by coding:

Sublist

Source Module

1. The corresponding symbolic
parameter with an appropriate
subscript or
2. The system variable symbol
&SYSLIST with appropriate subscripts,
the first to refer to the positional
operand and the second to refer
to the sublist entry in the operand.

&KEY(l)
&Pl(l}

value in
keyword
operand

DC
DC
MEND:;!

&SYSLIST can refer only to sublists
in positional operands.
OPEN

START 0

Specifications
(H20 I H, 200)

I

(A, a,C)

The value specified in a positional
or keyword operand can be a sublist.

•
••

A symbolic parameter can refer to
the entire sublist or to an
individual entry of the sublist.
To refer to an individual entry,
the symbolic parameter must have
a subscript whose value indicates
the position of the entry in the
sublist. The subscript must have
a value greater than or equal to
one.

DC F'O'

H20

DC H'200'
DC A(A/B/C)

END

,.

300

FO

v.,
~.~

..

Format:

The format of a sublist is given
in the figure to the right. A
sublist, including the enclosing
parentheses, must not contain more
than 255 characters.

Examples:

Valid sublist with the
null character string
as the only entry

Sub list specified
in corresponding
operand (or as
default value of
keyword parameter)

Parameter

The figure to the right shows the
relationship between subscripted
parameters and sublist entries if:

&PAR(3)

8(1,2,,4)

Null character string

&PAR{S)

8{1,2,3,4)

Null character string

&PAR
&PAR{l)

•

A sublist entry is omitted,

•

The subscri~t refers past the end
of the subl~st,

•

The value of the operand is not
a sublist,

&PAR(2)

The parameter is not subscripted.

&PAR

o

NOTE: The system variable symbol,
&SYSLIST(n,m) , can also refer to
sublist entries, but only if the
sublist is specified in a positional
operand.

&PAR(2)
&PAR
&PAR (1)

A

-'fA

·I~

•

•

A
Null character string

(A)'"

(A)

(A)
(A)

~ Considered as
Sublists

()

I

A
Null character string
()

()

Null character string

&PAR(3)

()~

Null character string

&PAR(2)

(A~

&PAR(l)

I

,e,D)

This blanl(indicates
end of operand field

&PAR(l)

o

Value generated
(or used in
computation)

( ')

I

Nothing
} 

local
local
local
global
global
global

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

o

Source Module

NAME

START

0

LCLC

&LIST,&LABEL

SETC
SETC

•

O

Y,

'~.TRINC;

,

•....... <:;,

NOTE: . SET symbols can be used in •

.!!!!!!!.. and operand field of macro
O the
instructions. However, the value

, X,

MAC CALL

&LIST\,' '.',;

thus passed through a symbolrcparameter Into a macro definition
iS considered as.a character string
and is generated as such.

Macro
Instruction

MACRO
MAC CALL
DC

:E:ND

Macro
Definition
Called

MEND

STRING

Q

DC A(X,Y,Z}

Can only refer

to whole string

Generated
result

o
Sectipn L: The,Conditional Assembly Language

321

Subscripted SET Symbols Specifications
A subscripted SET symbol must be
specified as shown in the figure
to the right.
The subscript can be any arithmetic
expression allowed in the operand
field of a SETA instruction (see
L4A) •
A subscripted SET symbol can be
used anywhere an unsubscripted SFT
symbol is allowed. However,
subscripted SET symbols must be
declared as subscripted by a previous
local or global declaration
instruction.

o

&SETSYM(

Format:

Arithmetic Expression
whose value must not
be 0 or negative

Example

,.

LeLA

&ARRAY(20)

•
&ARRAY (10)

ARRAY

5

4It many
The subscript refers to one of the
positions in an
of values
arra~

•
•

identified by the SET sym 1. The
value of the subscript must not
exceed the dimension declared for
the array in the corresponding LCLA,
teLB, LCLC, GBLA, GELE, or GELC
instruction.
NOTE:

The subscript can be a

~subscripted SET s¥mbcl. Five levels

of sUbscript nest1ng are allowed.

&ARRAY(S)=2
quivalent

322

{

•

&ARRAY(&ARRAY(10})=2

o

o

L1B - DATA ATTRIBUTES
What Attributes Are
The data, such as instructions, constants, and areas, which
you define in a source modu~e can ce described in terns
of:
1. Type, which distinguishes one form of data fron ancther:
for example, fixed-point constants from floating-foint
constants, or machine instructions from macro instructions.
2. Length, which gives the number of bytes occupied by
the object code of the data.
3. Scaling, which indicates the number of positions occufied
by the fractional portion of fixed-point and decimal
constants in their object code form.
4. Integer, which indicates the number of positions occupied
by the integer portion of fixed-point and decimal constants
in their object code form.
5. Count, which gives the number of characters that wculd
required to represent the data, such as a macro
instruction operand, as a character string.

be

6. Number, which gives the number of sublist entries in
a macro instruction operand.

o

These six characteristics are called the attributes of
the data. The assembler assigns attribute values to the
ordinary symbols and variable symbols that represent the
data.

o
Section L: The Conditional Assembly Language

323

Attribute

' Main Uses

Purpose

Type

Gives a letter that
identifies type of
data represented

· In tests to distinguish
between different data
types
• For value substitution
· In macros to discover
missing operands

Length

Gives number of
bytes that data
occupies in storage

• For substitution into
length fields
· For computation of
storage requirements

Scaling

Refers to the
position of the
decimal point in
decimal, fixed-point
and floating-point
constants

• For testing and regulating
the position of decimal
points

Integer

Is a function of
the length and
scaling attributes
of decimal, fixedpoint, and floatingpoint constants

- To keep track of
significant digits (integers)

Count

Gives the number
of characters
required to represent data

• For scanning and
decomposing of
character strings
• As indexes in substring notation

Gives the number
of sublist entries
in a macro
instruction operand
sublist

. For scanning sublists
- As counter to test for
end of sublist

Purpose
Specifying attributes in conditional
assembly instructions allows you
to control conditional assembly
logic, which in turn can control
the sequence and contents of the
statements generated from model
statements. The specific purpose
for which you use an attribute
depends on the kind of attribute
being considered. The attributes
and their main uses are shown in
the figure to the right.
•

NOTE: The number attribute of
gSYSLIST (m) and &SYSLIST (m,n) is
described in J1C.

•

Number

• For substitution into a
scale modifier

Specifications
FORMA'!": The format for an attribute
reference is shown in the figure
to the right •
•
•

•

The attribute notation indicates
the attribute whose value is desired.
The ordinary or variable symbol
represents the data which possesses
the attribute. The assembler
substitutes the value of the
attribute for the attribute
reference.
WHERE ALLOWED: An attribute
reference to the type, scaling,
integer, count, and number attritutes
can be used only in a conditional
assembly instruction. The length
attribute reference can be used
both in a conditional assembly
instruction and in a machine or
assembler instruction (for details
on this use see C4C) •

,324

Attributes

Apostrophe

,/
Format:

Attribute
Notation

•

'------•

Ordinary or
Variable
Symbol

Attribute Reference

Examples:

T'SYMBOL
L'&VAR
K'&PARAM

•

o

COMBINATION WITH SYMBOLS: The figure below shows the six
kinds of attributes and the type of symbol with which the
attributes cari be combined.

NOTE: Whether or not an attribute reference is allowed
in open code, in macro definitions, or in toth, depends
on the type of symbol specified.

ATTRIBUTES SPECIFIED

I IN OPEN CODE 1

Symbols
Specified

Type
T'

Length
L'

Scaling
S'

Integer
I'

Count

Ordinary Symbols

YES

YES

YES

YES

YES

YES

SET Symbols

YES

NO

NO

NO

YES

NO

System Variable Symbols:

YES

NO

NO

NO

YES

NO

Ordinary Symbols

YES

YES

YES

YES

NO

NO

SET Symbols

YES

NO

NO

NO

YES

NO

Symbolic Parameters

YES

YES

YES

YES

YES

YES

System Variable Symbols.

YES

YES

YES

YES

YES

YES

K'

Numbe
N'

&SYSPARM,&SYSDATE,
&SYSTIME

0

&SYSLIST
&SYSNDX,&SYSPARM,
&SYSDAT~ &SYSECT,
&SYSTIME

NO

NO
NO

o
Sectivn L: "rhe Conditicnal Assembly Language

325

•

ORIGIN OF VALUES: The value of
an attribute for an ordinary symbol
specified in an attribute reference
comes from the data represented
by the symbol, as shown in the
figure to the right.
The symbol must appear in the name
field of an assembler or ~achine
instruction, or in the operand field
- of an EXTRN or WXTRN instruction.
'the instruction in which the symbol
is specified:

I

I

Attribute
Notation

I I
I

I

Statement
Label

Ordinary
Symbol

I

I

I.
I

Operand
of
EXTRN or
WXTRN
Instruction

TI
LI
S'
II

1. Must appear in open code

2. Must not contain any variable
symbols, and
3. Must not be a generated
instruction.

o
326

o o

1he value of an attrioute for d
variable symbol specified in cin
attribute reference comes from the
value substitutea for the varidble
symbol as follo~s ~ee also the
figure to the right) :
1~'For'SETs;ytribols'and

",t;JS

!1only.

.tliesys1;em

variable sYtnbols&Sl'S;eCT ,&SYSNDX,
HYSPARM.,&SYSDATE,·· .'·aM&SYSTlME,

•

:~r:~~r~~~!ev!i!:e~fc~:S!r~;:!s.

•

2. r'or symbolic oararneters and thE"
system variable symLJol, &SYSLIS'l',
the vctlues of the count and number
attriDutes come from the operands
of macro instruction~.

Symbolic

I

parameter
or
&SYSLIST

The values of the type, length,
scaling, and integer attributes,
however, come from the values
repre~ented by the reacro instruction
operands, as follows:

•
o

•
•

K'
N'

Symbolic

....-----'-----..
Macro I nstruction Operand

parameter
as inner

...------------4

N '&SYSLIST
N '&SYSLIST (n)

macro
instruction
operand

a. If the operand is a sublist,
the sublist as a whole has
attributes; all the individual
entries and the whole sublist
have the same attributes as those
of the first suboperand in the
sublist (except for 'count',
which can be different, and
'number', which is relevant only
for the whole sublist).
o. If the first character or
characters of the operand (or
sUblist entry) constitute an
ordinary symbol, and this symbol
is followed by either an
arithmetic operator (+,-,*, or
/) , a left parenthesis, a cornmd,
or a blank, then the values of
the attributes for the operand
are the same as for the ordinary
symbol.

•

o

Ordinary
Symbol

Character string
not beginning
with a symbol

TI . . - - - ' - - - - .
L I Statement
SI Label
II

EXTRN
or

WXTRN
Operand

c.

If the operand (or sublist
is a character string
other than a sublist or the
character string described in
b. above, the type attribute
is undefinel (0) and the length,
scaling, and integer attributes
are invalid.

entr~

o
Section L: The Conditional Assembly Language

327

Page of GC33-40 10-5
As Updated 28 Dec 1981
By TNt GN20-9372

VALUES: Because attribute references
are allowe~ only in conditional
assembly instructions, their values
are available only at fre-assembly
time, except for the length attribute,
which can be referred to outside
conditional assembly instructions
and is therefore also available
at assembly time (see C4C).
NOTE: The system variable symbol,
&SYSLIST, can be used in an attribute
reference to refer to a macro
instruction operand, and, in turn,
to an ordinary symbol. Thus, any
of the attribute values for macro
instruction operands and ordinary
symbols listed below can also be
substituted for an attribute
reference containing &SYSLIST.
THE TYPE ATTRIBUTE (T'): The type
attribute has a value of a single
alphabetic character that indicates
the type of data represented by:

O.

An ordinary symbol outside a
macro cannot be used as the operand
of T' inside a macro in DOS assembler.

~.

The type attribute of a
sublist is set to the same value as
the type attribute of the first
element of the sublist.

only

•

Type

Attribute

B

o
E

F
G
H
K
L

V

X

A SET symbol. ~

The type attribute reference can
be used only in the c~erand field
of the SETe instruction or as one
of the values used for comparison
in the operand field of a SETE or
AIF instruction.

Z

~

o

For ordinary symbols and outer macro instructions
that are symbols

...
.~

C

S

-

A-type constant, implicit length, aligned (alsoCXO
instruction label)
Binary Constant
Character Constant
Long floating-point constant, implicit length, aligned
Short floating-point constant, impliCit length, aligned
Full-word fixed-point constant, implicit length, aligned
Fixed-point constant, explicit length
Half-word fixed-point constant, implicit length, aligned
Floating-point constant, explicit length
Extended floating-point constant, implicit length, aligned
Packed decimal constant

A

, ·...·0
ortlY. R

--

Data Characterized

: Defined as labels for DC and OS instructions

Y

A macro instruction operand

NOTE:

os

~----

Qt.. P

An ordinary symbol

DOS NOTE:
o~y

T'

....

Q:iypl~~;~t:irn.,.icit .tngtKaJfglttd

A-, So, Q-, V- or V-type address constant, explicit length
S-type address constant, implicit length, aligned
V-type address constant, implicit length, aligned
Hexadecimal constant
V-type address constant, implicit length, aligned
Zoned decimal constant

._--------+------------------------------------------a

c).!

: Defined as labels for assembler language statements

M
W

Machine instruction
Macro Instruction
CCW instruction

J

: Identified as control section name

T

: Identified as external symbol by EXTRN or
WXTRN instruction

$

A macro Instruction Operand that is:
A self-defining term
Omitted (has a value of a null character string)

NOTE: Ordinary symbcls used in
the name field of an EQU instruction
have the type attribute value nun.

os However, the third operand of an
only EQU instruction

can

be used

explicitly to assign a type attribute

value to the symbol in the name
field.

0)
328

Page of GC33-401 0-5
As Updated 28 Del' 1981
By TNL GN20-9372

The Type Attribute Value=U is assigned to the following:
Ordinary symbols that are used as labels:

When a symbol or macro instruction
operand cannot be assigned any of
the type attribute values listed
in the preceding figure, the data
represented is considered to be
undefined and its type attribute
is U. Specific cases of where U
is assigned as a type attribute
value are given in the figure to
the right.
•

•

o
•

•

•
•
I•
•

for the EaU instruction without a third operand
that are defined more than once

The type attribute will be set to U
when the same ordinary symbol is used
to define a label in more than one
place, even though only one label
will be generated by conditional
assembly statements.
THE LENGTH ATTRIEUTE (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
attritute reference.
If the length attribute value is
desired for pre-assembly ~rccessing,
the symbol specified in the attribute
reference must ultimately represent
the name entry of a statement in
open code. In such a statement,
the length modifier (for rc and
DS 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
multi term expression, because the
assemtler does not evaluate this
expression until assembly time.

•

0

for DC and OS statements that contain variable symbols
Example:

Ul DC &X'l'

DOS only
for DC and OS statements that contain expressions as
duplication factors
Example:

DC (AA BB}F'15'

The SETC variable symbol

OSonW. .... .. ... ....

..

. ' ..

Tn. Sy.... varUtie tymbots: IiSVSPARM, Ic$VSDATE,

lndaSYSTtME ..
Macro instnl~ion operands that specify titerals.
Inner ImICro instruction operands that are ordinary symbols,

:

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
assemtly instructions. Then, the
length attribute value is not
available for conditional assembly
processing, but is used as a value
• · at asseml::ly 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
time, the symbol has the same length
attribute value as the first symbol
of the expression in the first
operand of the EQU instruction.

o

for the LTORG instruction

••

OPEN

START

DATA

DC

FL7'7E+9'

AREA

DS

XL (L 'DA'rA)

LENGTHS

DATA ,AREA

MVC

AREA ,DATA

os However ,the second (,)perad alan IQU
J)nIv instruction can be used. t~assign a
length attribute value to the <8YmDOl
in the name field.

Section L: The Conditional Assembly Language

329

NOTES:
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 (5'): 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.

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

Pand Z

Equal to the number
of decimal digits
specified to the right
of the decimal point
(0 through 31 - P)
(0 through 16 - Z)

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.

Examples:

PACKED
ZONED

DC
DC

P'+l2.345'
Z'+12.345'

S'PACKED=3
S'ZONED=3

C.,'",)
,
.

330

I

'

.

o

O

THE INTEGER ATTRIBUTE (I'): 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
attributes are given in the figure below.
NOTE: The integer attribute reference can be use.d only
in arithmetic expressions (see L4) •

Constant
Type
Allowed
(attribute
value)

0

Formula
Relating the
Integer to the
Length and
Scaling
Attributes

•

Fixed-point
(H,F, and G)

I'=8*L'-S'-1

nt
(D,E,L, and K)

I'=2*(L'-1)-S'

Examples

HALFCON DC HS6'-2S.93'
8*2-6-1
ONECON DC FS8'100.3E-2'
8*4-8-1

Values
Of the
Integer

}

9

23
4
9

Only for L-Type

>8
I'=2*(L'-11-S'-2

when L'

EXTEND DC· LS10'S.3l?'
2*(16-1} -10 -2

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.Sl3'
2*3-3-1

2

Zoned (Z)

I'=L'-S'

ZONE DC Z1 3.Sl3'
4-3

1

Section L: The Conditional Assembly Language

331

--0
Macro Instruction.
Operands

THE COUNT ATTRIBUTE iKe): The count
attribute applies on y 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:
•

• That constitute the macro
instruction operand, or

NOTES:

1. The count attribute reference

SET S~mbols •
Delimiting apostrophes
.not included

&C
&C
&C

SETC
SETC
SETC

'ALPHA'
,

&B
&B

SETB
SETB

1
0

&A
&A

SETA
SETA

399

&A

SETA

•

I

I

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.

System Variable Symbols

&SYSNDX=

332

0912

"

Value of Count .
Attribute

All characters of operand
are included

ALPHA
(SUB,LIST,ALL)
2(10,12)
,'A', 'B'
blank
,,
null character string
omitted 0 rand)

K'

5

14
8
6
3

2
0

o
Macro Instruction
.Operand Sublist

•

THE NUY.BER ATTRIBUTE (N'): The
number attribute applies only to
the operands of macro instructions •
It has a numeric value that is equal
to the number of sublist entries
in the operand.

1 + number of commas
separating the entries

(A,B,C,D,E)

NOTES:

•
5

6

1. The number attribute reference
can be used only in arithmetic
expressions (see L4) •
2. N'&SYSLIST refers to the number
of positional operands in a macro
instruction, and N'&SYSLIST(m)
refers to t~e number of sublist
entries in the m-th c~erand (for
further details on the number
attribute of &SYSLIST, see J7C) •

Value of
Number Attnbute

4
1

(A)

A

When operand is
not a sublist

(No operands)

1

o

o

o
section L: The Conditional Assembly Language

333

Pale ofOC33-401()'!
As Updated 28 Dec 1981
By TNL ON2()'9312

0,
I __

L1C - SEQUENCE SYMBOLS

'i

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 dod

Format:

Specifications
Sequence symbols must be specified
as shown in the figure to the right.

~alPhabetic character
~o to 6 alphameric characters

·S'EQUENC

Examples: • SEQ

• A1234
• #924

Statements in which
sequence symbols must not
be used as name entries

The following assembler instructions:

COpy
EQU

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.

GBLA
GBLB
GBLC
ICTL
ISEQ

LCLA
LCLB
LCLC
MACRO
OPSYN

J.I!JIIJJii:• •fli
The Macro prototype
instruction

Any instruction that already
contains an ordinary symbol
or vlrllbl, symbol

334

0)

0

Source Module

",1
,I'

..

r

MACRO
MAC ONE

~ERAT

.GENERAT ANOP
&NAME

o

e'
•

o

'.

Sequence symbols can be specified
in the operand field of an AlE or
AGO instruction to branch to a
statement with the same sequence
symbol as a label.

DS

OH

MEND
MACRO
MAC TWO

sequence symbol has a local scope.
Thus, if a sequence symbol is used
in an AIF or AGO instruction, the
sequence symbol must be defined
as a label in the same part of the
program in which the AIF or AGO
instruction appears; that is, in
the same macro definition or in
open code.
A

:D
.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) •

• GENE RAT

MEND

;.

START

:,:,

~'

AGO

• THERE

..

pen.

ode

DS

OH

END

o
Section L: The Conditional Assembly Language

335

L2 - Declaring Set Symbols
You must declare a SET symbol before
you can use it. In the declaration,
you specify whether it is to have
a global or local scope. The
assembler assigns an initial value
to a SET symbol at its pOint of
declaration.

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.

Specifications
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.

336

Name
Blank

Operation

Operand

LCLA,

One or more variable
symbols separated
by commas

LCLB,or
LCLC

o
MACRO

&A2 cannot be used
here, outside its de clared scope

MEND
MACRO
&A2 cannot be used

•
•

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.

o

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

LOCAL VARIABLE SYMBOLS MUST NOT
BE MULTIPLY DEFINEC: A local SET
variatle symbol declared by the
LeLA, 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 prototype
statement.

•

2. It must not be the same as any
global variable symbol (see L2E)
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
syrrhol, 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 J1).

DOS NOTE. 2tTb~91ob,al. declarati()~$
• must precedetheloq.~ de~ ara1;i~~~~
Correct definition
of SETC symbol
(no symbolic
parameters
allowed in
open code)

338

0 ,"
I

'I.,

o

SUBSCRIPTED LOCAL SET SYMBOLS:
A local subscripted SFT 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 }
LCLB,
or LCr.C

The max imum dimension allowed is
32,767.
Format:

•
•

The dimension indicates the number
of SET variables associated with
the subscripted SET sfmbol. The
assembler assigns an ~nitial value
to every variable in the array thus
declared.
NOTE: A subscripted local SET
-symbol can be used only if the
declaration has a subscript, which
represents a dimension; a
nonsubscripted local SE1' symbol
can be used only if the declaration
had no subscript.

Instruction

LCLA
LCLB
LCLC

Array Defined
Same initial values as for non-subscripted
SET symbols

•

Example:
LCLB

&B

( 10 )

II I I

I II

10 10 10 0 0 0 0 10 0 0

o
Section L: The Conditional Assembly Language

339

L2B -- THEGBLA, GELP, ANt GELC
INSTRUCTIONS

Furpose
You use the GELA, GELE, and GBLC
instructions to declare the global
SETA, SETB, and SETC symbols you
need.

Name
Blank

GBLA,
GBLB, or
GBLC

One or more variable
symbols separated
by commas

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

Any variable symbols declared in
the operand field have a global
scope. They can be used as SET
symbols anywhere after the pertinent
GBLA, GBLS, or GBLC instructions.
However, they can be used only
within those parts of a program
in which they have been declared
as global SET symbols, that is in
any macro definition and in open.
code.

•

•

NOTE:

Values can be

~assed

between:

•

• The macro definitions, MAC1,
and MAC2, only by using the variable
symbols &B and &C •

•

• The macro definition, MAC2, and
open code, only by using the variatle
symbol &C •

•

340

I

• The macro definition, MAC1, and
open code, only by using the variatle
syIriboi &C.

o

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

GBLA

The assembler assigns this initial
value to the SET symbol only when
it processes the first GBLA, GBLB,
or GBLe instruction in which the
symbol appears. Subsequent GBLA,
GBLB, or GBLe instructions do not
reassign an initial value to the
SET symbol.

O
•

0
0
Null character string

&A

o

-.&A=O

MEND
OPEN

START

o

lI:>T1t "I'be" ··;.,.·.,,·.·. ·In.traetloi
• • •t.prec~etheS.,ARTlna~~l~ ..

Processing
Sequence

o

value of &A
can be changed
in expansion of

macro FIRST

BLA

&A= assigned value

END

Section L: The Conditional Assembly Language

341

()

GLOBAL VARIABLE SYMEOLS 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

4It

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.

MEND

•

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 fcur characters
&SYS, which are reserved for system
variable symbols (see J7) •

LCLA

DOS NOTE 2:. The qlobal declarations

•

mst preceqe the local. deciarations.

&GA

GBLA

8&G'

GBLB
{

GBLC

&QC1,&GC2

These variable symbols
communicate values
between the macro
MULTGLOB and

LCLC

G~LA

l

8

GBLB

GBLC
START

~

(

~I

&&:1:

•.~.J.t:~~,~i:;

END

GBLA}
GBLB
GBLC

SUBSCRIPTED GLOBAL SET SYMBOLS:
A global subscripted SET symbol
is declared by the GELA, GBLB, or
GBLe instruction. This declaration
must be specified as shown in the
figure to the right.

4It The
maximum dimension
32,767.

•

; SET S YM(I di menSionJ)

Format:

Instruction

Array Defined
Same initial values as
for non-subscripted SET symbols

allowed is
GBLA
GBLB
GBLC

•
•

342

The dimension indicates the number
of SET variables associated with
the subscripted SET sfmbol. The
assembler assigns an ~ni tial value
to every variable in the array thus
declared.

Global arrays are assigned initial
values only by the first global
declaration processed, in which
a global subscripted SET symbol
appears

i

Source Module

MACRO
MACl
NOTES:

~ 1. A subscripted ~lobal SET symbol

can be used only 1f the declaration
bas a subscript, which represents
a dimension; a nonsubscriited global
SET symbol can be used on y if the
declaration had no subscript.
#

8

2. Wherever a particular global

:JiL1

SET symbol is declared with a

GBLA

&Al'&A2(4~4Et

GBLB

&SWITCH (50)

GBLC

&CHAR(lO) ,&C

/8SETA

P2{Z2)

dimension as a subscript, the

~dimension must be the same in each

SETC

&C

declaration.

·
0

-'"

OPEN
Open

o

'tlCBAR(6) '

MEND
MACRO

f)C)sNO
.. ~E: ·The.-GBLB ... ';.'SI~iB(50l·.·
·1nstructionmust prec ·e· tbeftART
. instruction. . . . . . . . . . . :

Code

-

/0
/0

•

MAC 2
GBLB

&SWITCH (50)

MEND
START

0

. GBLB

4Et

&SWITCH (50)

END

L3 -- Assigning Values to Set Symbols
L3A -- THE SETA INSTRUCTION

Purpose
The SETA instruction allows you to assign an arithroetic
value t.o 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
This allows you to use SETA symbols as
counters, indexes, or for other repeated computations that
require varying values.
SETA symbol.

Section

L~

The Conditional Assembly Language

343

o

Specifications

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

o

The variable symbol in the name
field must have been previously
declared as a SETA symEol in a GBLA
or LCLA instruction.

•

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.

'Ihe SETA
can be
the same
SETA symbol has been previously
declared in a GBLA or LCLA
instruction with an allowable
dimension.

SUBSCRI~TED

•

O

Operation

A variable

SETA

Operand

Symbol.

SYM~OLS:

SETA
symbol 1n the name f1eld
O subscripted,
but only if

•

Name

LCLA

&Al,&A2

LCLA

&SUBSCRA(lOO)

•

•

2000

&SUBSCRA(20) SETA

..

...:

Must be an arithmetic
expression allowed in
operand of SETA
instruction

The assembler assigns the value
of the expression in the operand
field to the position in the declared
array given by the value of the
SU5SCript. The subscript expression
must not be 0, or have a negative
value, or exceed the dimension
actually specified in the
declaration.

&SUBSCRA

Array

1-1--1-1---1.\_.&.--_..::.1' \2000 I· .. ? 0

f
&SUBSCRA (200)

t

t

W

2

SETA

2000

t

100

*ERROR* NO
VALUE ASSIGNE
Value assigned

&Al

344

SETA

&SUBSCRA(20)

&Al=2000

c:;

L3B -- THE SETC INSTRUCTION
Purpose
The SETC instruction allows you to assign a character
string value to a SETC symbol. You can assign Whole
character strings or concatenate several smaller strings
together. The assembler will assign the composite string
to your SETC symbol. You can also assign parts of a
character string to a SETC symbol by using the substring
notation (see L5) •
You can change the character value assigned to a SETC
symbol. This allows you to use the same SETC symbol with
different values for character comparisons in several
places or for substituting different values into the same
model statement.

SETC

Specifications
I

o

ormat:

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

Operation

Name
A variable
symbols

The variable symbol in the name
field must have been previously
declared as a SETC symbol in a GBLC
or LCLC instruction.

Operand

SETC

One of four options,
exemplified below

SETC

T'&DATA

Value Examples:

&CI

or
T'SYMBOL
Must appear alone
and must not be
enclosed in
apostrophes

The four opticns that can be
specified in the operand field are:
A

type attribute reference

BC

&C2

SETC

BC

&C3

SETC

A character expression (see L4B)
A substring notation (see LS)
A concatenation of substring

notations, or character expressions,
or both.
~The assembler assigns the character
string value represented in the
operand field to the SETC symbol
in the name field. The string
length must be in the range 0 (null
character string) through 255
characters.

Up to 255 characters
enclosed in apostrophes

BCDEF

&C4

,
I

ABC' • 'DEF'

SETC

•

or

'ABC'.'ABCDEF'(4,3)

o
Section L: The

CondH~ional.

Assembly Language

345

Character
Value Assigned
Value of &A1 to SETC symbols

Examples:

o
•

NOTE: When a SETA or SETB symbol
is specified in a character
expression, the unsigned decimal
value of the symbol (with leading
zeros removed) is the character
~ given to the symbol.

ICl
IC2
IC3

SETC
SETC
SETC

'IAl'
'IAl'
'IAl'

IC4
ICS

SETC
SETC

'-200'
'IAl'

IC6

SETC

IC7

SETC
SETC

Ica

200
00200
-200

~

200

200
200

-200

o

o

00200

'IAl+1'
'1-IA1'

30+1
1-30

30
-30

Format:

(~\

Value Assigned
to SETC symbol
Must be in the
range 1 through

255

ICl

346

o

IC2

SETC

(3) 'ABC'

IC3

SETC

(31 'ABCDE' (1, 31

•

•

IC4A SETC

(31 'ABC' • 'DEF I

IC4B SETC

' ABC' • (31 'ABCDEF' (4, 3

•

.-',~J)

o

••

SUBSCRIPTED SETC SYMBOLS: The SETC
symbol in the name field can be
subScripted, but 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 nega ti ve
• · value, or exceed the dimension
actually specified in the
declaration.

•

&SUBSC~C(l~)

&SUBSCRC

r.

I

IABCDEI ~ ~

SETC
Array:

Must be an arithmetic
expression allowed in
the operand of a SET A
instruction

t t
2

'ABCDE'

I

t

'---~t

10

20

&SUBSCRC (25) SETC 'ABCDEF' **ERROR::=* No
~
Value Assigned
Value assigned

&Cl

SETC

'&SUBSCRC (10)

,

&Cl=ABCDE

L3C -- THE SETB INSTRUCIION

o

Purpose
The SETB instruction allows you to assign a tinary 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.

10·
'

,

"

Section L: The Conditional Assembly Language

347

,,0

Specifications

\~"')/

The format of the SETB instruction
statement is given in the figure
to the right.
The variable symbol in the name
field must have been ~reviously
declared as a SETE symbol in a GELB
or LCLB instruction.

'os The

SETS
Format:
Name

variibl.e',$~olisassigtte,>
,

only a t1~e attr~.J;)~'t_.!a~ue, of N~

A variable
symbol

The three options that can be
specified in the operand field are:
•

1. A binary value

•

2. A binary value enclosed in
parentheses

OSNOTJh

An

arithmetic value en<:1,
val~eca~~~,r~~resent~d by an.""'i<,,:,i
unsigned(}~c~mal self-defining .te~~i';
a .SETA. symJj0:l.! '. or. anattribu~e":'
of 0 to the symbol in' the name
field. Ifthevalue1s~otO •.:t-be
assemble~ass~9nsavalueof1.:'
<;;;

8

Operation
SETB

LCLB
LCLB

•

&SUBSCRB(lO) SETB

1

Array:

&SUBSCRB
Must be an arithmetic
expression allowed
in operand of a SETA
instruction

&SUBSCRB(72)

"

----'I

!--~_ _~~~ {_ _

t

2

SETB

t

10

50

1

** ERROR** No VALUE ASSIGNED
Value assigned

&Bl

SETB

&SUBSCRB(lO}

&BI=l

6

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 described in C6. 1he
assembler evaluates absolute and r~locatable expressions
at assembly time.
L4A -- ARITHMETIC (SETA) EXPRESSIONS

Purpose
You can use an arithmetic expression for assi9ning an
arithmetic value to a SETA symbol, or for computin9 a value
used during conditional assembly processing_
An arithmetic expression can contain one or more SET

symbols, which allows you to use arithmetic expressions
wherever you wish to specify varying values, for exam~le
as:

c

1. Subscripts for SET symbols, symbolic parameters, and
'SYSLIST, and in substring notation.

You can then control loops, vary the results of
computations, and produce different values for substitution
into the same model statement.

Section L: Th.e Conditional

As~~mbly

Language

349

Specifications
Arithmetic expressions can be used
as shown in the figure to the right.

4Dt
•

350

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 SETe symbol, after
substituting values into any variable
symbols. It does not evaluate the
arithmetic expression.

can be U~ In

Used As

SETA instruction

operand

&Al SETA &Al+2

AI F instruction
or
SETS instruction

comparand
in arithmetic
relation

AIF (&A*lO GT 30).A

Subscripted SET
symbols

subscript

&SETSYM(&A+IO-&C)

Substring notation
(See L6)
Sublist notation

subscript

subscript

Example

'&STRING' (&A*2,&A-l)
sublist

(A, B ,C , D )

when &A=1

&PARAM(&A+l) =B
&SYSLIST

subscript

&SYSLIST(&M+l,&N-2)
&SYSLIST(N'&SYSLIST)

SETC instruction

character
string in
operand

&C SETC '5-10*&A'
if &A=lO
~
then &C=5-10*1

•

o

b

'the figure below defines an arithmetic expression cselfdefining terms are described in C4E).

Arith. Exp.
I

Arithmetic
Expression

Operators Allowed
Unary:

+ positive
- negative

Scaling
Integer
Count
or
Number

Binary:

+addition
- subtraction

* multiplication
I division

Arith. Exp = Arithmetic Expression

o
section L: The Conditional Assembly Language

351

. Restrictions

Variable
Symbol

SETA

none

SETB

none

SETC

}

&SYSPARM

The variable symbols that are allowed
as terms in an arith~etic expression
are given in the figure to the
right.

value must be an
unsigned decimal
self-defining term
in the range 0
through

Example

Value

&C

123

&SYSPARM

2000

&PARAM

X'Al'

&SUBLIST(3)

C'Z'

&SYSLIST(3)

24

2,147,483,647
.Y:t;i_
_

Symbolic
Parameters
&SYSLIST (n)

value must be a
self-defining term

~corresPOnding
operand or subiist

&SYSLIST (n ,m)

&SYSNDX

352

entry must be
a self-defining
term
none

&SYSLIST(3,2) B'lOl'

o

b

Operators

Unary

Binary +, -, *,/

RULES FOR COOING ARITHMETIC
EXPRESSIONS: The following is a
summary of coding rules for
arithmetic expressions:

Examples

1. Both unary (operating on one
value) and binary ~perating on
two values) operators are allowed
in arithmetic expressions.
•

•
_

•

o

+,-

t::::=:> - &A

• • &A
&A

JI

&A

&B

c::=::> &A-&B

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

Context determines whether a
+ or - is a Unary or
Binary operator

3. An arithmetic expression !!!Y.§.i
not begin with a binary operator,
and it must not contain two binary
operators in succession.

100

4. An arithmetic expression must
not contain two terms in succession.
S. An arithmetic expression must
not contain blanks between an
operator and a term nor between
two successive operators.
6. An arithmetic expression can
contain up to 24 unary and binary
operators and up to 11 levels of
parentheses.

&A-&B

~

&C-&D

c:::=>

&C * (-&D)

&A/&B+IOO

INVALID

·C:A
_

INVALID
INVALID
INVALID

&C*I&D
&C + *&D

!

'"

r---------,I

'"

NOte that the parentheses required
for sublist notation, substring
notation, and subscript notation
count toward this limit.

c=>
c:::.:::>

X'FF' (lO*&x)

Leftmost operator between
two terms is Binary

INVALID

Jr

/'

\

"I5"B '101'

INVALID

o
Section L: The Conditional Assembly Language ·353

.
EVALUATION OF ARITHMETIC EXPRESSIONS:
The assembler evaluates arithmetic
expressions at pre-assembly time
as follows:

o

a. It performs unary operations
before binary oferations, and

••
•

h. It performs the binary
operations of multiplication
and division before the binary
operations of addition and
sul:tract ion.

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

--

-

Value of Arithmetic
Expression

8:A~
&A*--X ' A' ' ===(>

5.f~+10

+50

.I'

1. It evaluates each arithmetic
term.
2. It performs arithmetic operations
from left to right. However:

-

Examples of Arithmetic Expressions

&A=10,&B=2

==I> 1O~:e21
(&A+10) /&B =t> 20/2

tA+10/&B

==¢

-===:>

15
10

&A=lO
&A/2

===e>

10/2

5

&A=ll
&A/2

:::::::t>

11/2

&A/2

===t>

1/2

•

5

&A=1
Q

&A=l
10~~&A/2

&A +

•
•

=t>

10/2

1.L

(X'FF"2+&B-(~~+'~1

4. In parenthesized arithmetic
expressions, the assembler evaluates
the innermost expressions first
and then considers them as arithmetic
terms in the next cuter 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 -2 31 through +2 31 -1.

Final evaluation

354

5

1
J

0

1

L4B -- CHARAC'l'ER (SETC) ~PRESSIONS
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
L4C). 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 chaxacter values into a
character expression allows you to use the character
expression wherever you need to vary values for substitution
or to control loops.

Char, Exp,

Specifications

can 'be Used in

Used As Example

SETC instruction

operand

AIF instruction
or
SETS instruction

character
string in
character
relation

Substring notation
(See L5)

first part
of notatiol1

Character (SETC) expressions can

be used only in conditional assembly

instructions as shown in the figure
to the right.

&C SETC 'STRINGO'
AIF (' &C' EO 'STRINGl') .B

'~0\~.~T'

(2,5)=ELECT

t

I

character ,\
expression

'0
Section L: The Conditional Assembly Language

355

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.
A

•

Up to 255 characters are allowed in a character expression.

NOTE: Attribute references are not allowed in character
expr ess ions'.

Must not contain more than
255 characters
(including blanks)

Variable

Restrictions

Example

&A

356

SETA -0201
SETC I &A I

sign and leading
zeros are suppressed
sta'nd alone zero
is used

&C

SETB

none

SETC

none

&B SETB
&Cl SETC

1
'ABC'

&C2 SETC

'&C1 1

SETA

&ZERO
&C

•

Value
Substituted

Symbol

201

SETA 0

SETC

'&ZERO'

0
1
ABC

Symbolic
Parameters

none

&PARAM=(ABC)
&C1 SETC '&PARAM' (ABC}

System
Variable
symbols

none

&NUM SETC '&SYSNDX' 0201
if &SYSNDX= 201

(rf!'r\
\~~

o

Examples
Concatenation
operator is
a period (.)

Value of
Variable
Symbols

Value of
Character
Expression

Used

0
•

•
•

o

•

'ABC'

EVALUATION OF CHARACTER EXPRESSIONS:
The value of a character expressioq
is the character string within the
enclosing apostrophes, after the
assembler performs any substitution
for variatle symbols.

'&PARAM'

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,

•

SYMBOL

SYMBOL
A+B-C*D

'A+B-C*D'

Character strings, including variatle
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 symtol.

(. &&'

ABC

'&A+lO'

10

'&A&A'

15

10+10
(Not 20)
1515

mandatory I

•

'&C.ABC'
optional I
'&C.&C'

DEF

OEFABCI

DEF

DEFDEF

'&C.+IO*&A'
'ABC&C'

&A=200
&C=AREA
&C=.

'&C'

null

null character
string

'ABC&C.DEF'

&C=null

ABCDEF

.'LIISYMBOL'

} AREA

•

+ 10*200

ABC .

L'SYMBOL

(1,1) ) •

NOTE: To generate a period, two
periods must be specified after-a
var1able symbol, or the variable
symbol must have a period as part of
its value.

'&C'505'

2

2.505

'&C.505'

2.

2.505
Resultant Value
must be in the
range 0 through
255 characters
"

o
SectionL: The Conditional Assembly Language

357

o

o

Page of CC33-4010-O
Revised Septernber 29, 1972
By TNL CN33-8148

Concatenated
String

Value of
Variable
Symbol

CONCATENATION OF CHARACTER STRING
VALUES: Character ex~ressions can
be concatenated to each other or
to substring notations in any order:
This concatenated string can then
be used in the operand field of
a SETC instruction or as a value
for comparison in a logical
express ion •
•

•

ABCDEF

ABCDEF

, &C'

Ifhe resultant value is a character
string composed of the concatenated
parts •

Resultant
Character
String
Value

(4 , 3) • 'DEF '

ttiO..ll

NOTE: The concatenation character
(a period) is needed to separate
the apostrophe that ends one
character expressicn from the
apostrophe that begins the next.

, &C' (1, 3) • ' &C' (4, 3 )
, ABC t • '&C ' (4, 3) 'GHl f
, ABC' • ' &C ' . 'GHI'
'ABC' • ' , • 'GHI'

HI
ABCGHI
Value must be
in the range 0
through 255
characters

null character string

L4C -- LOGICAL (SETE) EXPRESSIONS
Purpose
You can use a logical (Boolean)
expression to assign the binary
value 1 or 0 to a SETB syrrhcl.
You can also use a logical expression
to represent the condition test
in an AIF instruction. This use
allows you to code a logical
expression whose value (0 or 1)
will vary according to the values
substituted into the expression
and thereby determine whether or
not a branch is to be taken.

Specifications

Logical Exp.
Can be
used in

Used As

Example

operand

&Bl

condition
test part
of operand

AIF

SETB

'0,
\'

Logical (SETB) expressions can be
used only in conditional assembly
instructions as shown in the figure.
to the right.

instruction

AIF
instruction

SETB

(&B2 OR 8 GT 3)

(NOT &Bl OR 8 EQ

3~A

Section L: The Conditional Assembly Language

359

The figure on the
expression.

o~~osite ~age

defines a logical

NOTE: An arithmetic relation is two arithmetic ex~ressions
separated by a relational operator. A character relation
is two character strings (for example, a character
expression and a type attribute reference) separated ty
a relational operator. The relational operators are:

360

EQ

(equal)

NE

(not equal)

LE

(less than or equal)

LT

(less than)

GE

(greater than or equal)

GT

(greater than)

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

o

Logical Operators Allowed

Outermost Expression
must be enclosed in
parentheses in SETB
and AIF instructions

addition
multiplication
negation

Logical

----r-----------------.;.-.------t

Expression ...

~---I

Optional parentheses
around terms and
expressions at this level

Items optionally
enclosed in
parentheses

Relational Operators Allowed
equal
not equal
less than or equal
less than
greater than or equal
greater than

o

Must be in the
range 0 through
255 characters

Comparand

or

or
Arithmetic
Expression
(defined in
L4A)

Substring
Notation
(defined in
L5A)

Type
Attribute

Must stand alone
and not be enclosed
in apostrophes

o
Section L: The Conditional Assembly Language

361

RULES FOR CODING

LOGIC~L

Examples of Logical Expressions

EXPRESSIONS:

The following is a sum~ary of coding
rules for logical expressions:

(&A GT 100 OR '&C' EQ F)

1. A logical expression must not
contain two logical terms in
success ion.

NOT &8

•

2. A logical expression can begin
with the logical operator NOT.

•

3. A logical expression can contain
two logical operators in succession;
however, the only corobina tions
allowed are: OR NOT or ANt NOT.
The two operators must be separated
from each other by one or more
blanks.

o

4. Any logical term, relation, or
inner logical expression can be
optionally enclosed in parentheses.

•

5. The relational and logical
operators must be iw.mediately
preceded and followed by at least
one blank or other sFecial character.
6. A logical expression can contain
up to 18 logical operators and up
to 17 levels of parentheses.

&B

(NOT

0
('&C'

~

OR

&A GE 10 AND &A LE 0)

'ALLOC')

~

( , &C ' EQ ' ALLOC ' )

Note that the relational and other
operators used by the arithmetic
and character expressicns in
relations do not count toward this
total.

(&A NE 10)
blank mandatory

o
362

EVALUATION OF LOGICAL EXPRESSIONS:
The assembler evaluates logical
expressions as follows:

Examples of Logical Expressions

•
•
•

•
•
•

('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
c. The logical terrr., 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

Always true
(given a value of 1)

GT 3»

(&B AND (NOT (5 GT 3»)

(&B OR &A AND ('&C' EO 'B'»

NOiE: If two comparands in a
character relation have character
values of unequal length, the
assembler always takes the shorter
character value to be less than
the longer one.

•

(&B OR (&A AND ('&C' EO 'BI»)

3. The assembler performs logical
operations from left to right.
However:

o

•

«&A NE 100) OR T'&AREA EO '&PARAM' (3,4»

2. If the logical term is an
arithmetic or character relation,
the assembler evaluates:

•
•

c:.~

}t\

1. It evaluates each logical term,
which is given a binary value of
o or 1.

~------------,.------------~

a. It performs logical NOTs
before logical ANDs and ORs,
and
b. It performs logical ANDs
before logical ORs.

(NOT (&Bl OR

Q. In parenthesized logical
expressions, the assembler evaluates
the innermost expressions first
and then considers theIr as lOgiCal.
terms in the next outer level of
expressions. It continues this
process until the outermost
expression is evaluated.

o
Section L: The Conditional Assembly Language

363

LS .. Selectiitg Characters from a String
L5A -- SUBSTRING NOTATION

Purpose
The substring notation allows you to refer to one or nere
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.

364

Can be
Used in

Used as

Example

SETC
instruction
operand

operand

&Cl

SETC

I

ABC I (1,3)

ABC

part of
operand

&C2

SETC

I

&Cl ' (1,2) • I DEF I

ABDEF

SETB or
AIF
instruction
operand
(logical
expression)

Character
value in
comparand
of character
relation

AIF
&B

SETB

Value Assigned
to SETC symbol

( I

&STRING I (1,4) EQ 'AREA') .SEQ

('&STRING ' (1,4) .19 1 EO

I

FULL9 I

)

Subs tt mg

•
•
•
•

The substring notation must be
specified as shoWn in the figure
to the right.
!he 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 subsdript 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.

EXlll'lpl..

Valul of V.-iIbII
Symbol

a..cter Value
of SubstrIng

I

ABCDE I (1, 5 )

ABC DE

I

ABCDE I (2, 3 )

BCD

t

ac

I

(3,.3)

'aPARAM' (3,3)

ABCDE

CDE

,( (A+3)*lO)

At3

o

:0
Section L: The Conditional Assembly Language

365

The character string must be a valid
character expression with a length,
N, in the range 1 through 255 characters.

0,

The length of the resulting substring
must be within the range 0-255.
The subscripts, el, an1 e2, must be
arithmetic expressions. The substring
notation is replaced by a value that
depends on the three elements: N, el,
and e2, as summarized below:

Examples:

•

•

•

ON

'ABCDEF'

(7,1>

N=e: *WARNING*

e2=O
,
• • , ABCDEF 'j., 0)

null
null

tif.IV;"'a-'u-e-of-e-l-d-is-rega-rd-ed-1

e

ON+ 1

''ABCDEF' (3,5)
'ABCDEF' (3,4)

~'

N=6

*WARNING*

CDEF
CDEF

(,)

:0

L6 - Branching

L6A -- The AIF INSTRUCTION
Purpose
The AIF instruction allows you to branch according to the
result of a condition test. You can thus alter the sequence
in which your assembler language statements are processed.
The AIF instruction also provides loop control for
conditional assembly processing, which allows you to control
the sequence of statements to be generated.
It also allows you to check for error conditions and thereby
to branch to the appropriate MNOTE instruction to issue an
error message.

o
Specifications
The AIF instruction statement must
be specified as shown in the figure
to the right.

Name

Operation

A sequence
Symbol or
Blank

AIF

Operand

Sequence
symbol
described
in L1C

allowed between
right parenthesis
and sequence
symbol

o
Section L: The Conditional Assembly Language

367

to

.CONTINO ANOP

•
•

•

processing continues herw

The assembler evaluates the logical
expression in the operand field
at pre-assembly time. If the logical
expression is true (logical value=1) ,
the next statement processed by
the assembler is the statement named
b: the sequence symbol. If it is
f lse (logical value =0), the next.
sequential statement is processed. '

AIF

• ERROR

(

ANOP
processing continues here

.OUT

368

Tbesequence symbol in the operand
field is a conditional assembly
label that represents an address
at pre-assembly time. It is the
address of the statement to which
a branch is taken if the logical
expression preceding the sequence
symbol is true.

Source Module

AIF

(I IC I EO IF I) .FORWARD

statement identified by the
sequence syrebol referred to in the
AIF instruction can appear before
or after the AIF instruction.
However, the statement must appear
within the local scope of the
sequence symbol. ThUS, the statement
identified ty the sequence symbol
must appear:

AIF

(IA GT 5).BACK

~e

•

ANOP
MEND

4Et.AIF Inins0tenruct10n
code, if the corresponding
does or
O.in which
In the same macro definition
the corresponding AIF

START 0

instruction appears.
open

'.
Ie·
'.\

The sequence symbols .EACK and
.FORWARD are not multiply defined.
No branch can be taken from open
code into a macro definition or
between macro definitions, regardless
of nested calls to other macro
definitions.

AIF

(10 NE 200).FORWARD

AIF

('ICHAR' NE ')').BACK

code

ANOP

END

NOTE: For compatibility, the
assemblers described in this manual
will process the AIFB instruction
~OS/360) in the same way they
process the AIF instruction.

L6B -- THE AGO

INSTRUC~ION

purpose
The AGO instruction allows you to cranch unconditionally.
You can thus alter the sequence in which your assembler
language statements are processed. This provides yeu with
final exits from conditional assembly loops.

o
Section L: The Conditional Assembly Language

369

specifications
The AGO instruction statement must
be specified as shown in the figure
to the right.

Name

Operation

A sequence

AGO

symbol or
blank

Source Module

o

The statement identified by a
sequence symbol referred to in the
AGO instruction can appear before
or after the AGO instruction.
However, the statement must appear
within the local scope of the
sequence syrilboi. Thus, the statement
identified by the sequence symbol
must appear

•

• In open code, if the corresponding
AGO instruction does or

AGO

• FORWARD

ANOP
AGO

• BACK
,,A"-'''\

~-:II/

ANOP

• • In the same macro definition
in which the corresponding AGO
instruction appears.
NOTE: For compatibility, the
assemblers described in this manual
will process the AGOB instruction
~OS/360) in the same way they
process the AGO instruction.
Open
code

START

o

AGO

• FORWARD

ANOP
END

L6C -- THE ACTR INSTRUCTION
Purpose
The ACTR instruction allows you to set a conditional
assembly loop counter either within a macro definition
or in open code.
Each time the assembler processes an AIF or AGO branching
instruction in a macro definition or in open code, the
loop counter for that part of the program is decremented
by one. When the number of conditional assembly branches
taken reaches the value assigned by the ACTR instructicn
to the loop counter, the assembler exits from the macro
definition or stops processing statements in open code.

370

By using the ACTR instruction, you
avoid excessive looping during
conditional assembly processing
at pre-assembly time.

Specifications

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

Name

Operation

Sequence
symbol or
blank

ACTR

MACRO
OUTER

The ACTR instruction can appear
anywhere in open code or within
a macro definition.

Operand

MACRO
INNER

o

ACTR

A conditional assembly loop counter
is set (or reset) to the value of
~the arithmetic expression in the
operand field. The loop counter
has a local scope; its value is
• decremented only by AGO and AIF
instructions and reassigned only
by ACTR instructions that appear
wi thin the same scope. Thus, the
nesting of macros has no effect
on the setting of individual loop
counters.

ACTR

The assembler sets its own internal
loop counter both for open code
and for each macro definition, if
neither contains an ACTR instruction.
The assembler assigns a standard
value of 4096 to each of these
internal loop counters.

ACTR

•

Loop Counter
for Macro

Open
Code

ACTR

END

Section L: The Conditional Assembly Language

371

LOOP COUNTER OPERATIONS: within
the local scope of a ~articular
loop counter (including the internal
counters run by the assembler) ,
the following occurs;
1. Each time an AGO or AIF (also
AGOB or AIFB) branch is executed,
the assembler checks the loop counter
. for zero or a negative value.

2. If the count is not zero or
negative, it is decremented by one.

MACRO

OUTER

MACRO
INNER

INNER
AIF (&A EO 5) .OUT

AGO .OUT

~ 3. If the count is zero, before

decrementing, the assembler will
take one of two actions:

MEND

a. If it is processing
instructions in open code, the
assembler will process the
remainder of the instructIons in
the source module as comments.
Errors discovered in these
instructions during previous
passes are flagged.

•
•
•

b. If it is processing
instructions inside a macro
defini tion, the asse'l1bler
terminates the expansicn of that
macro definition and processes
the next sequential instruction
after the call1ng macro
instruction. If the macro
definition is called by an inner
macro instruction, the assembler
processes the next sequential
instruction after this inner
call, that is, continues
processing at the next outer
level of nested macros (for
levels of nesting see K6A).

NOTE: The assembler halves the
ACTR counter value when it encounters
serious syntax errors in conditional
assembly instructions.

372

MEND

o

~

L6D -- THE ANOP INSTRUCTION
Purpose
You can specify a sequence symbol
in the name field of an ANOP
instruction, and use the symbol
as a label for branching purposes.
The ANOP instruction performs no
operation itself, but you can use
it to branch to instructions that
already have symbols in their name
fields. For example, if you wanted
to branch to a SETA, SETB, or SETC
assignment instruction, which
requires a variable symbol in the
name field, you could insert a
labeled ANOP instruction immediately
before the assignment instruction.
By branching to the ANOP instruction
with an AIF or AGO instruction,
you would, in effect, be branching
to the assignment instruction.
Specifications

o

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

••

ANOP
Name

Operation

Operand

A sequence
symbol or
blank

ANOP

Not requirtKi

Example

No operation is performed by an
ANOP instruction. Instead, if a
branch is taken to the ANOP
instruction, the asseIl'bler processes
the next sequential instruction.

AGO

~SEQ
&A

.SEQ.

ANOP

SETA

10

o
Section L: The Conditional Assembly Language

373

L7 -- In Open Code
L1A -- PURPOSE

conditional assembly instructions in open code allow yeu:
1. To select at pre-assembly time statements or groups
of statements from the open code portion of a source rredule
according to a pre-determined set of conditions. 'lhe
assembler further processes the selected statements at
assembly time.
2. To pass local variable information from open code through
parameters into macro definitions.
3. To control the comFutation in and generation of If,acre
definitions using global SE~ symbols.
4. To substitute values into the model statements in the
open code of a source module and control the sequence of
their generation.

Source Module

L1B -- SPECIFICATIONS

All the conditional assembly elements
and instructions can be specified
in open code •
•
•

Conditional assembly instructions
can appear anywhere in open code,
but they must appear after any
source macro definitions that are
specified.

The global andloe.l deelaratio,w:
instructions (see L2llllUst app ... ·,
fir$t in open code; that i$, tit

must follow any so.uJ:c~ macx:<> .. . . ...,>
definitions. specified. andprecea.};
the beginning of the first c<>ntJ'? Question
Mark

Hole Pattem
Zone Punches

I

Digit Punches

12 -9 - 4
0-8-4
11 - 9
12 -0 - 1
12 - 11 - 0 -9 - 8 - 1
I

I

I

Appendix

I~

Character Codes

381

o
This page left blank intentionally.

Q

Appendix II: Hexadecimal-Decimal Conversion Table

The table in this appendix provides for direct conversion of decimal and hexadecimal
numbers in these ranges:
r-------------~---------------1

I

Hexadecimal

I

Decimal

I

~--------------+---------------i

IL ______________
000 to FFF LI ______________
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 ~or 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
4096
2000
8192
3000
12288
4000
16384
5000
20480
6000
24576
7000
28672
8000
32768
9000
36864
AOOO
40960
BOOO
45056
COOO
49152
0000
53248
EOOO
57344
______________
___________
J
FOOO
61440
~

Appendix II: Hexadecimal-Decimal Conversion Table

383

x =

0

1

2

3

OOx
01x
02x
03x

0000
0016
0032
00"8

0001
0017
0033
00169

0002
0018
003f1
0050

0003
0019
0035
0051

Ollx
05x
06x
07x

0064
0080
0096
0112

0065
0081
0097
0113

0066
0082
0098
011'

08x
09x
OAx
OBx

0128
0144
0160
0176

0129
0145
0161
0177

OCx
ODx
OEx
OFx

0192
0208
022"
0240

lOx
llx
12x
13x

5

6

7

8

9

A

a

C

D

E

F

0020
0036
0052

0005
0021
0037
0053

0006
0022
0038
005.

0007
0023
0039
0055

0008
002"
00110
0056

0009
0025
00111
0057

0010
0026
00112
0058

0011
0027
00"3
0059

0012
0028
00""
0060

0013
0029
00115
0061

00116
0030
00"6
0062

001 !:I
0031
00«17
000:

0067
0083
0099
0115

0068
008"
0100
0116

0069
0085
0101
0117

0070
0086
0102
0118

0071
0087
0103
0119

0072
0088
010'
0120

0073
0089
0105
0121

007.
0090
0106
0122

0075
0091
0107
0123

0076
0092
0108
012"

0077
0093
0109
0125

0078
.00911
0110
0126

007'1

0130
0146
0162
0178

0131
0147
0163
0179

0132
0148
0161t
0180

0133
011J9
0165
0181

01311
0150
0166
0182

0135
0151
0167
0183

0136
0152
0168
018"

0137
0153
0169
0185

0138
01511
0170
0186

0139
0155
0171
0187

0140
0156
0172
0188

0141
0157
0173
0189

0142
0158
017"
0190

0143
01S}
0175
0191

0193
0209
0225
02'"

019.
0210
0226
0242

0195
0211
0227
0243

0196
0212
0228
02""

0197
0213
0229
02"5

0198
02111
0230
0246

0199
0215
0231
0247

0200
0216
0232
0248

0201
0217
0233
02169

0202
0218
023"
0250

0203
0219
0235
0251

02011
0220
0236
0252

0205
0221
0237
0253

0206
0222
0238
025"

0207
0223
0239
0255

0256
0272
0288
03011

0257
0273
0289
0305

0258
027"
0290
0306

0259
0275
0291
0307

0260
0276
0292
0308

0261
0277
0293
0309

0262
0278
0294
0310

0263
0279
0295
0311

026"
0280
0296
0312

0265
0281
0297
0313

0266
0282
0298
0314

0267
0283
0299
0315

0268
0284
0300
0316

0269
0285
0301
0317

0210
0286
0302
0318

0271
0287
0303
0319

14x
15x
16x
17x

0320
0336
0352
0368

0321
0337
0353
0369

0322
0338
035"
0370

0323
0339
0355
0371

032.
0340
0356
0312

0325
03111
0357
0373

0326
03"2
0358
0374

0327
0343
0359
0375

0328
03"4
0360
0376

0329
03ft5
0361
0377

0330
03"6
0362
0378

0331
0347
0363
0379

0332
03118
0364
0380

0333
03"9
0365
0381

0334
0350
0366
0382

0335
0351
0367
0383

18x
19x
lAx
lax

038"
0400
0"'6
0 .. 32

0385
0401
0"17
0433

0386
0402
0"'8
043.

0387
0403
01l1!'
01t35

0388
040"
0420
01t36

0389
0405
0421
0437

0390
0406
0422
0438

0391
0.07
01123
01139

0392
0408
011211
0.... 0

0393
0409
01125
01141

03911
0410
01t26
0442

0395
0411
0427
01643

0396
0412
0428
044"

0397
0413
0"29
01t45

0398
0414
0430
0"46

0399
04'5
01131
0447

lCx
lDx
lEx
lFx

0""8
0"611
01680
0496

0449
0465
0481
0497

0450
0466
0482
0498

0451
0467
0"83
01699

01152
0"68
0484
0500

0453
0469
0485
0501

0454
0"70
0486
0502

0.55
01171
0487
0503

0456
" .. 72
0488
0504

0457

0"51
047.
0"90
0506

0459
0475
0"91
0507

0"60
0476
0492
0508

0461
0477
0493
0509

0"62
0478
0494
0510

046~
047~
04~5

"
000"

01113

0489
0505

.

009~

0111
0127

0511

!'.. ~.
I

'

\

~f

20x
21x
22x
23x

0512
0528
05 ....
0560

0513
0529
05115
0561

051.
0530
0546
0562

0515
0531
05117
0563

0516
0532
05.8
05"

0517
0533
05119
0565

0518
053.
0550
0566

0519
0535
0551
0567

0520
0536
0552
0568

0521
0537
0553
0569

0522
0538
0554
0570

0523
0539
0555
0571

0524
05110
0556
0572

0525
05111
0557
0573

0526
0542
05!:18
0514

0527
0543
0559
0575

211x
25x
26x
27x

0576
0592
0608
06211

0577
0593
0609
0625

0578
059_
0610
0626

0579
0595
0611
0627

0580
0596
0612
0628

0581
0597
0613
0629

0582
0598
0614
0630

0583
0599
0615
0631

05811
0600
0616
0632

0585
0601
0617
0633

0586
0602
0618
063_

0587
0603
0619
0635

0588
060.
0620
0636

0589
0605
0621
0637

0590
0606
0622
0638

0591
0607
0623
0639

28x
29x
2Ax
2ax

OUO
0656
0672
0688

OUl
0657
0673
0689

06412
0658
067.
0690

06U
0659
0675
0691

06 ....
0660
0676
0692

06415
0661
0677
0693

06116
0662
0678
069"

06..,
0663
0679
0695

0648
06611
0680
Oi96

06'"
0665
0681
0697

0650
0666
0682
0698

0651
0667
0683
0699

0652
0668
06811
0700

0653
0669
0685
0701

06S11
0670
0686
0702

0655
0671
0681
0703

2Cx
2Dx
2Ex
2Px

070.
0720
0736
0752

0705
0721
0737
0753

0706
0722
0731
075.

0707
0723
0139
0755

0108
072.
07110
0756

0709
0725
07111
0757

0710
0726
07"2
0758

0711
0721
07"3
0159

0712
0728
07"0760

0713
0729
07fl5
0761

07111
0730
01116
0762

0715
0731
07..,
0763

0716
0732
07118
07641

0717
0133
07119
0765

0718
0734
0750
0766

0719
0735
0751
0767

30x
31x
32x
33x

0768
07811
0800
0816

0769
0785
0801
0811

0770
0786
0802
0818

0711
0787
0803
0819

0772
0788
080"
0820

0773
0789
0805
0821

077.
0790
0806
0822

0715
0791
0807
0823

0776
0792
0808
082'

0777
0793
0809
0825

0778
0"4
0810
0826

0719
0795
0811
0827

0780
0796
0812
0828

0181
0791
0813
0829

0782
0798
0814
0830

0783
0199
0815
0831

311x
35x
36x
37x

0832
08118
08641
0880

0833
08119
086S
0881

083_
0850
0866
0882

0835
0851
0867
0883

0836
0852
0868
08811

0837
0853
0869
0885

0831
08511
0870
0886

0839
0855
0871
0887

08'0
0856
0812
0888

0 ... ,
0857
0873
0889

08"2
0858
087.
0890

08113
0859
0875
0891

08 ....
0860
0876
0892

0845
0861
0877
0893

081+6
0862
0878
089.

08117
0863
0879
0895

38x
39x
3Ax
3ax

0896
0'12
0928
09 ..

0891
0913
0929
09115

0898
0"11
0930
09116

0899
0915
0931
09..,

0900
0916
0932
09..

0901
0917
0933
09119

0902
0918
09311
0950

0903
0919
0935
0951

0'0'
0'20
0'36
0'52

0905
0921
0931
0953

0906
0922
0938
09S'

0907
0923
0939
0955

0908
092"
09"0
0956

0909
0925
0941
0957

0910
0926
09112
0958

0911
0921
09113
0959

3ex
3Dx
3zx
3Px

0960
on6
0992
1008

0961
0977
0993
1009

0962
0"1
09"
1010

0963
0979
0995
1011

09611
0980
0996
1012

0965
0981
0997
1013

0966
0982
0991
10n

0967
0983
0999
1015

0"8
0'"
1000
1016

09"
0985
1001
1017

0970
0986
1002
1011

0911
0987
1003
1019

0972
0988
100"
1020

0973
0989
1005
1021

09711
0990
1006
1022

0975
0991
1007
1023

384

o

0

1

2

3

•

'Ox
41x
42x
43x

102'
10.0
1056
1012

1025
1Oil 1
1057
1013

1026
10112
1058
101.

1021
10U
1059
1075

1028
10. .
1060
1016

'"x
45x
46x
"x

1088
110..
1120
1136

1089
1105
1121
1137

1090
1106
1122
1138

1091
1101
1123
1139

1092
1108
112"
11.0

Ux

1153
1169
1185
1201

115.
1170

4.x

1152
1168
,,.11
1200

1202

1155
1171
1187
1203

4ex
laDx
4ax
'f'x

1216
1232
12la8
126..

1211
1233
12.,
1265

1218
123 ..
1250
1266

SOx
51x
52x
53x

1280
1296
1312
1328

1281
1291
1313
1329

5lax
55x
56x
'57x

13..
1360
1316
1392

58x

,,

5.x

,.08
,.2"
' .. 0
1U6

sex
5Dx
5. .
5rx

,.,3

x •

6

1

8

9

A

B

C

0

E

F

1031
10U
1063
1079

1032
10 ...
1oill
1080

1033
10.,
1065
1081

103.
1050
1066
1082

1035
1051
1067
1083

1036
1052
1068
10111

1037
1053
1069
10.,5

1038
10511
1070
10.,6

1039
1055
1071
1087

1096
1112
1128
114_

1097
1113
1129
lUS

1098
11 ".
1130
111lt

1099
1115
1131
11117

1100
1116
1132
11_8

1101
1117
1133
111lt

1102
1118
113 ..
1150

1103
1119
1135
1151

1161
1177
1193
1209

1162
1178
119"
1210

1163
1179
1195
1211

116 ..
1180
1196
1212

1165
1181
1191
1213

1166
1182
1198
12".

1167
1183
1199
1215

1029

1030

1061
1017

1062
1018

1093
1109
1125

10,.
1110
1126
11.2

1095
1111
1121

1156
1172
1188
120 ..

1151
1173
1189
1205

1158
117 ..
1190
1206

, .. 59
1175

,,,,

1201

1160
1176
1192
1208

1219
1235
1251
1267

1220
1236
1252
1268

1221
1237
1253
1269

1222
1238
125.
1210

1223
1239
1255
1211

12211
12110
1256
1212

1225
12111
1257
127.3

1226
12112
1258
121.

1227
1243
1259
1215

1228
12....
1260
1216

1229
12115
1261
1211

1230
12166
1262
1218

1231
12167
1263
1219

1282
1298
131 ..
1330

1283
1299
1315
1331

12'1300
1316
1332

1285
1301
1311
1333

1286
1302
1318
133.

1281
1303
1319
1335

1288
13011
1320
1336

1289
1305
1321
1337

1290
1306
1322
1338

1291
1301
1323
1339

1292
1308
132"
13 .. 0

1293
1309
1325
13.,

,29"
1310
1326
13112

1295
1311
1321
13163

13la5
1361
1311
1393

13116
1362
1378
1391a

13U
1363
1379
1395

131lS
1361a
1380
1396

13.,
1365
1381
1397

1350
1366
1382
1398

1351
1361
1383
1399

1352
1368
13811
1400

1353
1369
1385
1401

13511
1370
1386
1402

1355
1311
1387
llt03

1356
1372
1388
"0"

1351
1373
1389
11105

1358
137 ..
1390'
11106

1359
1375
1391
, .. 07

"09
,..25

,..,0
'''26
'''2
,.58

,.,1
11127
1l1li3
1U9

,.,2
,.28

,.,3
,..29
,..5
11161

11"5
"31
,.U
,.63

1416
11132
lU8
146 ..

,..,7

1UO
, ... 6
'''2

11133
1ft.,
'''5

,..18
1113 ..
,.50
,.66

,.19
, .. 35
,.51
11161

11120
, .. 36
1452
'''8

11121
1ft37
11653
1ft 69

'''22
11638
, .. 5..
,.70

'''23
, .. 39
'''55
, .. 71

1'72
1'18
1501a
1520

1505
1521

11.90
1506
1522

"" '''"

lla15

1507
1523

,.,6
,.92
1508
152'

,.,3
1509
1525

,.78
14"
1510
1526

1479
,.,5
1511
1521

lUO
,.,6
1512
1528

1U1
,.,7
1513
1529

1482
lU8
15111
1530

11183
,.,9
1515
1531

1UII
1500
1516
1532

1U5
1501
1517
1533

1U6
1502
1518
15311

1487
1503
1519
1535

60x
61x
62x
63x

1536
1552
1568
15811

1537
1553
1569
1585

1538
1.55 ..
1570
1586

1539
1555
1571
1587

15160
1556
1572
1588

15.. ,
1557
1513
1589

15112
1558
15711
1590

15.. 3
1559
1515
1591

15....
1560
1576
1592

15.. 5
1561
1517
1593

15166
1562
1578
159 ..

15.. 7
1563
1579
1595

1548
1564
1580
1596

1549
1565
1581
1597

1550
1566
1582
1598

1 ~~1
1561
1583
1599

611x
65x
66x
67x

1600
1616
1632
1648

1601
1617
1633
16119

1602
1618
1634
1650

1603
1619
1635
1651

1604
1620
1636
1652

1605
1621
1631
1653

1606
1622
1638
165 ..

1607
1623
1639
1655

1608
16211
16 .. 0
1656

1609
1625
16 .. ,
1657

1610
1626
1642
1658

1611
1627
16113
1659

1612
1628
1644
1660

1613
1629
1645
1661

1611l
1630
1646
1662

1615
1631
1647
1663

68x
69x
6Ax
6Bx

1664
1680
1696
1712

1665
1681
1697
1713

1666
1682
1698
171 ..

1661
1683
1699
1715

1668
168 ..
1700
1716

1669
1685
1701
1717

1670
1686
1702
1718

1671
1687
1703
1719

1612
1688
170..
1720

1673
1689
1705
1721

16116
1690
1706
1722

1675
1691
1707
1723

1616
1692
1708
1724

1671

1693
1709
1725

1678
1691l
1710
1126

1679
1695
1111
1127

6ex
60x
6Ex
6Fx

1728
17 .. 4
1760
1776

1129
17 .. 5
1761
1711

1730
17 .. 6
1762
1778

1731
1741
1763
1179

1732
111lS
17'"
1780

1733
1749
1765
1781

17311
1750
1766
1782

1735
1751
1767
1183

1736
1752
1768
178"

1737
1753
1769
1785

1738
175 ..
1770
1786

1739
1755
1171
1787

17.. 0
1756
1772
1788

11 .. ,
1151
1713
1789

1142
1758
11711
1790

1743
1759
1115
1791

70x
71x
72'x
73x

1792
1808
182"
1840

1793
1809
1825
18111

1794
1810
1826
18"2

1195
1811
1821
18113

179 6
1812
1828
184 ..

1797
1813
1829
18 .. 5

1798
18111
1830
18 .. 6

1799
1815
1831
1847

1800
1816
1832
1848

1801
1817
1833
18 .. 9

1802
1818
183 ..
1850

1803
1819
1835
1851

1804
1820
1836
1852

1805
1821
1837
1853

1806
1822
1838
1854

1807
1823
1839
Hl55

7"x
75x
76x
77x

1856
1812
1888
190 ..

1851
1873
1889
1905

1858
187 ..
1890
1906

1859
1815
1891
1907

1860
1876
1892
1908

1861
1877
1893
1909

1862
1878
18911
1910

1863
1879
1895
1911

18611
1880
1896
1912

1865
1881
1897
1913

1866
1882
1898
191 ..

1861
1883
1899
1915

1868
1881l
1900
1916

1869
1885
1901
1911

1870
18t16
1902
1918

1871
1887
1903
1919

78x
19x
7Bx

1920
1936
1952
1968

1921
1937
1953
1969

1t22
1938
195..
1970

1923
1939
1955
1971

19211
" .. 0
1956
1972

1925
19.. ,
1957
1913

1926
"'2
1958
197 ..

1927
" .. 3
"59
1975

1928
19 ....
1960
1916

1929
19.. 5
1961
1917

1930
19.. 6
1962
1918

1931
" .. 7
1963
1979

1932
19.. 8
1964
1980

1933
19 .. 9
1965
1981

1934
1950
1966
1982

1935
1951
1967
1983

7Cx
10x
7Ex
7Fx

198 ..
2000
2016
2032

1985
2001
2011
2033

1986
2002
2018
203"

1981
2003
2019
2035

1988
20011
2020
2036

1989
2005
2021
2037

1990
2006
2022
2038

199T
2007
2023
2039

1992
2008
2024
20 .. 0

1993
2009
2025
2041

199"
2010
2026
20.. 2

1995
2011
2027
20"3

1996
2012
2028
20....

1997
2013
2029
20 .. 5

1998
2014
2030
2046

1999
2015
2031
20167

"X
IlAx

5"
SAx

o

5

lAx

..

,.51

1186

,."

,.....

'''0

lOllS

".,

,."

lOU

,..,.

11 III

'0
Appendix II: Hexadecimal-Decimal Conversion Table

385~

4

1

2

3

9

A

B

C

lOx
81x
82x
83x

2048
2064
2080
2096

20119
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
20711
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
88x

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
SEx
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
2331
2353

2306
2322
2338
2354

2307
2323
2339
2355

2308
2324
2340
2356

2309
2325
2341
2351

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
23 .. 9
2365

2318
2334
2350
2366

2319
2335
2351
2361

9"x
95x
96x
97x

2368
2384
2400
2416

2369
2385
2et01
2417

2370
2386
2et02
2418

2311
2387
2"03
2419

2312
2388
2et04
2420

2373
2389
2405
2421

2314
2390
2406
2422

2315
2391
2407
2423

2316
2392
2.. 08
2424

2377
2393
2409
2425

2378
2394
2410
2426

2379
2395
2411
2427

2380
2396
2et12
2428

2381
2397
2413
2429

2382
2398
2414
2430

2383
2399
2415
2431

98x
99x
9Ax
9Bx

21t32
2 .... 8
2"'''
2480

21t33
24'"
21ti5
2et81

2434
2"50
2.. 66
2482

2435
2451
2461
2483

21136
2452
2468
2"8"

2437
2453
2469
2485

2438
2454
2410
2486

2439
2.. 55
2471
2481

2440
2456
21672
2488

2441
2et57
2473
2489

2442
2458
247et
2.. 90

2443
2459
2et75
2491

2444
2460
2.. 76
2492

2.. 45
2461
2477
2493

2446
2462
2et78
2494

2 .. 47
2463
2.. 19
2.. 95

9Cx
90x
91x
9Fx

2U6
2512
2528
25 ....

2497
2513
2529
25"5

2"98
2514
2530
25'"

21199
2515
2531
25ct1

2500
2516
2532
2548

2501
2517
2533
25,.,

2502
2518
253"
2550

2503
2519
2535
2551

250et
2520
2536
2552

2505
2521
2537
2553

2506
2522
2538
2554

2501
2523
2539
2555

2508
252 ..
25etO
2556

2509
2525
25 .. ,
2557

2510
2526
25"2
2558

2511
2521
25"3
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
2623

A4x
A5x
A6x
A7x

262"
2640
2656
2672

2625
2641
2657
2673

2626
2642
2658
267 ..

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
26R4

2637
2653
2669
2685

2638
2654
2670
2686

2639
2655
2b71
2687

A8x
A9x
AAx
ASx

2688
2704
2720
2736

2689
2705
2721
2737

2690
2706
2722
2738

2691
2707
2723
2739

2692
2708
272et
2740

2693
2709
2725
2741

2694
2710
2726
2742

2695
2711
2727
2743

2696
2712
2728
2744

2697
2713
2729
27 .. 5

2698
271 ..
2730
2746

2699
2715
2731
2747

2700
2716
2732
2748

2701
2717
2733
2749

2702
2718
273 ..
2750

2703
2719
2735
2751

ACx
ADx
AEx
AFx

2752
2768
2784
2800

2753
2769
2785
2801

2754
2770
2786
2802

2755
2711
2787
2803

2756
2772
2788
2804

2757
2773
2789
-2805

2758
2774
2790
2806

2759
2775
2191
2807

2760
2776
2792
2808

2761
2777
2793
2809

2762
2778
2794
2810

2763
2779
2795
2811

276 1'
2780
2796
2812

"765
2781
2797
2813

2766
2782
2798
2814

2767
2783
2799
2815

80x
Blx
82x
83x

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

28~4

2840
2856
2872

2825
2841
2857
2873

2826
2842
2858
2814

2827
2843
2859
2875

2828
2844
2860
2876

2829
2845
2861
2877

2830
2846
2862
2878

2831
2847
2863
2&79

84x
85x
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
29'36

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

88x
B9x
SAx
B8x

29.4
2960
2976
2992

2945
2961
2977
2993

2946
2962
2918
29"94

2947
2963
2979
2995

29",
2964
2980
2996

29'"
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
2912
2988
3004

2957
2973
2989
3005

2958
29711
2990
3006

2959
2975
2991
3007

8Cx
8Dx
BEx
8Fx

3008
3024
3040
3056

3009
3025
30111
3057

3010
3026
30112
3058

3011
3027
30U
3059

3012
3028
3044
3060

3013
3029
30"5
3061

3014
3030
3046
3062

3015
3016
3031 • 3032
3047
3048
3063
306.

3017
3033
3049
3065

3018
303et
3050
3066

3019
3035
3051
3067

3020
3036
3052
3068

3021
3037
3053
3069

302~

3038
3054
3070

3023
3039
3055
3071

x •

i)

5

6

7

I

,

0

E

F

C}j
-~

\',

386

\

x ...

o

0

1

2

3

II

5

6

7

8

9

A

8

C

D

E

F

COx
Clx
C2x
C3x

3072
3088
31011
3120

3073
3089
3105
3121

30711
3090
3106
3122

3075
3091
3107
3123

3076
3092
3108
31211

J077
3093
3109
3125

3078
30911
3110
3126

3079
3095
3111
3127

3080

3081
3097
3113
3129

3082
3098
31111
3130

3083
3099
3115
3131

3084
3100
3116
3132

,)110;)

3112
3128

3101
3117
3133

J086
3102
3118
31311

3087
3103
3119
3135

Cllx
C5x
C6x
C7x

3136
'U52
3168
31811

3137
3153
3169
3185

3138
31511
3170
3186

3139
3155
3171
3187

31160
3156
3172
3188

31161
3157
3173
3189

31112
3158
3174
3190

31113
3159
3175
3191

311111
3160
3176
3192

31115
3161
3177
3193

31116
3162
3178
31911

31117
3163
3179
3195

3148
31611
3180
3196

31119
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
32311
3250

3203
3219
3235
3251

32011
3220
3236
3252

3205
3221
3237
3253

3206

3238
32511

3207
3223
3239
3255

3208
32211
3240
3256

3209
3225
32111
3257

3210
3226
32112
3258

3211
3227
3243
3259

3212
3228
32411
3260

3213
3229
3245
3261

32111
3230
32116
3262

3215
3231
3247
3263

CCx
CDx
CEx
CFx

32611
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
3320

3213
3289
3305
3321

32711
3290
3306
3322

3275
3291
3307
3323

3276
3292
3308
33211

3277
3293
3309
3325

3278
3294
3310
3326

3279
3295
3311
3327

DOx
Dlx
D2x
D3x

332 8
3344
3360
3376

3329
3345
3361
3377

3330
33116
3362
3378

3331
3347
3363
3379

3332
33118
33611
3380

3333
33119
3365
3381

33311
3350
3366
3382

3335
3351
3367
3383

3336
3352
3368
33811

3337
3353
3369
3385

3338
33511
3370
3386

3339
3355
3371
3387

3340
3356
3372
3388

3341
3357
3373
3389

33112
3358
3374
3390

33113
3359
3375
3391

Dllx
D5x
D6x
D7x

3392
3408
34110

3393
31109
31125
31141

33911
31110
31126
311112

3395
31111
3427
311113

3396
31112
31128
3111111

3397
31113
3U9
3U5

3398
3111 It
31130
316116

3399
3lt15
3lt31
316167

31600
3lt16
31132
3U8

31101
31117
31133
311qg

31102
31118
311311
31150

31603
3lt19
31135
31651

31104
3420
31t36
31652

3405
31t21
3437
31153

31106
31122
31138
311511

31107
31123
31139
3455

D8x
D9x
DAx
DBx

3456
31672
31188
35011

31157
3413
3489
3505

31158
3474
31190
3506

31159
31675
3491
3507

3lt60
3lt76
3492
3508

31161
3477
31193
3509

3462
3.78
311911
3510

31163
3lt79
31195
3511

3lt611
31680
31196
3512

31165
31181
31t97
3513

31t66
31182
31198
35111

3U7
31t83
31199
3515

31t68
31184
3500
3516

3469
3485
3501
3517

3470
31186
3502
3518

3471
31187
3503
3519

DCx
DDx
DEx
DFx

3520
3536
3552
3568

3521
3537
3553
3569

3522
3538
3554
3570

3523
3539
3555
3571

35211
35110
3556
3572

3525
35.,
3557
3573

3526
35112
3558
35711

3527
35113
3559
3575

3528
351111
3560
3576

3529
35115
3561
3577

3530
35U
3562
3578

3531
351t1
3563
3579

3532
35118
35611
3580

3533
35qg
3565
3581

35311
3550
3566
35112

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
36211
36110

3593
3609
3625
3641

35911
3610
3626
36112

3595
3611
3627
36113

3596
3612
3628
361111

3597
3613
3629
3645

3598
3614
3630
3646

3599
3615
3631
3647

Ellx
E5x
E6x
E7x

36118
36611
3680
3696

36119
3665
3681
3697

3650
3666
3682
3698

31)51
3667
3683
3699

3652
3668
36811
3700

3653
3669
3685
3701

36511
3670
3686
3702

3655
3671
3687
3703

3656
3672
3688
3704

3657
3673
3689
3705

3658
36711
3690
3706

3659
3675
3691
3707

3660
3676
3692
3708

3661
3677
3693
370Q

3662
3678
3694
1710

3663
3679
3695
3711

18x
19x
EAx
IBx

3712
3728
37114
3760

3713
3729
3745
3761

37111
3730
3746
3762

3715
3731
37117
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
3171

3724
37110
3756
3772

3725
3741
3757
3773

31:."
3742
3758
37711

3727
3743
3759
3775

ECx
EDx
Elx
EFx

3776
3792
3808
3824

3777
3793
3809
3825

3778
37911
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

3191
3b07
3823
3b39

FOx
F1x
F2x
F3x

38110
3856
3872
3888

38111
3857
3873
3889

3842
3858
3874
3890

38113
3859
3815
3891

3844
3860
3876
3892

3845
3861
3877
3893

3846
3862
3878
38911

38117
3863
3879
3895

3848
3864
3880
3896

3849
3865
3881
3697

3850
3866
3882
3898

3851
3861
3883
3899

3852
3868
3884
3900

3853
3869
3885
3901

3854
3870
38116
3902

3855
3b11
3li87
3903

Fllx
r5x
F6x
F7x

3904
3920
3936
3952

3905
3921
3937
3953

3906
3922
3938
3951t

3907
3923
3939
3955

3908
3924
3940
3956

3909
3925
3941
3957

3910
3926
3942
3958

39"
n27
3943
3959

3912
3928
39411
3960

3913
3929
39115
3961

39111
3930
3946
3962

3915
3931
39117
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
1t00l
4017

3970
3986
4002
11018

3971
3987
1t003
4019

3972
3988
40011
4020

3973
3989
11005
4021

3974
3990
11006
11022

3975
3991
11007
'023

3976
3992
4008
110211

3977
3993
16009
11025

3978
3994
11010
11026

3979
3995
11011
11027

3980
3996
4012
4028

3981
3997
11013
11029

39b2
3998
40111
11030

3983
3999
4015
4031

FCx
FDx
FEx
Frx

11032
11048
11064
4080

4033
11049
'065
4081

40311
4050
4066
11082

4035
11051
11067
4083

4036
11052
4068
4084

1t037
4053
1t069
4085

11038
11054
11070
11086

11039
11055
11071
4087

4040
11056
It 072
11088

110111
11057
/f073
/f089

11042
4058
4074
11090

11043
'059
11075
11091

40411
'060
4076
11092

4045
4061
11077
11093

4046
4062
4078
4094

4047
4063
4079
4095

311~1I

3222~

3096

33~1I

o
Appendix II: Hexadecimal-Decimal Conversion Table

387

o
This page left blank intentionally.

o

b

Appendix III: Machine Instruction Format

BASIC MACHINE FORMAT

4
8
Operation
Rl
Code

ASSEMBLER OPERAND
FIELD FORMAT

Rl,R2

4

APPLICABLE INSTRUCTIONS

All RR inst"ructions
except BCR,SPM,
and SVC

#

R2

RR
4
8
Operation
Ml
Code

4

RX

BCR

Rl

SPM

I
(See Notes 1,6,8,
and 9)

SVC

R2

4
8
Operation
Rl
Code

8
Operation
Code

Ml,R2

8
I

4

4

12

Rl,D2(X2,B2)

X2

B2

02

Rl,S2(X2)
Rl,S2

All RX instructions
except BC

4

4

12

X2

B2

02

Ml,D2(X2,B2)
Ml,D2 (,B2)
Ml,S2(X2)
Ml,S2
(See Notes 1,6,8,
and 9)

BC

4

4

12

R3

B2

D2

Rl,R3,D2(B2)
Rl,R3',S2

BXH,BXLE,CDS,CS,LM,SIGP,
STM,LCTL,STCTL

4
8
Operation
Rl
Code

4

4

12
02

Rl,D2(B2)
Rl,S2

All shift instructions

B2

4
8
Operation
Rl
Code

4

4

12

ICM, STCM,CLM

M3

B2

02

Rl,M3,D2(B2)
Rl,M3,S2
(See Notes 1-3,7,
8,and 9)

4
8
Operation
Code
Rl

4
8
Operation
Code
Ml

4
8
Operation
Rl
Code

Rl,D~(,B2)

RS

Appendix III: Machine Instruction Format

389

BASIC MACHINE FORMAT

8
8
Operation
Code
12

4

B1

01

8
Operation
Code

4

12

B1

ASSEMBLER OPERAND
FIELD FORMAT

APPLICABLE INSTRUCTIONS

D1(B1J,I2
Sl,I2

All SI instructions except
those listed for the other
SI format.

12

SI

S

16
Two-byte
Operation
Code

8
4 4 4
Operation
Ll L2 B1
Code

LPSW,SSM,TIO,TCH,TS

01

01(B1)
Sl
(See Notes 2,3,6,
7,8 and 10)

4

12

01(B1)
Sl

B1

01

SCK,STCK,STIDP,SIOF,STIDC,
SIO,HIO,HOV
SCKC,STCKC,SPT,STPT,PTLB,
RRB
CLRIO,IPK,SPKA,SPX,STAP,
STPX

12

4

(See Notes 2,
3, and 7)
12

01 B2 02

01(L1,Bl) ,D2(L2,B2)
Sl(Ll),S2(L2)

PACK,UNPK,MVO,AP,
CP,DP,MP,SP,ZAP

D1(L,Bl),02(B2)

NC,OC,XC,CLC,MVC,MVN,
MVZ,TR,TRT,ED,EOMK

SS
8
Operation
Code

8

4

L

B1 01

12

4 4 4 12
8
Operation
Code
Ll 13 Bl 01

12

4

Sl(L),S2

B2 D2

4

12

B2 02

01(Ll,B1),02(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.

01 and 02 are absolute expressions that specify displacements.
may be specified.

3.

B1 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, L1, and L2 are absolute expressions that specify field lengths. An L expression
16 •
can specify a value of 1 - 256. Ll and L2 expressions can specify a value of 1
In all cases, the assembled value will be one less than the specified value.

6.

I, 12, and 13 are absolute expressions that prov1de immediate data.
and 12 may be 0 - 255. The value of 13 may be 0 - 9.

7.

Sl and S2 are absolute or re10catable expressions that specify an address.

8.

RR, 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 specify 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, HOV 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

o

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

o

o
391-406

o

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 colwnn 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 derived.

o

Operand Format: This column shows the symbolic format of the operand field in both
explicit and implicit form. For both forms, R1, 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 sho1ll.'D with a 0 replacing X2. L, L1, and L2 indicate
lengths for either operand, operand one, or operand two respectively. M1 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 12) or four bits long ~3).
FOr the explicit format, D1 and D2 indicate a displacement and B1 and B2 indicate a base
register for operands one and two.
FOr the implicit format, D1, B1, and D2, B2 are replaced by S1, 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 in a 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: D - 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.)

o
Appendix IV: Machine Instruction Mnemonic Operation Codes

391

Instruction

Machine
Operation
Code

Operand Format
Implicit

Explicit

RI, S2(X2) or RI, S2

36
6A
2A
7A
3A

RI, 02(X2, B2) ar RI, 02(, B2)
RI,R2
01 (Ll, BI), 02(L2,B2)
RI, 02(X2, B2)or R1,02(, B2)
RI, 02(X2, B2)or R1,02(, B2)
RI,R2
RI,R2
RI, 02(X2, B2)or R1,02(, B2)
RI,R2
RI, 02(X2, B2)or R1,02(, B2)
RI,R2

AW
AWR
AU
AUR

6E
2E
7E
3E

RI, 02(X2, B2)or R1,02(, B2)
RI,R2
RI, 02(X2, B2)or R1,02(, B2)
RI,R2

RI, S2(X2)or RI, S2

N
NC
NR
NI

54
D4
14
94

RI, 02(X2, B2)or RI, 02(, B2)
01 (L, BI), 02(B2)
RI,R2
01(BI),12

BAl
BAlR
BAS
BASR

45
05
40
CD

RI,02(X2,B2)or RI,02(,B2)
RI,R2
RI,02(X2,B2)or RI,02(,B2)
RI,R2

RI,S2(X2)or RI,S2

BC
BCR
BCT
BCTR
BE
BER

47
07
46
06
47(8C 8)
07(8CR 8)

MI,02(X2, B2)or MI ,02(, B2)
MI,R2
RI,02(X2,B2)or RI,02(,B2)
RI,R2
02(X2, B2) or 02(, B2)
R2

MI,S2(X2)or MI,S2

BH
BHR
BXH
BXLE
BL
BLR
BM
BMR

47(8C 2)
07(BCR 2)
86
87
47(BC 4)
07(8CR 4)
47(8C 4)
07(8CR 4)

02(X2, B2) or 02(, B2)
R2
RI, R3, 02(82)
RI, R3, 02(82)
02(X2, B2) or 02(, B2)
R2
02(X2, B2) or 02(, B2)
R2

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

BM
BMR
BNE
BNER
BNH
BNHR
BNL
BNlR
BNM
BNMR
BNM
BNMR

47(8C 4)
07(8CR 4)
47(BC 7)
07(BCR 7)
47(8C 13)
07(BCR 13)
47(BC 11)
07(8CR 11)
47(BC 111
07(BCR 11)
47(8C II)
07(8CR 11)

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 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 on Not 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(8C 14)
07(BCR 14)
47(BC 141
07(BCR 141
47(8C 13)
07(BCR 13)
47(BC 7)
07(BCR 7)
47(BC 7)
07(BCR 7)
47(8C 1)
07(BCR I)
47(8C I)
07(8CR 1)

02(X2, B2) or 02(, B2)
R2
02(X2,B21 or 02(,B2)
R2
02(X2,B2)or 02(,B2)
R2
02(X2,B21 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

02(X2, B2) or 02(, B2)
47(8C 2)
R2
07(8CR 2)
02(X2, B2) or 02(, B2)
47(BC 8)
R2
07(8CR 8)
02(X2, B2) or 02(,B2)
47(BC 8)
R2
07(BCR 8)
02(X2,B2)or 02(,B2)
47(BC 15)
07(BCR 15) R2

Add
Add
Add Decimal
Add Ha Ifword
Add Logical
-Add logicol
Add Normalized, Extended
Add Normal ized, Long
Add Normalized, Long
Add Normalized, Short
Add Normalized, Short

A
AR
AP
AH
AL
ALR
AXR
AO
ADR
AE
AER

5A
IA
FA
4A
5E
IE

Add
Add
Add
Add

Unnormalized,Long
Unnormalized, long
Unnormalized,Short
Unnormalized, Shart

And
And
And
And

Logical
Logical
Logical
Logical Immediate

Branch and
Branch and
Branch and
Branch and

link
link
Save
Save

Branch
Branch
Branch
Branch
Branch
Branch

on
on
on
on
on
on

Condition
Condition
Count
Count
Equal
Eq ual

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

on High
on High
on IndeX High
on Index Low or Equal
on Low
on Low
if Mixed
if Mixed

on Plus
on Plus
if Zeros
if Zeros
on Zera
on Zera
Unconditional
Unconditional

Clear I/O
Clear Stiw. ~~.
Compare Algebraic
Compare Algebraic
Compare and Swap
Compore Decimal
Compare Double and Swap
Compare Halfword
Compare Logical
Compare Logical

392

Mnemonic
Operation
Code

SI(Ll),S2(L2)or SI,S2
RI, S2(X2)or RI, S2
RI, S2(X2)or RI, S2

RI,S2(X2)or RI,S2
RI, S2(X2)or RI, S2

RI,S2(X2)or RI,S2
RI,S2(X2)or RI,S2
SI(L),S2 or SI,S2
SI,I2

Rl,S2(X2)or RI,S2

RI,S2(X2)or RI,52
S2(X2) or 52
S2(X2) or S2
RI,R3,52
RI,R3,S2
S2(X2) or S2
S2(X2) or 52
S2(X2) or 52
52(X2) or 52
S2(X2) or S2
S2(X2) or 52
52(X21 or 52
52(X2) or 52
S2(X2) or S2
52(X2) or 52
S2(X2) or S2
52(X2) or 52
S2(X2) or S2
52(X2) or S2
S2(X2) or S2
52(X2) or 52

,

52(X2) or S2
S2(X2) or S2
S2(X2) or S2

CLRIO

9001

02(B2)

C
CR
C5
CP
CDS
CH
CL

59
19
SA
F9
BB
49
55

RI, 02(X2, B2)or RI, 02(, B2)
RI,R2
Rl, R3, 02, (B2)
01 (L I, BI), 02(L2, 82)
RI, R3, 02(B2)
RI, 02(X2, B2)or R1,02(,82)
RI, 02(X2, B2)or RI, 02(,B2)

Rl,R3,S2
S1(Ll),S2(L2)or SI,S2
Rl,R3, S2
RI,S2(X2)or RI,S2
RI,S2(X2)or RI,S2

CLC

05

01 (L, BI), 02(B2)

51(L),S2 or 51,S2

CUQtl·'

BiJS

02{"2}~ "~>.

,.•, · i <

~. ,. ....... ..'j;;':,}»)'"

.

RI,S2(X2 or RI,S2

Type of
Instruction

Instruction

Instruction
Add
Add
Add
Add
Add
Add

I.~·.~

o

A S

lad

Decimal
Halfword
Logical
Logical

RX
RR
SS,Decimol
RX
RX
RR

x x F
F
x
o
x x F
x x

Add
Add
Add
Add
Add

Normalized, Extended
Normalized, Long
Normol ized, Long
Normalized, Short
Normolized, 910rt

RR,Floating Pt.
RX,Floating Pt.
RR,Floating Pt.
RX, Floating Pt.
RR, Floating Pt.

x
x x
x
x x

Add
Add
Add
Add

Unnormalized, Long
Unnarmalized, Long
Unnormalized, Short
Unnormalized,Short

RX, Floating Pt.
RR, Floating Pt.
RX,Floating Pt.
RR, Floating PI.

x x
x
x x
x

And
And
And
And

Logical
Logical
Logical
Logical Immediate

RX
SS
RR
SI

x x
x

x

x

x

Branch and
Branch and
Branch and
Branch and

c)

Progrcm Interruption
Possible

Link
Link
Save
Save

~

E
E
E
E
x E
E

E
E
E

RX
RR
RX
RR

Op

x

Condition Code Set

Othe

00

10

11

5um~0(8)

Sum < 0
Sum < 0
SumO
Sum >0
Sum>O
Sum >0
Sum= 0(D
Sum= oCD

Overflow
Overflow
Overflow
Overflow
Sum 0
Sum 0

SiJm=O
Sum=O
Dote Sum=O
Sum=O
Sum=O@

01

CD
CD

x
x
x
x
x

B,C
B,C
B,C
B,C
B,C

R
R
R
R
R

L
L
L
L
L

M
M
M
M
M

x
x
x
x

C
C
C
C

R
R
R
R

L
L
L
L

M
M
M
M

J
J
J
J

K
K
K
K

N
N
N
N

N
N
N
N

N
N
N
N

N
N
N
N

x
x

Branch
Branch
Branch
Branch
Branch
Branch

or.
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, Ext.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

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

on Minus
on 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

RX, Ext .Mnemonic
RR, Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext .Mnemonic
RX, Ext.Mnemonic
RR, Ext .Mnemon ic
RX, Ext.Mnemonic
RR, Ext .Mnemonic
RX,Ext.MnemoniC
RR,Ext.Mnemonic
RX, Ext.Mnemonic
RR, Ext .Mnemon ic

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

Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch
Branch

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

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

N
N
N
N

N
N
N
N

N
N
N
N
N
N
N

N
N
N
N

Condition
Condition
Count
Count
Equal
Equal

Ext.Mnemonic
RR, Ext . Mnemonic
RX, Ext.Mnemonic
RR. Ext .Mnemonic
RX, Ext. Mnemonic
RR, Ext .Mnemonic
RX, Ext .Mnemonic
RR, Ext .Mnemonic

Clear~

S

Compare Logi col

N
N
N
N
N

N
N

~,

Branch on Plus
Branch on Plus
Branch if Zeros
Branch if Zeros
Branch on Zera
Branch on Zera
Branch Unconditional
Branch Unconditional

Clear
Qge Poge
Compare Algebraic
Compare Algebraic
Compare and Swap
Compare Decimal
Compare Double and Swap
Compare Ha Ifword
Compare Logical

N
N
N

S

N
N
N
N

~
jK

RX
RR
RS
SS,Decimal
RS
RX
RX
SS

N
N
N

Ix

x

Ix

x
x
x x
x x
x x
x x

IX
IK
x

x
x
x

A
iAAx
A,G8
Z
Z
Z
Dota Z
Z
Z

N
N

N
N
N
N
N
N
N
N

CC

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

EE

KK

N

N
N
N
N
N
N
N
N
,

N

AA'
AA
AAW
AA
AAW

BB
B8

AA

BB

Z

AA

88
BB

Z

AA

BB

Appendix IV: Machine Instruction Mnemonic Operation Codes

393

~\

Operand Format

1Ntruction

:\L~;/

Implicit
Compare Logical

100IJ\IeE

Compare Logical Characters
under W.ask
Compare Logical Immediate
Compare Logical Long
Compare, Long
Compare, Long
Compare, Short
,Short

,.

RI,M3,S2
CLI
CLCL
CO
CDR
CE
CER

CD:
CV8
CVD

I::

Pot!t

raoei

Divide
Divide Decimal
Divide, Long
Divide, Long
Divide, Short
Divide, Short
Edit
Edit and Marie
Exclusive Or
Exclusive Or
Exclusive Or
Exclusive Or Immediate
Execute
Halve, Long
Ha Ive, 5hort
Halt Device
Halt I/O

100fUV$I

I,OOSM8

1-

394

tn"rf~

J , 02(X2, 82)or R1,02(,82)
1,P,2
J, 02(X2, 82)or RI, 02(, 82)
I,R2

4F
4E

1, 02(X2, 82)or R1, 02(,82)
I , 02(X2, 82)or RI, 02(,82)

•

02(821'

RI,S2(X2)or RI,S2
RI,S2(X2)or RI,S2

:i'

DIP

Pet';

0
DR
OP
DO
OOR
DE
OER
ED
EOMK
X
XC
XR
XI
EX
HOR
HER
HOV

,R2
I, (L 1,81), D2(L2, 82)
I, D2(X2, 82), or RI, 02(,82)
I,R2
I, 02(X2, 82)or R1,02(,82)
I,R2
1(L, 81),02(82)
(L,81),02(82)
, D2(X2, 82) or RI, 02(,82)
(L, 81),02(82)
,R2
1(81),12
I, D2()(2, 82) or RI, 02(,82)
I,R2
I,R2
,81
(81)

HIO

'PI:

Insert Character
Insert Characten under Mask
Insert PSW Key
Insert Storage Key
Load
Load
Load Address
Load and Test
Load and Test, Long
Load and Test, Short

IC
ICM
IPK
ISK
L
LR
LA
LTR
LTDR
LTER

Load Complement
Load Complement, Long
Load Complement, 5hort
Load Control

LCR
LCDR
LCER
LCTL

LOQdFi'OftMIl~

SI,12

95
OF
69
29
79
39

1St'

Load Ha Ifword
Load, Long
Load, Long
Load Multiple
Load Negative
Load Negative, Long
Load Negative, Short

LH
LO
LOR
LM
LNR
LNOR
LNER

Load Positive
Load Positive, Long
Load Positive, Short
Load P~
Loacl It... 'A.dcfmt
Load Rounded, Extended
to Long
Load Rounded, Long to Short
Load, Short
Load, Short

LPR
LPDR
LPER
LPSW

I.M

LRDR
LRER

SI(LI), 52(L2)or SI, S2
RI,S2(X2)
or RI,S2
RI,S2(X2)

or RI,S2

5l(L), S2
51(L),52
RI, S2(X2)
51(L),52

or 51,52
or 51,52
or RI,52
or SI,S2

51,12
RI,S2(X2)

RI,52

SI

I See Note I at end af
this appendix

fUtSl<
43
8F
820B
09
58
18
41
12
22
32

RI,S2(X2)
RI,M3, S2
I,R2
I, D2(X2, 82) or RI, 02(,82)
I,R2
I, 02(X2, 82) ar RI, 02(,82)
I,R2
,R2
I,R2

RI,S2(X2)

or RI,52

RI,S2(X2)

or RI,52

R1,S2(X2)

or RI,52
or RI,52

I,R2
I,R2
I,R2
I

R3, 02{~~)

;02."

I, 02(X2, 82) or RI, 02(,82)
I, D2(X2, 82) or RI, 02(,82)
RI,R2
RI ,R3, 02(82)
Rl,R2
RI,R2
I,R2

RI,R3,S2

0

RR
RS

Program Interruptions
I
Op Other
5
x
x
x x

51
RR

x
x x

Type of
Instruction

Instruction
Compare Logical
Compore Logical Characters
under Mask
Compare Logical Immediote
Compore Logical Long
Compare, Long
Compare, Long
Compare, Short
Compare, Short

I'~

fC:~~

tr=::

I\D061/VUOftty

/0

Convert to Binary
Convert to Decimal
i)tt,Otifltute .•, .
.t>tICOl'lM~

......

~:

15

.....

;~~Q¢.
.~.~

x x
x
)(
x
x
x )( E
x E
)(
x E
)(
E
x
x
x )(
)(

x
x:
)(

x
x

x

G

x
x
x

)(

x
A
A

x

Load Complement
Laod Complement, Long
Load Complement, 910rt
Load Control

RR
RR, Floating Pt.
RR, Floating Pt.
RS

as

RX
RX, Floating Pt.
RR, Flooting Pt.
RS
RR
RR, Floating Pt.
RR, Flaoting Pt.

x

x
x

)(

x

A
A

x
x

F
x
x

x

)(

)(

)(

x
x

RR
RR, Flooting Pt.
RR, Floati ng Pt.
SI

x

AA

XX

yy

ZZ

Z

AA

BB

Z

AA

BB

Z
Z
Z
Z
M(""

AA
AA
AA
AA

8B

'XJi:. • ···'

N
N

N

N
N
N

N
N
N

N

N

AM" .

N

N

N

N

N

N

N

N

N

N

N
N
N
N

N

N
N
T
U
S
S
T
U
K
J
K
J
K
J
J
K
(Moy be set by this instruction)
N
N
N
N
N
N
AAM
CC
AAL
DO
CC
GG

SS

N

N

N

N
N
N
J
R
R

N
N
N

N
N
N
M
M
M

A

I(

A

N

At,

L
L
L

JiGtt

N

N

N

N
N
N

N
N
N

x

x
x

R
R

x

x
x

J
R
R
QQ

L
L
QQ

lAi.sQG'
rA,O(:

:?~~~.~~.~

x

M
N

MO

N
N
J

A
A

M
M

L
L
L
N

L
L
L

)(

x

TT

P
R
R

x
x
x

x
x

'~ \;:M~~.

SI

Z

N
N
N

N
N
KK

'A

x x

.!~;JIi!i:'~""' •.'."'. . :.•. ;l!.;•. \'~i.·\.·,
"toacf'RouMed, Extended u"" RR, Floating Pt.
to Long
Load Rounded, Long to Short
Load, snort
Load, Short

Move Choracters
Move Immediate

It

F
F
D,Oota
B,E
a,E
B,E
a,E
Dato
Data

)(

x
)(

~

~,Ge;

Ooto, F

Condition Code Set
01
10

)(

RX
RR
RX
RR
RR, Floating Pt.
RR, Flooting Pt.

Positive
Positive, Long
Positive, Short
PSN

)(

x

Load
Load
Load Address
Load ond Test
Load and Test, Long
Load ond Test, Short

Load
Load
Load
Load

)(

~,

RX
Insert Character
Insert ChoNcters under Mask RS
Insert PSWKey
S
RR
Insert Storage Key

Load Holfword
Load, long
Load, long
Load Multiple
Load Negative
Laod Negotive, Long,
Load Negative, Short

x
x
x

'}:
.)

RX
RR
55, Decimol
RX,Flaoting Pt.
RR, Floating Pt.
RX,Flaoting Pt.
RR, Floating Pt.
SS, Decimol
SS, Decimal
RX
SS
RR
SI
RX
RR, Flooting Pt.
RR, Flooting Pt.
S
S

I. . . . ;..... ·~. lnUx

I

RX,Floating Pt. x x
RR,Floating Pt. x x
RX, Floating Pt. x )(
x
RR,Floating Pt.
....;.,<:;
.•
15
RX
RX
,;$
S

Divide
Divide
Divide Decimol
Divide, Long
Divide, Long
Divide, Short
Divide, Short
Edit
Edit ond Mork
Exclusive Or
Exclusive Or
Exclusive Or
Exclusive Or Immediate
Execute
Halve, Long
Holve, Short
Halt Device
Holt I/O

. ..,.;t.

x

00

MV

'l.MV~,',~

N

N

N
N
N

N

i~.<

'.8K
N
N

N
N
N
N

0

...
N

N

N

N
N
N

M

0

M
M
QQ
.jNMP ,

QQ

""""0

N

N

N

N

N

N

'MJ
'-AJl
N
N

.-

Appendix IV: Machine Instruction Mnemonic Operation Codes

395

Instruction

MVCl
MVN
MVO

Of
01
F:

Move Zones
Multiply
MUltiply
Multiply Oecimol
Multiply Extended
Multiply Halfword

MVZ
M
MR
MP
MXR
MH

03
5C
lC
FC
26

Multiply, Long
Multiply, Long
Multipl>j Long to
Extende
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

2C
67

RI,02(X2,82)or Rl, 02(, 82)
Rl,R2
Rl,02(X2,82)or Rl,02(,82)

MXOR

27

Rl,R2

OO8IVSE

0,.,

8uf er

Translation Looka.lde

Read Drrect

Reset Reference 8it

R.trl~e

:s.t PqOtl

StatU. Ciltd Po,,Btt.

Set Clock
Set Clock Comparator
Set CPU Timer
Set PreAx
Set Program Mask
Set PSW Key from Acldre..
Set Storage Key
Set System Mask
Shift and Round Decimal
Shift Left Double Algebraic
Sh ift Left Double Logical
Shift Left Single Algebraic
Shift Left Single Lazical
Shift Right Double Igebraic
Shift Right Double Logical
Shift Right Single Algebraic
Shift Right Single logical
Signal ProcellOf'
Start I/O
Start I/O Fast Release
Store

S~

copocrty c~..,

Store Channel 10
Store Character

396

ME
MER
NOP
NOPR
0
OC
OR
01
PACK

4C
6C

7C
3C
47(8C 0)
07(8C 0)
56
D6
16
96
F2

Implicit

P.l,R2

o1(l, 81), 02(82)

Sl(l), S2
or S1S2
S1(LJ),S2(L2} or 51,S2

01 (L,81 ),02(82)
RI,02(X2,82}or Rl,02(,82)
Rl,R2
01 (L I, 81), 02(L2, 82)
Rl,R2
Rl,02(X2, 82) or Rl, 02(,82)

S1(L), S2
or SI,S2
Rl,S2(X2) or Rl,S2

01(11, 81), 02(L2, 82)

RI,02(X2,82)or Rl,D2(,82)
Rl,R2
D2(X2,82) or 02(,82)
R2
Rl, D2(X2, 82~or Rl, D2(, 82)
Dl(L,81),D2 2)
Rl,R2

Dl~1),12

DI Ll,81},D2(L2,82)

Sl(LI),S2(L2) or SI,S2
Rl,S2(X2) or Rl,S2
Rl,S2(X2) or Rl,S2
Rl,S2(X2) or Rl,S2

Rl,S2(X2) or Rl,S2
S2(X2)

SI,12
S1(Ll),S2(L2) or SI,S2

PTL8

820D

-

-

85
8213

01(81~,'2

51,12

S,.
SCK
SCKC
SPT
SPX
SPM
SPKA
SSK
SSM
SRP
SLOA
SLOL
SLA
SLL
SROA
SRDL
SRA
SRL

85
8204
8206
8208
8210

04

SIG,

B2QA
08
80
FO
8F
8D
88
89
8E
8C
SA
88
AE

SIO
SIOF

9C01 1

ST

50

STiDC
STC

8203
42

9C001

STCA,"l 12f:F«

01(81
01 (, 81), 02(82)
or
01 (81), 02(82)
Rl,02(a2)

SI
SI,52

01(81~

SI
SI
SI
S2

01m l
01 1
D2(82)
Rl
0, (8,)
Rl,R2
01(81)
C?1 (L 1,81), D2(82), 13
Rl,02(82)
Ri,02(82)
Rl,02m 2)
Rl,02 2)
Rl,02m 2)
Rl,02 2)
Rl,02m2~
Rl,02 2
Rl, R3, D2(82)
01(81)
01(81)

or S2

Rl,S2(X2) or Rl,S2
S1(L), S2
or SI, S2

ROO
RRB
RSP

08

o

Operand Format
Explicit

Move long
Move Numerics
Move with Offset

Pur~e

I Not OOSIVSI

Mnemonic. MachiJ:le
Operation Operation
Code
Code

,_.

Rl,S2

51
SI
S1(LJ),S2,13 or SI ,S2, 13
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl,S2
Rl, R3, S2
SI
SI

Rl,02(X2,82)or Rl,02(,82)
t:~.;~?t~~lt;·
r~Iff<;<

Rl,S2(X2) or Rl, S2

Rl,02(X2,82)ar Rl,02(,82)

Rl,02(X2) orRl,S2

'.

~<0;tS:L;'[';F:SF;~"

Store Characters under
Mask
Store Clock
Store Clock Comparator
Store Control
Store CPU addre..
Store CPU 10
Store CPU Timer
Store Halfword
Store Long
Store Multiple
Store PreAx
Store Short

STCM

8E

Rl ,M3, 02(82)

Rl,M3,S2

STCK
STCKC
STCTl
STAP
STIOP
STPT
STH
STO
STM
STPX
STE

8205
8207
86
8212
8202
8209
40
60
90
8211
70

01(81)
01(81)
Rl,R3,02(82)
02(82)
01(81}
01(81)
Rl,02(X2,82)or Rl,02(,82)
Rl,02(X2,82)
,
Rl,R2,02(82)
02(82)
Rl,02(X2,82)or Rl,02(,82)

SI
SI
Rl,Rl,S2
S2
SI
SI
Rl,S2(X2) orRl,S2
Rl,S2(X2) orRl,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
58

01(81),12

SI,12
SI,12
Rl,S2(X2) orRl,S2

Subtract
Subtract Decimal
Subtract Halfword
Subtract logical
Subtract Logical

SR
SP
SH
SL
SLR

18
F8
48
Sf
IF

Rl,R2
01(Ll,81),02(L2 82)
Rl,02~2,B2~or Rl,02(,82}
Rl,02 2,B2 or Rl,02(,82)
Rl,R2

01(8l)~2

Rl,02 2)

"itt):f

S1(L1)~2(L2)or S1 S2

Rl,S2 2) or Rl, S2
Rl,S2 2) or Rl,S2

I See Note 2 at end of
this appendix

o

1===

r==

'0

Program Interruptions
Possible
A ~ 0, p Op Oth.r

Type of
Instruction

Instruction
Move long
Move Numerics
Move with Offset

RR
SS
SS

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 E
x x

Multiply, long
Multiply, long
Multiply, lonG!
Extended
Multiply, lon9"
Extended
Multiply, Short
Multiply, Short
No Operation
No Operation
Or Logical
Or logical
Or logical
Or logical Immediate
Pack

RX,Floating Pt.
RR,Floating Pt.
RX,Floating Pt.

RX,Floating Pt.
RR,Floating Pt.
RX,Ext.Mnemonic
RR, Ext .Mnemanic
RX
SS
RR
SI
SS

~fr.r Translation look~~~C!.

S--'.-

ReQd Direct
Reset Reference Bit
RetrIeve. Status and Page
Set Page Bits
Set cTOcT- 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

x x

x

x

x
x

x

x

51

RX

Store Character

S
RX

Store Characters under
Mask
Store Clock
Store Clock Comparatar
Store Control
Store CPU Address
Store CPU 10
Store CPU Timer
Store Ho Ifword
Store Long
Store Multiple
Store Prefix
Store Short

N
N
N

x E

x

B

N

N

N

N

x x E

x
x

B
B

N
N
N
N

N
N
N
N

N
N
N
N

N
N
N
N

x E
x x

x
x

x
x

x

x

N

x x
x l(

N

N

N

N

N

x x

A
A

N
MQ

N
AAR

N

N-

AAS

MT
ABN

x
x

x

x
)(

x x

AAR
AM
N
N

N
N

RR

RR

N
N

Data

J
J

N
N
l

N
N
M
M

N
N
0
0

x

x x

x

x

x x
x x

pc Pc
pc Pc

x x

Ix

x
x x
x
x x
x
x
x x

Ix

pc Ix

Ix
Ix

Ix Ix F

A

MM

[A

AAH"'

A

x

Ix
Ix

pc pc
pc Pc

A

J
N
MY
MM

N
x

x x
x x

A
A
A
A
A

A
A
A

F

p
Ix
Ix Ix F
Ix Ix

x x

N
N

RR

x

x x
x
J~. ~;B1 jf

~1

RR

x

x

M5

A
A
A

F

RS

RX
RR

AIM
AAQ
ME
N
N

N
J
N
J
N

S
S
RS
S
S
S
RX
RX,Floating Pt.
RS
S
RX,Floating Pt.

~Decimal

A

A
A
A
A
A

x

x
x

N

N

x

x F
0

K

K
K

A

x x

,

K

x
x
x
x
x x
x x

x x

x

J
J
J
J

x

x

RR

N
N
N
N
N
N

N
N
N

x

Store Then AND System Mask SI
Store Then OR System Mask SI
Subtract
RX

N
N
N
N
N
N

N
N
N

RR

t!~~,...

N
N
N
N
N
N

N
N
N

x

RS
RS
RS
S
S

N
N
N
N
N
N

Bot
B
B

RS
S
S
S

Shift Right Single Algebraic
Shift Right Single logical
Signal Processor
Start I/O
Start I/O Fast Release

AAD
N
N

x
x
x x

x

RS
RS
RS
RS
RS

MC
N
N

x x E
x E
x x E

S

S
RR
SI
RS
SS

11

MB
N
N

Data
B

5S

S

10

AM.
N
N

01

x x
x

RR,Floating Pt.

Shift left Double Logical
Shift Left Single Algebraic
Shift Left Single l0,tcal
Shift Right Double Igebraic.
Shift Right Double logical

Subtract
Subtract Decimal
Subtract Ho Ifword
Subtract Logical
Subtract Logical

x x

Condition Cod. Set
00

Data

L

N
l
l
N

N
M
N
M
N

l
N
AAZ
CC
CC

M
N
EE
EE
EE

N
HH

N

N

MI
N

N

N

·?:;~~'f~'It.\ I""" ""

N

0

N

N

KK
KK

N

CC
N

N

N

N

N

AAJ
N
N

AAK
N
N

AAN
N
N

MG
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

V
V
V

X
X
X

Y
Y
Y
V,I
V,I

N
N
N
N

N

W,H

W,H'

KK

0
0

0
0
W,.

W,'

o
Appendix IV: Machine Instruction Mnemonic Operation Codes

397

Instruction
Subtract Normalized,
Extended
Subtract Normalized, long
Subtract Normalized, long
Subtract Normalized, Short
Subtract Normalized, Short
Subtract Unnormalized, long

398

Mnemonic Machine.
Openltion Operation
Code
Cocte
SXR
37
Rl,R2
SD
SDR
SE
SER
SW

6B
28
7B
38
61

Subtract Unnormalized, long
Subtract Unnormalized, Short
Subtract Unnormolized, Short
Supervisor Coli
Test and Set

SWR
SU
SUR
SVC
TS

2F
7F
3F
OA
93

Test Channel
Test I/O
Test Under Mask
Translate
Translate and Test

TCH
TlO
TM
TR
TRT

9F

Unpack
Write Direct
Zero and Add Decimal

UNPK
WRD
ZAP

"

Operand Format
Explicit

Rl ,D2(X2, 82) or Rl, D2(,82)
Rl ,R2
~
Rl ,D'2(X2, 82) or Rl, D2(,82)
Rl,R2
Rl,D2(X2,82)or Rl,02(,82)
Rl,R2
Rl ,D2(X2, 82)or Rl, 02(,82)
Rl,R2

Implicit

Rl,S2(X2) or Rl,S2
Rl,S2(X2) or Rl, S2
Rl,S2(X2) or Rl,S2
Rl,S2(X2) or Rl,S2

I

Dl(81)

SI

9D
91
DC
DD

Dl(81)
Dl(81)
Dl(81),12
Dl(L,Bl),D2(82)
D1(L, B1), D2(82)

SI
SI
SI,12

F3
8"
F8

Dl (L 1,81), D2(L2,B2)
Dl(81),12
Dl (L 1,81), D2(L2,82)

51 (ll), 52(L2) or SI,S2
51,12
S1(ll), S2(L2)or 51,52

51~l),52

51 l),52

or 51,S2
or 51,52

0

Program Interruption
Possible

Type of
Instruction

Inltru ctl on

A
Subtract Normalized, Extended
Subtract Normalized, Long
Subtract Normalized, Long
Subtract Normalized, Short
Subtract Normalized, Short
Subtract Unnormallezd, Long
Subtract Unnormallezd, Long
Subtract Unnormalized, Short
Subtract Unnormalized, Short
Supervisor Call

RR,Floatlng 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 ond Telt

Sl
SI
SI
SI
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

!
E.
E
E

x

a,c
a,c
a,c
a,c
a,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

TT
FF
EE

HH
KK

N
N
J

II
CC

W

WW

N
NN

00

N

N
N
L

N
N
M

N

N
N

0

Program Interruptionl Possible
Under Ov:

Under Other:

0= Decimal
E = Exponent
F
Fixed Point

=

A

a

C
D

Privileged Operation
Exponent Underflow
Significance
Decimal Divide

E
F
G
GA

Floating Point Divide
Fixed Point Divide
Execute
Monitoring

Condition Code Set

"C

,

\

No carry
Carry
Result = 0
Result is not equal to zero
RelUlt i. less than zero
Result i. greater than zero
Not changed
0 Overflow
Result exponent underflows
P
Q Result exponent overflows
R Result fraction = 0
Result field equals to zero
S
Result field is less than zero
T
U Result field is greater than zero
V Difference = 0
W Difference is not euqal to zero
X Difference is less than zero
Y Difference is greater than zero
Z First operand equals second operand
AA First operand is less than second operand
First operand Is greater than second operand
BB
CC CSW stored
DO Channel and subchannel not working
Channel or subchonnel busy
EE
Channel operating in burst mode
FF
GB Page state
GC Page transision
GG Burst operation terminated
HH Channel not operational
Interruption pending on channel
II
Channel available
JJ
Not operational
KK
Available
LL
MM I/O operation initiated and chonnel
proceeding with its execution
H
I
J
K
L
M
N

Nonzero function byte found before
MS
the first operand field i, exhausted
MT
MU
00 Lalt function bytes are zero
MV
PP
All function bytes are zero
QQ Set according to bits 34 and 3S of the
MW
new PSW loaded
RR
Set according to bits 2 and 3 of the
MX
regilter specified by Rl
Leftmost bit of byte specified 0
SS
MY
Leftmost bit of byte specified = 1
TT
UU Selected bits are a" zeros; rnotk i. all zeros MZ
ABA
Selected bits are mixed (zeros and ones)
W
WW Selected bits are all ones
ABB
XX Selected bytes are equal, or mask in zero
yy Selected field of first operand is low
ABC
ZZ Selected field of first operand is high
ABO
AM First operand and second operand counts
ABE
are equal
ABF
Flr.t operand count I. lower
M8
ABG
First operand count is higher
MC
MD No mavement because of destructive overlap ABH
Clock value set
ME
ABI
MF
Clock value secure
ABJ
MG Clock not operational
ABK
MH Channel ID correctly stored
ABL
MI
Chonnel activity prohibited during I D
ABM
Clock value Is valid
MJ
ABN
MK Clock value not necessarily valid
ML
Chonnel warklng with another device
MM Subchannel busy or Interruption pending
MN C lock in error state
MO Segment- or page-table length violation
MP
Page-table entry invalid (I-bit one)
MQ Reference bit zero, change bit zero
MR
Reference bit zero, chonge bit one
NN

=

Reference bit one, change bit zero
Reference bit one, chan;e 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 il in progress for
the addressed dev ICe
Order code accepted
StatuI stored
Successful, block wal dllcon'lected,
index returned
Poge was already disconnected,
index returned
Not successful, index returned
Page was connected
Page was already disconnected
Index returned, poge is addressoble
Index returned, Doge is connected
Index not returned, poge is
disconnected
Index not returned, address is invalid
Page was already addressable
Page was addressable
Page was already connected
Save valid
Save invalid

Appendix IV: Machine Instruction Mnemonic Operation Codes

399

b

RR Format
Operation
Code

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

Move Long
Compare Logical Long
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
Load Positive (Long)
Load Negative (Long)
Load and Test (Long)
Load Complement (Long)
Halve (Long)
Load Rounded (Extended to Long)
Multiply (Extended)
Multiply (Long to Extended)
Load (Long)
Compare (Long)
Add Normalized (Long)
Subtract Normalized
Multiply (Long)
Divide (Long)
Add Unnorrnalized (Long)
Subtract Unnormalized (Long)
Load Positive (Short)
Load Negative (Short)
Load and Test (Short)
Load Complement (Short)
Salve (Short)
Load Rounded (Long or Short)
Add Normalized (Extended)
Subtract Normalized (Extended)
Load (Short)

MVCL
CLCL
LPR
LNR
LTR
LCR
NR
CLR
OR

Remarks

00
01
02
03

04
05
06
07
08
09

OA
OB
OC
OE
OF
10
11
12
13
14
15

16
17

o

18
19

lA
1B
.1C

10

1E

1F
20

21
22

23
24

25
26
27
28
29
2A
2B
2C

20
2E
2F
30
31
32
33

o

34
35
36
37
38

Apl?e_nclix.·,IV;M.a9!.lln~,..

XR

LR
CR
AR
SR

MR
DR
ALR
SLR

LPDR
LNDR
LTDR
LCOR
HDR
LRDR

MXR
MXDR
LDR
CDR
ADR
SDR
MDR
DDR
AWR
SWR
LPER
LNER
LTER
LCER
HER
LRER
AXR
SXR

LER

Ins.J:ruction Mneitlonic Operation Codes

401

-0

RR Format
Operation
Code

Name

Mnemonic

39
3A

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

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 ijalfword

STH
LA
STC
IC
EX
BAL
BCT
BC
LH
CH
AH
SH
MH

Convert to Decimal
Convert to Binary
Store

CVD
CVB
ST

AND
Compare Logical
OR
Exclusive OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract Logical
Store (Long)

N

3B
3C
3D
3E
3F

RX Format
40
41
42
43

44
45

46
47
48
49

4A
4B

4C
4E

4F
50
51

52
53
54
55

56

57
58

59
SA
5B

5C
50
5E

SF
60
61

CL

o

X
L
C
A

S
M

o
AL
SL
STD

62

63
64
65
66
67

68
69
6A
6B

6C
60
6E

6F

402

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
SO
MO
DO
AW

SW

Remarks

o

RX Format

Operation
Code

Name

Mnemonic

70
71
72
73
74
75
76
77
78
79

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

7A
7B

7C
7D
7E
7F

Remarks

ME

DE
AU
SU

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

Set System Mask

SSM

Load PSW
-Diagnose l
Wr'ite 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
Store Multiple
Test under Mask
Move (Immediate)
Test and Set
AND (Immediate)
Compare Logical (Immediate)
OR (Immediate)
Exclusive OR (Immediate)
Load Multiple

LPSW

Start I/O, Start I/O Fast Release
Test I/O
Halt I/O, Halt Device
Test Channel

9E

9F
AO
A1

WRD

ROD
BXH
BXLE
SRL
SLL
SRA

SLA

SROL
SLDL
SRDA
SLDA
STM
TM
MVI
TS
NI
CLI
01

XI
LM

SIO,SIOF
TIO
HIO,HDV
TCH

See Note 2
See Note 1

A2
A3

A4
AS
A_6__________

4C) ___

~

____________._.________________________________________________________

Appendix IV: M.llchine Instructlon Mnemonic Operation Codes

~

403

RS,SI, and S Format
Operation

Mnemonic

Name

Remarks

Code
A7
A8
A9
AA

AB
AC
AD
AE
AF

BO
Bl
B2
B3
B4
BS
B6
B7
B8
B9

STNSM
STOSM

Store Then AND System Mask
Store Then OR System Mask

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

BA

BB
BC
BD
BE
BF
SS Format
CO
Cl
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
DO
Dl
D2
D3
D4
D5
D6
07
08

,

09

DA
DB
DC

404

Translate

TR

~.',".

~/'
;I

SS FO'rmat
Operation
Code

Name

Mnemonic

DO
DE
OF
EO
El
E2
E3
E4
ES
E6
E7
W8
E9
EA
EB
EC
ED
EE
EF
FO
Fl
F·2
F3
F4
FS
F6
F7
F8
F9
FA
FB
Fe
FD
FE
FF

Translate and Test
Edit
Edit and Mark

TRT
ED
EDMK

Remarks

~

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

NOTES
1. Under the System/370 architecture, the machine operations for Halt Device and Halt
I/O ar,e as follows:
11001

1110

XXXX

xxxoJ

Halt I/O

HIO

~OOl

1110

xxx x

XXXll

Halt Device

HDV

(X denotes an ignored bit position)

\0
Appendix IV: Machine Inr;tructioh Mnemonic Operation Cudes

405

2. Under the Systemv370 architecture, the machine operations for Start 1/0 and Start
1/0 Fast Release are as follows:
1001 1100 XXXX XXXO Start 1/0

510

1001 1100 XXXX XXXl Start I/O Fast Release

SIOF

o

(X denotes an ignored bit position)

Operation
Code

Name

Mnemonic

AE

Signal Processor
Compare and Swap
Compare Double and Swap
Clear I/O
Store CPU 10
Store Channel 10
Set Clock
Store Clock
Set Clock Comparator
Store Clock Comparator
Set CPU Timer
Store CPU Timer
Set PSW Rey from Address
Insert PSW Ils, separated by commas 2

LCLB

~ust

LCLC

Pust net be present One or more variable symbols
that are to be used as SEl
symbols, separated by commas 2

LTORG

Any symbol or
blank

Opt~ration

I

not be present One or more variable symbels
that are to be used as SET
symbols, separated by co~mas2

Not required

Must not be present Not required

MNO'lE

A sequence symbol
or blank

Not required

A sequence symbol
or blank

Not req:uired

A sequence symbol
or blank

A severity code followed by a
comma (this much is optional)
followed by any combination of
characters enclosed in
a pos trophe s

lean be used only as part of a macro definition.
2SET symbols can be defined as subscripted SET symbols.

408

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

o
,~v

.i_chine·instng4()rt'~~le

. QOQe, anextended .....iIQ~(:~·;~ode,

:,.cro

0Pf!ratio~,.~,eatbler;

<,;p~r~tJ.onf ..n()~l:'~t~~~ . ~4.
'(lefined bya pre'ri.9Us,,(),sm "
1A8truetl()n.~

q:r;biank

Blank

A. aaacbine instruc-

·tio~l.mpemoniccode,

an .extended·nmemon'.' .J.c:::(l()(}~~a;n assembl~r:Qperation, .an
~per~tl~n ~ode define~ ·by.a.prevlous
s~

ORG

instrtlCtion,

os Any symbol or
only

DOS
only

A relocatable expression or

blank
A sequence symbol
or blank

blank
A relocatable expression or
blank

symbol

One or more operands, separated
bY,a comma

PRINT

A sequence symbol
or blank

One to three operands

PUNCH

A sequence symbol
or blank

One to eighty characters,
enclosed in apostrophes

A sequence symbol
or blank

One or more operands, separated

A sequence symbol

Not required

REPRO

by a comma

or blank
SETA

A SETA symbol

An arithmetic expression

SETB

A SETB symbol

A 0 or a 1, a SETB symbol, ora logical

SETC

A SErC symbol

A type attribute, a character
expression, a substring
notation, or a concatenation
of character expressions
~dsu})~.tr irl~.n~ta tions •...' .

expression enclosed in parentheses

..'.i

'~~""P~;~~~~~··',ae~r . • ·•··•. ~S~!' .• . .,
~~Ir~~~~~n •. •·e~cl~~~. ·. in·~~~th!ses)
i;eanprecedethe~abOve.
If''desl;red.
',.
;::;.
:.

o

.:

."

. . .,:." "... :' .......: .. :: ...

"."

... :....

.

':..,:. ,., .:

. . ....... ,..... :. .

....... : ..~ .. .....

,.

..

SPACE

A sequence symbol
or blank

A decimal self-defining
te rm or blank

START

Any symbol or
blank

A self-defining term or blank

TITLE

A string of alphameric characters.
A variable symbol.
A combination of
the above.
A sequence symbol.
A blank

One to 100 characters, enclosed
in apostrophes

Appendix V: AssE::mbler Instr,tJCtions

409

operation

Name Entry

Operand Entry

USING

A sequence sYHbol
or blank

An absolute or relocatable
expression followed by 1 to 16
absolute expressions, separated
by commas

wXTRN

A sequence syrobol
or blank

One or more relocatable
symbols, separated by commas

Instruction

Name Entry

Operand Entry

Model Statements 3

Any combination of characters (including
variable symbols)

prototype Statement2

A symbolic parameter or blank

Zero or more oper.ands
that are symbolic parameters,
separated by commas

Macro-Instruction
statement 2

An ordinary symbol,
a variable symbol,
a sequence symbol,
a combination of
variable symbols
and other characters that is equivalent to a symbol, 2
or blank

Zero or more positional
operands and/or zero
or more keyword operands
separated by commas 2

Assembler Language
statement 3

An ordinary symbol,
a variable symbol,
a sequence symbol,
a combination of
variable symbols
and other characters that is equivalent to a symbol,
or blank

Any combination of characters (including variable
symbols)

1

2

3

410

An ordinary symbol,
. a variable symbol,
a sequence
symbol, a combination of variable
symbols and other
characters that is
equivalent to a
symbol, or blank

Can only be used as part of a macro definition.
Variable symbols appearing in a macro instruction are replaced
by their values before the macro instru~ion is processed.
Restrictions on the
in statement fields
for each individual
for Model Statement

use of variable symbols
are included in the descriptions
statement and in WRules
Fields· ~ee J4~ •

Appendix VI: Summary of Constants

r------T---------T--------T--------T--------------T---------T---------~-------~--------,

I
I
I
I
I TYPE

I
I
I
I
I
I
I LENGTH I
I IMPLICIT I
I MODI- I
I LENGTH I ALIGN- I FIER I SPECIFIED
I (BYTES) I MENT I RANGE I · BY

I
I
I
I
I

NUMBER
OF CONSTANTS
PER
OPERAND

I
I
I RANGE
I FOR EXI PONENTS

I
I
I RANGE
I FOR
I SCALE

I
I
I TRUN- I
I CATION/ I
I PADDING I
I SIDE
I

.------+---------+--------+--------+--------------+---------+---------+--------+---------i
I C
I as
I byte
1. 1 to I characters
lone
I
I
I right
I

I 256 (1) I
I
I
I
I
I
I
I needed I
~------+---------+--------+--------+--------------+---------+---------+--------+---------1
I X
I as
I byte
1·1 to I hexadecimal I multi- I
I
I left
I
I
I needed I
I 256 (1) I digits
I pIe
I
I
I
I

.------+---------+--------+--------+--------------+---------+---------+--------+---------i
I B
I as
I byte
1·1 to I binary
I multiI
I
I left
I
I

I needed I
I 256
I digits
I pIe
I
I
I
I
~------+---------+--------+--------+--------------+---------+---------+--------+---------~
I F
I 4
I word
1.1 to I decimal
I multi- I -85 to I -187 tol left (3) I
I
I
I
I 8
I digits
I pIe
I +15
I +346
I
I

.------+---------+--------+--------+--------------+---------+---------f--------+---------i
I H
I 2
I half
1.1 to I decimal
I multi- I -85 to I -187
I left (3) I

I

I
I word
I 8
I digits
I pIe
I +75
I +346
I
I
.------+---------+~-------f--------+--------------+---------+---------f--------+---------i
I E
I 4
I word
1. 1 to I decimal
I roulti- I -85 to I
I right (3) I
I
I
I
I 8
I digits
I pIe
I +75
I 0-14
I
I

.------+---------+--------+--------f--------------+---------+---------+--------+---------i
I 0
I 8
I double I .1 to I decimal
I multi- I -85 to I
I right (3) I
I

I

I word

I

I digits

8

I pIe

I +75

I

0-14

I

I

t------t---------t--------+--------t--------------t---------t---------f--------t---------i
I L
I 16
I double I .1 to I decimal
I mUlti- I -85 to I 0-28
I right (3) I
I

I
I word
I 16
I digits
I pIe
I +75
I
I
I
~------+--------+_-------t_------_+------------4--------_+---------i-------i--------,
I P
I as
I byte
1·1 to I decimal
I multiI
I
I left
I
I
I needed I
I 16
I digits
I pIe
I
I
I
I

.------+---------+--------f--------t--------------f---------+---------+--------+---------i
I Z
I as
I byte
1·1 to I decimal
I multi- I
I
I left
I
I

I needed

I

I 16

I digits

I pIe

I

I

I

I

I

I

I

I

I pIe

I

I

I

I

I

I

I

I

I symbol

I pIe

I

I
I

I

I
I

I
I
I
I
I
I

I
I
I
I
I
I

I word
I
I
I
I
I

I
I
I
I
I
I

I or relocatab-I pIe
I le expression I
I or two absol-I
I ute express- I
I ions:
I
I exp (exp)
I

I
I

.------+---------+--------+--------+--------------f---------+---------+--------+---------i
I A
I 4
I word
1·1 to I
I multi- I
I
I left
I
4

(2)

.------+---------+--------+--------+--------------f---------+---------+--------+---------i
I S
I 2
I half
I 2 only lone absolute I multi- I
I
. I
I
I
I
I
I

I
I
I
I
I
I

.I

I

I
I
I
I

I
I
I
I

I
I

.------+---------f--------+--------+--------------f---------+---------f--------+---------i
I Y
I 2
I half
1. 1 to I any
I multi- I
I
I left
I

I 2 (2) I expression
I pIe
I
I
I
I
I
I word
.------~---------~--------~--------~--------------~---------~---------~-------~--------~
I (1) In a D~ assembler instruction C and X type constants can have length specification I
I
to 65535.
I
I (2) Bit length specification permitted with absolute expressions only. Relocatable A- I
type constants, 3 or 4 bytes only; relocatable Y-type constants, 2 bytes only.
I
I
I (3) Errors will be flagged if significant bits are truncated or if the value specified I
I
cannot be contained in the implicit length of the constant.
I

I

o

L____________________________________________________________________ J
Appendix VI: Summary of Constants

411

This page left blank intentionally.

/\
\

I

~-1

Appendix VII: Summary of Macro Facility

The four charts in this Appendix summarize 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 summary of the expressions that can be used in macro instruction statements.
Chart 3 is a summary of the attributes that may be used in each expression.
Chart 4 is a summary of the variable symbols that can be used in each expression.

o
Appendix VII: Summary of Macro Facility

413

01:00

Vatiabl. SyMiIols

I-'
01:00

Global SET Symbols

Statement

Symbolic
Porometer

SETA

SETB

SETC

S~....

LOCGI SET SymIIoll

SETA

SETB

SETC

&SYSNDX

&SYSECT

Attributes

V... iable S,........II

&SYSUST

&SYSPARM

&SYSDATE &SYSTIME

Type

length

Scaling

Integer

Count

Number

Sequence
Symbol

MACRO
Pn>totype
Stat_t

Nome
Open>nd

GILA

OpeRHld

GBlB

Operand

GBLC

Operand

LCLA

Operand

LCU

Operand
Ope",nd

LCLC
Model
Statement

Na_

Na_

Ope",tion Operation
Operand
Operand

SETA
Ope",n;

Opera""
SETC
Opeftlnd

Opera~

Name

Operand 3

Ope",ncP

Nome
Operand

Operand6

Operand8

Name
Operand

Operand7
Operand6

Name

Name

Operation Operotion Operation Operation
Operand
Operand
Operand
Operond

Nome
Ope",nd

SETB

AIF

Name

Operand

Operand 9

Operand 6

Name
Operand
Operand6
Open>nd 7
Operand 6

Operand 3

Name

Operand

Operation Operotion
Operand Operand

Operation
Operand

Operand9

Operand

Operan;

9
Operand
6

Operand

Operan'/>

Operand6

Operand 4 Operand 6

Operand8

Name
Operand

Operand

Operand

Operand

Name

Name

Operation

Nome

Name

Na_

Name

Operation
Operand

Operand 6

Operond 6

Operand

Operand 4 Operand6

Operand

Operand

Operand

Operand

Operand
Operand
Operand4

Operand

Operand

6

Operand

Operand

Operand

Operand
Operand5

Operand 5

Operand 5

Operand5

Operand 5

Operand5

Operand5

Operand5

Operand 5

Operand 5

Operand
Operand 4

Name
Operand

AGO

ACTR

Name

Operand

Operan~

Operand

O~rand3

Operand2

Operand

Operand3

Operan~

Operan~

Operand

Operand

2

Operand

Operand

Operand

Operand

Operand

ANOP

Name

MEXIT

Name

MNOTE

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Operand

Outer
Macra
Inner
Macra
Assembler
language
Stot6fllellt

Name
Name

MEND

Nome
Operand

Nome
Ope",nd

Name
Operand

Name
Operand

Name
Operand

Name
Operand

Name
Operand

Nome
Ope",nd

Name
Operand

Name
Operond

Name
Operand

Name

Operand

Name
Operand

Name
Operation
Ope",nd

Nome
Name
Name
Name
Operation Operation Operation Operation
Operand
Operand
Operand
Operand

Name
Operand

Name
Operand

Nome
Operand

Name

Nome
Operand

Operand

Operand

Nome
Operand

Operand

Operand

Nome

Name

Nome
Operation
Operand

I. Variable symbols in macra-instructians .... replaced by their volues before processing.
2. Only if value is self-defining term.
3. Converted to arithmetic +1 or -to.
4. Only in character relations.
5. Only in arithmetic relations.
6. Only in arithmetic or character relations.
7. Converted to unsigned number.
8. Converted to charocter I or o. y'';'::k\/:';:;i,.,'"·'·"/ . ",,,·,,>,,:<:.,,.+/,· ".''' ..' . i.',:i'·'''')C:.'·'{'\
9. Only if one ta ten decimal digits l!i"~;:"J"'~.l'Q~r;:\

~•••• '.•" I

".~

'~ -~/:

()

f~
l;

)

Page of GC33-40tO-O
Revised September 29,1972
B}' TNT. GN33-8148

b

Chart 2.

xpression

Conditional ASsembly Expressions

Arithmetic Expressions

an 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

• SETS symbols

• SET A 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
enclosed in
apostrophes

• Arithmetic
relations'

• 'SYSPARM if its
value is a decimal
self-defining term
• Symbolic parameters
if the corresponding
operand is a decimal
self-defining term
•

o

• 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

Values must be:

1$.,cfrOlltiOj3llrQu!tb 2, ·117j;ISii;ij:I',);

PQs.

fr:9m . 0 ···tbrou9b99,'~9,,~9j

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.

Ie
Appendix VII: Summar:y of

~~cro

Facility

415

Page

or GC33-40tO-O

Revised September 29, 1972
By TKL CN33-8148

Expression

Arithmetic Expressions

Character Expressions

Logical Expressions

Operations
are

+, - (unary and binary), *, and I;
parentheses permitted

Concatenation, with a
period (.)

AND, OR, and NOT
parentheses permitted

o through 255
characters

o

• SETA operands

• SETC operands

•

• Arithmetic relations

• Character relations 2

• AlP operands

Range
of values
May be
used in

o

(false) or

1 (true)
SETS

operands

• Subscripted SET
symbols
• gSYSLIST subscript (s)
• Substring notation
• Sublist notation

1

2

An arithmetic relation consists of two ~rithmetic expressions
related by the operators Gr, 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.

a

e

L)

.!l

416

o

"0

Chart 3.
Attribute

Attributes
Notation

Can be used with:

Can be used only if
type attribute is:

Can be used in

always be

1. SETC operand
fields
2. Character
relations

T'

Ordinary Symbols defined in open code;
symbolic parameters
insije macro definitions; 'SYSLI~T(m) I
'SYSLIST

ngth

L'

Ordinary Symbols defined in open code;
symbolic parameters
inside macro definitions; 'SYSLIST (In) I
and 'SYSLIST(m,n) inside macro definitions

Any letter except
M, N, 0, T and U

Arithmetic
expressions

Scaling

S'

Ordinary Symbols defined in open code;
symbolic parameters
insije macro definitions; 'SYSLIST (m) I
and iSYSLIST (m,n) inside macro definitions

H,F,G,D,E,L,X,P,
and Z

Arithmetic
expressions

Integer

I'

Ordinary Symbols defined in open code;
symbolic parameters
insije macro definitions; 'SYSLIST (m) I
and iSYSLlST (m,n) inside macro definitions

H,F,G,D,E,L,X,P,
and Z

Arithmetic
expressions

nt

X,

Symbolic parameters,
iSYSL 1ST (m) and
iSYSL 1ST (m,n) inside
definitions

Any letter

Arithmetic
expressions

N'

Symbolic parameters,
iSYSLIST and
'SYSLIST(m) inside
macro definitions

Any letter

Arithmetic
expressions

r

~ay

used~

NOTE: There are definite restrictions in the use of these attributes ( see

L1~

• '

o
Appendix VII: Summary of Macro Facility

417

Chart 4. Variable Symbols (Part 1 of 2)
Variable
Symbol

Declared by:

Initialized,
or set to:

Symbolic'
parameter

prototype
statement

Corresponding
~onstant
macro instruc- throughout
tion operand
definition)

Value changed
by:

May be used in:
• Arithmetic
expressions
if operand
is decimal
self-defining term
• Character
express ions

SETA

LCLA or GBLA
instruction

o

SETA
instructi:>n

• Arithmetic
expressions
• Character
expressions

SETB

LCLB or GELS
instruction

o

SETB
instructi:>n

• Ari throe tic
expressions
• Character
expressions
• Logical
expr es s ions

SETC

LCLC or GELC
instruction

String of
length 0
(null)

SETC
instructi:> n

• Arithmetic
expressions
if value is
decimal se1fdefining term
• Character
expressions

&SYSNDX'

The assembler

Macro
instruction
index

(Constant
throughout
defini tion;
unique for
each macro
instruct io n)

• Arithmetic
expressions

(Constant
throughout
definition;
set by CSECT,
DSECT, START,
and COM)

• Character
expressions

• Character
expr es s ions

&SYSECT'

The assembler

Control
section in
which macro
instruct ion
appears

&SYSLIST'

The assembler

Not applicable Not applicable

• N'&SYSLIST in
ari thmetic
expressions

&SYSLIST

The assembler

Corresponding (Constant
macro instruc- throughout
tion operand
definition)

• Arithmetic
expressions
if operand
is decimal
self-defining
term

(n) "

&SYSLIST
(n ,m) ,

• Character
expressions
'Can be used only in macro definitions.
418

o

o

Chart 4. Variable Symbols cont. (Part 2 of 2)
Variable
Declared by:
lnitializ ed,
Value changed
Symbol
or set to:
by:
&SY'SPARM

PARM 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.

o
Appendix VII: Summary of Macro Facility

419

This page left blank intentionally.

Glossary

This glossary has three rr.ain types of definitions that
aI=I=ly:
•

To the assembler language in I=articular (usually
distinguished by reference to the words -assemtler-,
- assemtly -, 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 ~
Oata Processing Glossary, Order No. GC20-1699.
IBM is grateful to the American National Standards Institute
(ANSI) for permission to reI=rint its definitions from the
American National Standard Vocabulary for Information
Processing, which was prepared by Subcommittee X3l<5 on
Terminology and Glossary of Anerican National Standards
Cammi ttee X3.
ANSI definitions are preceded by an asterisk

~).

o
Glossary

421

~.

*absolute address: A pattern of characters
that identifies a unique storage location
without further modification.
acsolute expression: An asseubly-time
expression whose value is not affected by
progzam relocation. An absolute expression
can represent an absolute address.
acsqlute term: A term whose value is not
affected cy relocation.
*address:
1. An identification, as reFresented by a
name, label, or number, for a register,
location in storage, or any cther data
source or destination such as the
location of a station in a
communication network.
2. Loosely, any part of an instruction
that specifies t.he locaticn of an
operand for the instruction. Synonymous
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 virtua 1
storage.
alphabetic character: In assembler
programming, the letters A through Z and $,
"

Q.

*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 statement is false.
arithmetic expression: A conditicnal
assembly expression that is a combination
of arithmetic terms, arithmetic cFerators,
and paired parentheses.
arithmetic operator:
1. In assembler programming, an cperator
that can be used in an absolute or
relocatable expression, or in an
arithmetic expression to indicate the

422

2.

actions to be performed on the terms in
the expression. ~he arithmetic
operators allowed are: +, -, . , / .
See binary operator, unary operator.

arithmetic relation: Two arithmetic
&ipressions 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 radix.
arithmetic term: A term that can be used
only in
arithmeitc expression.

an

array: In assembler programming, 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:
assembles.

A

computer program that

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.
assembly time: 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-assembly time.

\~,~.>{

b

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
attritute.

* branch: Loosely, a conditional jump.
buffer: 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.
*!2..!!9::

*base:
-'-.--A number that is multiplied by itsel~
as many times as indicated by an
exponent.
2. See floating-point base.
*base address: A given address fron which an
absolute address is derived by conbination
with a relative address. NOTE: In
assembler programming, the relative address
is synonymous with displacement.
base register: A register that contains the
base address.
*binary: Pertaining to the number
representation system with a radix of two.
*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 expressions are:
addition (+), subtraction (-),
mul tiplica tion (*), 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.

o

boundary: In assembler progran:rring, a
location in storage that marks the
beginning of an area into which data is
assembled. For example, a fu1lword 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 b¥te (location can be any
number). See alsu· alignment.

A

mistake or malfunction.

byte:
,. A sequence of adjacent binary digits
operated upon as a unit and usually
shorter than a computer word.
2. The representation of a character;
eight binary digits (bits) in
System/370.

call;
.-'-.-To transfer control to a specified
closed subroutine.
2. See also macro call.
* character :
,. A letter, digit, or other symbol that
is used as part of the organization,
control, or representation of data. A
character is often in the form of. a
spatial arrangement of adjacent or
connected strokes.
2. See blank character, character set,
special character.
character exp!~ssion: A chaxacter 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:
*,. A set of unique representations called
characters, for example, the 26 letters
of the English alphabet, 0 and , of the
Boolean alphabet, the set of signals in
the Morse code alphabet, the '28
characters of the ASCII alphabet.
2. In assembler programming, the
alphabetic characters A through Z and
$, I, Q; the digits, 0 through 9; and
the speci al characters + - * / , ( ) =
• • , and the blank character.
*character string: A string consisting
solely of characters.
closed subroutine: A subroutine tha t can be
stored at one place and can be linked to
one or more calling routines. Contrast with
open subroutine.

Glossary

423

*code:
-l-.--A set of unambigous rules specifying
the way in which data tray be
repres ented, 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
-proce ssor.
3. To write a routine.
4. See condition code, object code,
operation code.
*coding: See symbolic COding.
collating sequence: An ordering assigned to
a set of items, such that any twc 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 cut~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 notaticn, the second
specified number may be given power of
the radix or one less than the given
power of the radix. The 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.

condition code: A code that reflects the
result of a previous input/output,
arithmetic, or logical operation.
conditional assembll: An assembler facility
for altering at pre-assembly time the
content and sequence of source statements
that are to be assembled.
conditional assembll expression: An
expression that the assembler evaluates at
pre-assembly time.
conditional assembly instruction: An
assembler instruction that performs a
conditional assembly operation. Conditional
assembly instructions are processed at
pre-assembly time. They include: the LCLA,
LCLB, LCLC, GBLA, GBLB, a nd the GBLC
declaration instructions; the SETA, SETB,
and SETC assignment instructions; the AlP,
AGO, ANOP, and ACT.R branching instructions.
* condi tional j!!!!!E: A jump tha t occurs if
specified criteria are met.
* .£Q!!§~: See figurative constant.
continuation line: A line of a source
statement into which characters are entered
when the source statement cannot ce
contained on the preceding line or lines.
control progf~~: A program that is designed
to schedule and supervise the performance
of data processing work by a computing
system.
control secti2!!= That part of a ~rogram
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.
£2l2l: To reproduce data in a new location

*computer program: A series of instructions
or statements, in a form acceptable to a
computer, prepared in order to achieve a
certain result.

or other destination, leaving the source
data unchanged, although the physical form
of the result nay differ from that of the
source. For example, to copy a deck of
cards onto a magnetic tape.

*computer word: A sequence of bits or
characters treated as a unit and capable of
being stored in one computer location.

count attribute (gl): An attribute that
gives the number of characters that would
be required to represent the data as a
character string.

concatenation character: The period (.)
that is used to separate character strings
that are to be joined tcgether in
conditional assembly processing.

* counter:

~-device

2.

424

such as a register or storage
location used to represent the numter
of occurrences of an event.
See instruction counter, location
counter.

o

CPU: Central processing unit.
CSECT: See control section.

dummy section: Same as dummy control
section.
data attribute: Same as attribute.
data constant: See figurative constant.
*drbug: To detect, locate, and remove
m1stakes from a routine or malfunctions
from a compute~.
*decimal: pertaining to the nurrber
representation systero with a radix of ten.
declare: To identifY the variable symbols
to be used by the asserrbler at pre-assembly
time.

.dynamic storage allocation: A storage
allocation technique in which the location
of computer programs and data is determined
by criteria applied at the moment of need.

EBCDIC: Extended binary coded decimal
interchange code.

*device: See storage device.

entry name: A name within a control section
that defines an entry point and can be
referred to by any control section.

dimension: The maximum number of values
that can be assigned to a SET symbol
representing an array.
dimensioned SET symbol: A SET syrobcl,
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
~CLA, LCLB, LCLC) declaration instruction.
displ acement :
Same as relative address.
2. In assembler programming, the
difference in bytes between a symbolic
address and a specified base address.

.1.

doubleword: A contiguous sequence cf bits
or characters which coreprises two com~uter
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.
.dummy: 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.

o

duplication factor: In assembler
programming, a value that indica tes 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.

*delimiter: A flag that separates and
organizes items of data.

.dictionary: See external syrobcl dictionary.

o

area of storage without producing any
object code. Synonymous with dummy 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:
1. An ordinary symbol that represents an
entry name (identified by the ENTRY
assembler instruction) or control
section name (defined by the CSECT or
START 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.
~:

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: An 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.

Glossary

'125

exponent:
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.

.1.

exponent modifier: A subfield in the
operqnd 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.
expr es s ion:
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 bits.
external name: A name that can be referred
to by any control section or separately
assembled module: that is, a contrel
section name or 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 in 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
load module which identifies the external
symbols in the module. Abbreviated ESD.
~:

External reference.

fetch:

*~o locate and load a quantity of data

2.

426

from storage.
In the Operating System ~S), to obtain
load modules from auxiliary storage and
load them into virtual storage. See
also loader (1).

3.

4.
5.

In the risk Operating System (OOS), to
bring a program phase into virtual
storage from the core image litrary fer
immediate execution.
A control program routine that
accomplishes (1), (2), or (3). See alse
loader (2).
The name of the system macro
instruction (FElCH) used to accomplish
(1), (2), or (3).

* figurati ve

constant: ~ preassigned, fixed,
character string with a preassigned, fixed,
data name in a particular programming
language.
NCiE: 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 Cy 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.

* floating-point

base: In floating-point
representation, the fixed positive integer
that is the base of the power. NOTE: In
assembler 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.
NCiE: In assembler programming, the
fullword has a length of four bytes and can
be aligned on a fullword toundary (a
location whose address is divisible by
fou~.
Contrast with doubleword, halfword.

GE: ~reater than or equal to) See
relational operator.
generate:
*1. To produce a program by selection of
,subsets from a set of skeletal coding
under the control of parameters.
2. In assembler programming, to produce
assembler language statements from the
model statements of a macro definition
when the definition is called by a
macro instruction.
global scope: Pertaining to that part of an
assembler program that includes the tody of
any macro definition called from a source

o

mod ule and the open code portion of the
source module. Contrast with local scope.
global variatle symbol:
1. A variable symbol that can be used to
communicate values between macro
definitions and tetween a macro
defini tion and open code.
2. Contrast'with local variable symbol.
GT: (greater than) See relational operator.

2.

See assembler instruction, conditional
assembly instruction, rrachine
instruction, macro instruction.

* instruction counter: }. counter that
indicates the location of the next computer
instruction to be interpreted.
instruction statement: See instruction (1).
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.
integ~r attriQ~~:

*halfword: A contiguous sequence of bits or
characters which comprises half a com~uter
word and is capable of being addressed as a * interruE!:: To stop a process in such a lIiCly
unit.
it can be resumed.
NOTE: In assembler programming, the
halfword has a length of two bytes and can *.!LQ: An abbreviation for input/output.
be aligned on a halfword boundary (a
location whose address is divisible by
twO). Contrast with doubleword, fullword.
* jQt con~rol~ta:!:~~:!:: A statement in a job
hexadecimal: Pertaining to a number system
that is used in identifying the job or
with a radix of sixteen; valid digits range
describing its requirements to the
from 0 through F, where F represents the
operating system.
highest units position (15).

* jump:
1.

iromediate data: Data specified in an SI
type machine instruction that represents a
value to be assembled into the object code
of the machine instruction.
implicit address: An address reference
which is specified as one absclute or
relocatable expression. An implicit address
must be converted into its ex~licit
base-displacement fonn before it can be
assemtled into the object code of a machine
instruction.
index register:
* 1. A regi ster whose content nay be added
to or subtracted from the operand
address prior to or during the
execution of a computer instruction.
2. In assembler programmdng, a register
whose content is added to the cperand
or absolute address derived frcm a
combination of a base address with a
displacement.
inner macro instruction: A macro
instruction that is specified, that is,
nested inside a macro definition. Contrast
with outer macro instruction.
*instruction:
1. A statement that specifies an c~eration
and the values or locations of its
operands.

2.

A departure from the normal sequence of
executing instructions in a computer.
See conditional jump.

keyw9rd: In assewbler programming, an
ordinary symbol containing up to seven
characters. ~ keyword is used to identify a
parameter, called a keyword paxameter, in a
macro prototype statement and the
corresponding roacro instruction operand.
keyword operand; 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 ty
keyword and not by their position.
NOTE: 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.
keyword_p!!~m~:!:~!:

A symbolic parameter in
which the symbol fcllowing the ampersand
represents a keyword.
NOTE: In assembler programming, the
declaration of ~eyword parameter has the
format: a keyword parameter followed ty an
equal sign which, in turn, is followed by a
standard - (default) value.

Glossary

427

*

label:

*~ne

2.

or more characters used to identify
a statement or an item of data in a
computer program.
In assembler progran.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 ~re-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. A set of representations, conventions,
and rules used to convey infcrwation.
2. See machine language, object language,
source language.
LE: (less than or equal to) See relational
operator.
*l~ngth:

See word length.

length attribute eL'): An attribute that
9i ve s the number of bytes to be cccu~ied by
the object code for the data represented,
such as machine instructions, constants, 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 o~erand
of the DS or DC assembler instruction that
determines the length in bytes of the area
to be reserved or of the area into 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

In programming, coding that
connects two separately ceded routines.

link!9:~:

.

IC··~·~.1
u

link~ge

edito!: 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.
literal pool: 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.
The output of the linkage
editor; a program in a format suitable for
loading into virtual storage for execution.

~~gule:

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 (tOS),
a supervisor routine that retrieves
program phases from the core image
library and loads the~ into virtual
storage.
local scoee: Fertaining to that part of an
assembler program that is either the tody
of any macro definition called from a
source module or the open code portion of
the source module. Contrast with global
scope.
local 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.

x' -"\

'\l.._. v'!

o

2.

Contrast with global variable symbol.

*machine language: A language that is used
directly by a machine.

*location: Any place in which data rray be
stored.
location counter: A counter whose value
indicates the address of data assembled
from a machine instruction or a ccnstant,
or the address of an area of reserved
storage, re1a ti ve 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 logical
terms, logical operators, and paired
parentheses.
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, ANt NOT, and OR
NOT.

()

logical relation:
1. A logical term in which two expressions
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.

macro call: Same as macro 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 expansion: Same as macro genera tion.
macro generation: An operation in which the
assembler produces a sequence of assemtler
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:
1. An instruction in a source language
that is equivalent to a specified
sequence of machine instructions.
2. In assembler programming, an assemtler
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.

loop counter: In assembler prograrrrring, a
counter to prevent excessive looping during
conditional assembly processing.

macro instruction operand: An operand that
supplies a value to be assigned to the
qorresponding symbolic parameter of the
macro definition called by the macro
instruction. This value is passed into the
macro definition to be used in its
processing.

LT: (less than) See relational operator.

macro

*machine code: An operation code that a
machine is designed to recognize.

o

macro:
;:--roose1y, a macro definition.
2. See also macro definition, macro
generation, rracro instruction, macro
prototype statement.

machine instruction:
• ,. An instruction that a machine can
recognize and execute.
2. In assembler programming, (locsel~ the
symbolic machine language statements
which the assembler translates into
machine language instructions.

libra~:

See program library.

macro processing instruction: An assembler
instruction that is used inside macro
definitions and processed at pre-assemtly
time. These instructions are: MACRO, MRlt,
MEXIT, and MNOTE.
macro prototype: Same as macro prototype
statement •
macro prototype statement: An assemtler
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 stor age:
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:
A sym1:ol chosen to assist the human
memory, for example, an abbreviation
such as WmpyW for -multiply-.
2. See also mnemonic operation cede.

* 1.

model statement: A statement in the body of
a macro definition or in open code from
which an assem1:ler language statereent 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,
oom1:ining with other units, and
loading, for example, the infut to, or
output from, an assembler, ccnpi1er,
linkage editor, or executive routine.
See lOad module, object nodule, source
module.

* no OP:

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 P
is true if P is false, false if P is true.

*

*

stri~:

Same as null string.

null strin~:
1. 'The notion of a string depleted of its
entities, or the notion of a string
prior to establishing its entities.
2. In assembler programming, synonymous
with the null character string.
numbe~rib!!te

(N'):
An at-tribute of a symbolic parameter
that gives the number of sutlist
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 numter
of sublist entries in a specific
positional operand (specified as
N' gSYSLIST en) ) •
1.

name entry: Usually syncnymous with label
(2). However, the name entry of a model
statement can be any string ef characters
at pre-asseml::ly tine.

430

null character: A control character that
serves to accomplish ~edia fill or time
fill, for example, in ASCII the all zeros
character (not numeric zero). Null
characters may be inserted into or removed
from a sequence of characters without
affecting the meaning of the sequence, l:ut
control of equipment or the format may 1:e
affected. Abbreviated NUL. Contrast with
space character.
null character

name:
-1-.--A 1- to a-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.

name field parameter: A symbolic parameter
that is declared in the name field of a
macro prototype stateIrent. It is assigned a

nest: To imbed subroutines or data in other
su1:routines or data at a 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 expression, or
the level at which a macro definition
containing an inner macro instruction is
processed by the assembler.

* module:
1.

(not equal to) See relational operator.

*

obje.st code: Output from an assembler which
is itself executable machine code or is

a

.
. ~;1

suitable for processing to produce
executable machine code.

*

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.

object language: The language to which a
statement is translated. The machine
language for the IBM System/370 is an
object language.

outer macro instruction: A macro
instruction that is specified in open code.
Contrast with inner macro instruction.

* 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.

*

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 progzam. 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.
oEen subroutine: A subroutine that is
inserted into a routine at each place it is
used. Contrast with closed subroutine.
NOTE: In assembler programming, 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. That which is operated upon.
2. See keyword operand, positional
operand.

paired relocatable terms: 1wo relocatatle
terms in an expression with the same
relocatability attribute that have
different signs after all unary operations
have teen performed. Paired relocatable
terms have an absolute value.

• oFerating system: Software which controls
the executi"on of computer programs and
which may provide scheduling, debugging,
input/output control, accounting,
compilation. storage assignrr:ent, data
management, and related services.

* oEeration

code: A code that represents
specific operations.

• oEerator:
1. 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.
2. See arithmetic operator, binary
operator, logical operator, unary
operator.
3. See also concatenation character.

* OR:

A logic operat-or having the property
that if P is a stateroent, 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.

o

ordinary symbol: A symbol that represents
an assembly-time value when used in the
name or operand field of an instruction in

•

parameter:
1. A variable that is given a constant
value for a specific purpose or
process.
2. See keyword parameter, name field
parameter, positional I4rameter,
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.
positio~ope~~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.

positiQnal par~~: A symbolic parameter
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 o~erations.

required. For exam~le, tens complement in
decimal notation, twos corrplement in binary
notation.

private code: An unnamed control section.

read-only: A type of access to data that
allows it to read but not modified.

* program:
1.

2.
3.

4.
S.

real storage: The storage of a IB~
Systemj370 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 ~rogram,
source program.

recursive: Fertaining to a process in which
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).

* Eroqram

library: A collection of available
computer programs and routines.

programmer macro definition: Locsely, a
source macro definition.
prototype statement: Sarre as rr.acrc
protatype statement.

* pushdown list: A list that is constructed

and maintained so that the next item to be
retrieved and removed is the most recently
stored item in the list, that is, last in,
first out. Synonymous with pushdown stack.

pushdown stack: Sarr'e as pushdown list.

quoted string: A character string enclosed
by apostrophes that is used in a «-acro
instruction operand to represent a value
that can include blanks. The enclcsing
apostrophes are part of the value
represented. Contrast with character
expression.

* radix:

In positional ret:resentaticn, that
integer, if it 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 complement 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 specified
amount of data such as one word.
2. See base register, index register.
relation: The comparison of two expressions
to see if the value cf one is equal te,
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

addr~~~: The nuwber that specifies
the difference between the absolute address
and the base address. Synonymous with
displacement.

relocatability 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.
reiocatable expression: An assembly-time
expression whose value is affected by
program reloc~tion. A relocatable
expression can represent a relocatable
address.
relocatable term: A term whose value is
affected by program relocation.

o

* relocate:

In computer proqramming, to move
a routine from one portion of storage to
another and to adjust the necessary address
references so that the routine, in its new
location, can te executed.

relocation: The modification cf address
constants to compensate for a change in
origin of a module, proqram, or control
section.

* rounding:

*

sign position: A position, normally located
a t one end of a numeral, that contains an
indication of the algebraic Sign of the
number.

*

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.

*

2.

An ordered set of instructions that may
have some general or frequent use.
See sul:routine.

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-~oint or
floating-point constant.
scaling attribute: An attribute that
indicates the number of digit positions
occupied ty the fractional portion of
fixed-point, decimal, and floating-point
constants in their object code for~.
scope:
1. In assembler programming, that part of
a source prograR in which a variable
symbo~ can communicate its value.
2. See global scope, local scope.

SFT symbol: A variable symbol used to
communicate values dur ing conditional
assembly processing. It must be declared to
have either a global or local sco~e.

o

severity code: A code assigned by the
assemtler to an error detected in a source
module. A severity code can also be
specified and assigned to an error message
generated by th~ MNOTE instruction.

~~ languag~:

The language from which a
statement is translated.

source module: A sequence of statements in
the assembler language that constitutes the
input to a single execution of the
assembler.

* source program: A computer program written
in a source language.
program.

Contrast with object

*

space £!,!aracte~: A normally nonprinting
graphic character used to sepazate words.
Synonymous with blank character. Contrast
with null character.

*

speCial character: A graphic character that
is neither a letter, nor a digit, nor a
space character.

*

statement:
rIn-cOmputer programming, a meaningf ul
expression or generalized instruction
in a source language.
2. See job control statement, linkage
editor control statement, comments
statement, model statement.

*

storage:
1. Fertaining 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.

*

storage allocation:
1; The assignment of blocks of data to
specified blocks of storage.
2. See dynamic storage allocation.

self-defining term: An absolute term whose
value is implicit in the specification of
the term itself.
sequence symbol: A symbol used as a
branching l.tel for conditional assembly
instructions. It consists of a period
followed by one to seven alphameric
characters, the first of which must be
alphatetic.

Significant digit: A digit that is needed
for a certain purpose, particularly one
that must be kept to preserve a specific
accuracy or precision.

source macro definition: A macro definition
included in a source lIDdule. A source
macro definition can be entered into a
program library; it then becomes a library
macro definition.

* routine:
1.

sign ~~: A binary digit occupying the sign
posit1on.
.

Glossary

433

*

storage protection: An arrangement for
preventing access to storage for either
reading, or writing, or both.

substring:

storage stack: Loosely, a pushdown list.

2.

* string:
1.

2.

A linear sequence of entities such as
characters or physical elements.
See bit string, character string, null
string.

A macro instruction operand that
contains one or more entries separated by
commas and enclosed in parentheses.

~st:

* subroutine:
1.

2.

A routine that can be part of another
routine.
See closed subroutine, o~en subroutine.

subscript: One or more elements, enclosed
in parentheses, that appear immediately
after a variatle sylt'bol or character
expression. The value of a subscript
indicates a position in the array or string
of values represented by the variable
symbol or character expressicn.
subscripted &SYSLIST: The system variable
symbol iSYSLIST immediately followed by
either one sutscript or two subscripts
separated by oommas, and enclosed in
parentheses. The value of the first
subscript indicates the position cf a
positional operand in a macro instruction
and the value of the second subscript
indicates the position of the entry in the
sublist of the positional operand indicated
by the first sutscript.
subscripted SET symbol:
A SET symbol that is immediately
followed by a subscript. A subscripted
SET symbol must be declared with an
allowable dimensicn before it can be
used. The value of the subscript
indicates the position of the value
given to the subscripted symbcl in the
array represented by the SET symbol.
2. See also dimensioned SET symbcl.

1.

subscripted symbolic parameter: A syrrbolic
parameter that is irrmediately followed by a
subscript. The value of the subscript
indicates the position of the entry in the
sublist in the macro instruction c~erand
referred to by the symbolic parameter.
substitution: The action taken by the
assembler when it replaces a variable
symbol with a value, for example, during
the expansion of a rracro definition.

1.

(f~
. .",

A character string that has teen
extracted from a character expression.
See also substring notation.

sutstrinq notation: ~ character expression
immediately followed by two sutscripts,
separated by a cOIt'.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 numter of
characters to be extracted from the
character expression.

* switch:

A device or

~rogramming

technique

~making a selection, for example, a

conditional jump.

* symbol:
1.

2.

A representation of something ty reason
of relationship, association, or
convention.
See mnemonic symbol, crdinary symbol,
sequence symbol, SET symbol, variatle
symbol.

* symbolic

address: ~n address expressed in
symbols convenient to the computer
programmer.

* symbolic

coding: Coding that uses machine

instructions~with symbolic addresses.

NCTE: In assembler programming, any
instruction can contain symbolic addresses.
In addition, any other portion of an
instruction may be represented with
symbols, for example, labels, registers,
lengths and immediate data.
symbolic-E~!!~~!:

1.

2.

A vari abl e symbo I dec la red in the
prototype statement of a macro
definition. A symbolic parameter is
usually assigned a value from the
corresponding cperand in the macro
instruction that calls the macro
definition.
See also keyword parameter, name field
parameter, positional parameter.

system loader: See loader (2).
system~£Q_Qefinition: Loosely, a library
macro definition supplied by IB~.

~ys~~!2~ln~!B£.E&!!: Loosely, a macro
1nstruction tnat calls for the processing
of an IBM-supplied library macro
definition, fer example, the ATTACH macro.

system variable symbol: A variable symbol
that always begins with the characters

434

~-.,;.

&SYS. The system variable symbols do not
have to be declared, because the assembler
assigns them read-only values autc~atica11y
according to specific rules.

term:
-1-.--The smallest part of an expression that
can be assigned a value.
2. See absolute term, arithmetic term,
logical term, relocatab1e ter~.
*translate: To transform statements from one
language to another without significantly
changing the meaning.
*truncate: To terminate a computaticnal
process in accordance with so~e rule, for
example, to end ~e evaluation of a power
series at a specified term.
NOTE: In assembler programming, the object
code for data constants can be truncated by
the assembler.
. *twos complement: The radix complement in
binary notation.

iI'"
~

tYFe attribute crt): 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 arith~etic operator
having only one term. The unary operators
that can be used in absolute cr
relecatable, 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-r instructicn.
2.
By an unnamed CSECT instruction, if no
unnamed START instruction appears
bef ore the CSEC'I instruction.
3. By any instruction that affects the
setting of the location ccunter.

* variable: A quantity that can assume any of
a given set of values.
variable symbol: In assembler programming,
a symto1, used in macro and conditional
assembly processing, that can assume any of
a given set of values. It consists of an
ampersand (&) followed 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.
Address space appearing to
the user as real storage from which
instructions and data are mapped into real
storage locations. -rhe 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.

virtual~;!9~:

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:
* ~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 fu1lword, contains 32 bits (binary
digit~ or 4 bytes.
wrap-around: Loosely, the overflow of the
location counter when the value assigned to
it exceeds 224_1

o
Glos~xy

435

((~
~J'

•••

This page left blank intentionally.

Indez
(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
&SYSTIME (system variable symbol) 286
attributes of 287,325
global scope of 279
$
(see dollar sign)
* (see asterisk)
(see minus sign)
/
(see slash)
,
(see comma)
t
(see number sign)
Ql
(see at sign)
(see apostrophe)
= (see equal sign)
+

o

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
defini tion 84
explicit 87
implicit 87
reference 84
re10catable 84
re10catabi1ity of 85
address constant

86

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
sta tement 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 214
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
complex relocatable 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 (al)
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 (5')
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 81,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,112
blank
character 35
in operands 22
opposed to null character
string 298
in self-defining term 50
as special character 34
Bool~an

expression (see logical
expression)
operator (see logical
operator)
boundary (see also alignmen~
166
boundary alignment (see
alignment)
branching
conditional assembly 367
extended mnemonic for 72
machine instruction for 68
buffer area
formatted by a dummy section 121

o

O

li'
].

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 (e)
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 character)
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, GBLB, GBLC 340
LCLA, LCLB, LCLC 336
SETA
343
SETB 347
SETC
345
loop counter 370,372
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 11
line 9,18
control program 101
control section 101
common 124
dummy 121
executable, defined by
CSECT 110,119
START 110,111
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 212
counter
instruction 41
location 41,111
(see also location
counter)
loop
ACTR instruction 310
count attribute (R')
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~)

182

decimal ~,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 41
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 181,116
for floating-point arithmetic 66
in floatinq-point (E,D,L)
constants 191,118
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 81,133
dollar sign ($)
as alphabetical character 34
double ampersand
in character expression 351
in MNOTE instruction 214
in PUNCH instruction 230
in TITLE instruction 226
double apostrophe
in character expression 351
in MNOTE instruction 214
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
w~th 0 duplication factor
204,16
DSECT instruction 121
to continue dummy section 121
external symbol dictionary
entry for 116
to generate external dummy
section 121
to initiate dummy section 121
name in Q-type address
constant 121,200
with USING 140
dummy control section
definition of 121
DSECT instruction for 121

r1\,
~)
.:1

0 ·"

:'.',1

)/

.

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
nXD instruction 130
external symbol dictionary
entry for 116
to generate external dummy
section 127
name in Q-type address
constant 200

121,140

II
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
i(~\
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
,

o

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 addres's
constant 149
opposed to WXTRN instruction 152
for symbolic linkage 147

..

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 (F)
186
halfword (H)
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~)
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 using dummy section 121
DSECT instruction for 121
fraction
in fixed-point constants 186
in floating-paint constants 192
scale modifier to provide
digits for 175-178
scaling attribute to indicate 330
number of digits occupied by
fraction bar V -- 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 operator)
generation (see macro generation)
global
(see also global scope, global
variable symbol)
declaration '340
global scope
of SET symbol 319
of system variable symbols
442

&SYSDA TE
&SYSPARM
&SYSTIME

279'
284
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)
halfword
boundary (see boundary)
constant 186
instructions
hexadecimal
constant (X)
184
digit 49
notation in floating-point
constants 193
self-defining term 49

D
(see integer attribute)
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
inEjtruction
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

ICTL instruction

o

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 attribute)
keyword operand 296
cOmbining with positional
parameters 299
keyword parameter 263
combining with positional
parameters 265

II

o

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 (L')
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
ESO entries for 116
external dummy section
CXO 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
CXO 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 parameter 260,319
system variable symbols
&SYSECT 319
&SYSL1ST 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 expression 360
operators for 360
(see also relational
operator)
logical term
in logical expression 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 pool 215

II
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
S1 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 (L1BMAC)
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
(see also macro generation)
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

0.

0·. ·,".'
,,,

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, abject
module, source mo~ule)

m
N' (see number attribute)
name entry
in assembler language
instruction 21
in conditional assembly
instruction 32
in EQU instruct jon 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)
NOMCALL (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

o
Index

445

m
object code
of addresses 86
of channel command words «CC~
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 assembled 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 DS
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/OS instruction 163,206
entry in assembler language
instruction 22
field 20
format of 22,80
keyword 296
of macro definition 258
of macro instruction 294
positional 294
subfield in DC/DS instruction 163,206
symbolic parameter as 258,260
operand entry 22
address 84
in assembler 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

0:

.. J

Page of GC33-4010·5
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
i
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 macro
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)

C·

0\

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 als 0 in GLOSSARY)

I

Q-con (see address constant,
Q-type)
quoted string 304

iii
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 secti.on 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 NF)
360
between arithmetic expressions 361
between character strings 361
relative address (see
displacement)
re locat abil it Y
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 ~')
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
SE'l'C instruction 345
severity 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 V)
(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 ~llowed with literal 53
operation
string (see bit string, character
string)
sublist
in macro instruction operand 300
in nested macros 312,313

o

o

{

referred to by
subscripted iSYSLIST 300,281
subscripted parameter 300,261
subscript
in iSYSLIST 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 iSYSLIST
in nested macros 31q
reference to positional
operand 281,282
reference to sUblist entry 281,282
subscripts for 282
subscripted character expression
(see substri ng 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 3q4
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 instr~ction 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 instruction 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 symbo1278
iSYSDATE 279
&SYSECT 280
iSYSLIST 281
iSYSNDX 284
iSYSPARM 284
&SYSTIME 287

a
T' (see type attribute)
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 (T')
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

unary operator (+,-)
in absolute and relocatable
expressions 55
in arithmetic expressions J51,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
/1

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

warning messa~e 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

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

":. ,./

450

This page left blank intentionally.

'()

o

GC33-401()'5

-s'
"'T1

z
?

en

w
.....

9

....

~

==-=
=~.
- ---- -- -- -------_.-

--

§ :

:::§~~ /

Technical Newsletter

o

This Newsletter No.
Date
Base Publication No.
File No.
Prerequisite Newsletters

GN20-9372
28 December 1981
GC33-4010-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

A39,140/
""-167-170
/189,190/
./223,224/
/279,280/

,/285,28~
/291,292/
/297,29g/
/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, CaHfornia 95150
~riilted

in U.S.A.

Ci"



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:01 17:08:02-08:00
Modify Date                     : 2012:06:01 22:12:37-07:00
Metadata Date                   : 2012:06:01 22:12:37-07:00
Producer                        : Adobe Acrobat 9.51 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:2eba834b-56a7-452e-ae30-451628b67fcf
Instance ID                     : uuid:ab831c19-3b98-40ed-b8ad-3a90d56aa6b4
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 468
EXIF Metadata provided by EXIF.tools

Navigation menu