GC24 9002 5_360 20asm_Apr70 5 360 20asm Apr70

GC24-9002-5_360-20asm_Apr70 GC24-9002-5_360-20asm_Apr70

User Manual: GC24-9002-5_360-20asm_Apr70

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

DownloadGC24-9002-5_360-20asm_Apr70 GC24-9002-5 360-20asm Apr70
Open PDF In BrowserView PDF
F1le No. S360(Mod.20}-2l
Form GC24-9002-S

Systems Reference Library

IBM System/360 Model 20
Disk and Tape Programming Systems
Assembler Language
rhis publication pr~vi~es the information enabling the
programmer to ~rite prograns in the IBM System/360
Model 20 OP5/rp5 Assembler language and the macr~
language.
The ~o~el 20 Assembler language allo~s the use ~of
mnemonic operation codes and symbolic representations
of storage addresses and other values. A pro~ra~ i3
written in symbolic language; This program is processe~ by the DPS/rps ~ssenbler pr~gr3m, which rea3s
the symbolic statements and produces a program in
machine language.
By means of the macro language, the programner can
considerably the amount of repetitive co3ing
require3 for routines used frequently within a given
program or in many different programs. rhe progra~ner
must co~e the routine ~nly once an~ inclu3e it in the
macro library. He ~rites a macro instruction at the
point in the source pr~gran ~here the routine is
require~.
During assembly, the Assembler reads the
macro instruction, extracts the routine from the
library, and inserts it in the object progra~. rhe
programmer can cause the ~ssenbler to tailor the routine to fit the particular problem program by specifying the appropriate symb~lic operan3s in the macro
instruction.
re~uce

rhe rea3er of this publication should be familiar
with basi= programming concepts and ~ith the operating
principles of his system as 3escribe3 in the appropriate SRL publicati~ns. F~r a list of pertinent publi=ations see ~~~_~Y2£~~!~~Q_MQg~!_~QL_~!2!!QgE~ehl' F~rn
GA26-3565.

DPS
TPS

This is. a maj~r revision of, and obsoletes,
Newsletters G~33-9059 and 3~33-9076.

GC2q-9002-4

and

fechnical

Min~r
b~n

changes have been made throu~hout the text. Many sections have
rearran3e1 to impr~ve readability.
rherefore, the table of
contents should be studied carefully.
A secti~n ~n Pl3nned Jverlay
Structure has been ad:ie~. :'hangf'!'> to thf' text and small changes to the
illustrations are indicated by a vertical line to the left of the
change: changed or ~dded illustrations are denoted by the symbol • t~
the left ~f the caption.
rhis edition applies to release 9 ~f IB~ Systen/~60 Model 20 DPS, t~
release 13 ~f IBM System/360 Model 20 TPS, and to all subse~uent
releases
until otherwise indicated in new editi~ns ~r re=hnical
Newsletters.
Changes are c~ntinually maje to the specifications herein. before using
this ppblicatiQn in connection ~ith the operation of IB~ systems,
consult the l~~st IB~ Systeml360 Model 20 SRL Newsletter, F~rm
GN20-0361, for ~e editions that are applicable and current.
This publication ~as prepared f~r pr~ducti~n using 3n IB~ co~puter t~
update the text and to =ontrol the pa3e and line f~rmat.
Pa3e
impressi~ns
f~r
photo-offset printin3 were obtained from an IBM 1~03
Printer u3ing a special print chain.
Requests for c~pies of IB~ publications should be made to your
representative or to the IBM branch ~ffice serVing your loc3lity.

A

IB~

reader's conments is provided at the back of this
If the form has been removed, comments may be addressed t~
IBM Laboratories, pro9ram~ing Publications, 703 Boeblingen/3ermany,
P.O. B~x 210.
form

for

pubiicati~n.

~ ~~nvrinht IB~ Gprmanv 1966. 1967
C ~~pyright International Business ~achines corporation 1967, 1969, 1970

Contents
Asselllbler Language - Introduction

5

Types of ~ssembler-Language
statements
• • • • •
Character Set • • • • • • • • • •
Major ~ssembler Language
Features
• • • • • • • ••
operating Environment • •

Assembler Language Coding
Conven tions . . . . . . . . . .

5
7
7
7

Description of Conventions
Summary of Coding Conventions

8
8
9

Terms and Expressions . .

12

Terms • • • • • • • • • • •
12
self-Defining Terms • • •
12
Assembler Program Defined -Terms
13
Expressions • .. • • • • • •
15
Evaluation of Expressions
• • 15
Absolute and Relocatable
Expressions • • • • • • •
• 16

Maohine Instruotions

AI

Object Format of Machine
• • • •
Machine-Instruction Alignment • • •
Machine-Instruction Mnemonic Codes
Extended Mnemonic Codes. • •
Machine instruction Operanjs
•
Operand Fields and Subfields • •
Explicit and Implicit ~ddressing ..
Explicit ~ddressing .. • .. _ •
Implicit Addressing • • • • •
Explicit and Implicit Lengths • •
Examples • • • • • • • • .. • • • •
Types and Functions of Macnine
Operations ... • '. • • .. .. .. • .. •
Binary Arithmetic Operations • •
Machine Formats of Instructions
for Binary Operations .. •
Binary ~rithmetic Error
Conditions . . . . . . . . . ..
Instructions for Binary
Arithmetic • • • ... .. • • • •
AR -- Add Register
•
SR -- Subtract Register •
•
STH -- store Half~ord • •
•
LH
Load Halfwor:i • • • • • • •
CH -- Compare Halfword • • • .. •
~H -- ~dd Halfwor:i
•
SH -- Subtract Halfword • • • • •
Decimal ~rithmetic Operations • •
Condition Code after Decimal
Operations • • • • .. .. •
Decimal ~r~thmetic Error
Conditi~ns
• • • • .. • •
Instructions for Decimal
Arithmetic . . . . • .. .. .. ..
•
MVO -- Move with Offset.
•
PACK -- Pack • • • • • •
UNPK -- Unpack • • • • ..
•
ZAP -- Zero and Add Packed
cp
Compare Decimal Packed
AP
Add Decimal Packed
SP
Subtract Decimal Packe:i
MP
Multiply Decimal Packed
DP
Divide Decinal Packed
Logical Operations • • • • •
Instructi~ns

0

17
17
17
11

t8
18
18
19
19
20
20
21

Machine Formats of Instructi~ns
for Logical Operations
Condition Code After Logical
Operations • • • • • • •
Instructions for Logical
Operations • • • • • • •
MVI
Move Immediate •
MVC
~ove Characters
MVZ
Move Zones • • •
MVN
Move Numerics
CLI
Compare Logical Immediate
CLC
Compare Logical
Characters • • • •
•
ED
Edit....
NI
~nd Immejiate
01
Or Imme:iiate
TM
Test Under ~ask
HPR -- Halt anj Proceed •
TR -- Translate • • • • •
Branch Operations. • • • • • • •
Machine Formats of Instructions
for Branch Operations • .
•
Error Conditions • • • •
•
Instructions for Branch
Operations • • • • • • •
BCR -- Branch on ~ondition
Register • • • • • • • •
• •
BC -- Branch on Conditi~n
BASR -- Branch and
Store/Register • • • • •
BAS -- Branch and Store •
SPSW -- Set PSW • • • .. •
Input/Output Operations •

. Literals . . . . . . . . .
Lite~al

22
22

23
23
24
24
24
25
25
25
26
26
26
27
27
28
28
28
29
29

30
30
31
31
32
33

Pool

34
34
35
35
35
35
36
36

37
37

39
39
40
40
41
41

42
42
42
42
43

43
44
44
45

46
• • 46

Assembler Instruotions
Sy.f[ibol-Definition Instruction.
EQU -- Equate Symbol • • • • • •
Data-Definition Instructions
DC -- Define Constant • • • • • •
DS -- Defi·ne Storage .. • • • • •
DCCW -- Define Channel ~onmand
Worj • • • • • • • • • • • •
Program Sectioning and Linking
Instructions • • • • • • •
••
Control Sections • • • • • • • •
START -- start ~ssembly • • • • •
CSECT -- Ijentify Control
Section • • • • • • • • •
Dummy Control Sections
DSECT -- Identify Dummy Secti~n •
Symbolic Linkages
ENTRY -- Identify Entry-Point
Symbol . • • • • • • • • • • • •
EXTRN -- Identify External
Symbol
• .. .. • • • • •
~ddressing an External Control
Section • • • • .. • .. .. •
• •
Base Register Instruction
Statements • • • • • • • •
..
USING -- Use Base Address
Register . . . . . . . . . ..
DROP -- Drop Base Register
Programning Example • • ..
Listing-Control Instruction
Statements . . . . . . . . . . .

47
47
47
48
48
52
54

54
54
55
56
57
57
58

58
59
59

60
60
62
62
63

TITLE -- Identify Assembly

Output

•• • • ~ • • •
63
EJECT
start New Page
• • • 63
SPACE -- Space Listing
• • 64
PRINT -- Print Optional Data
64
Program-structure Control
Instructi~ns

••••••
REPRO -- Reproduce Follo~ing
Statement • • • • • • • • • • • •
XFR -- 3enerate a fransrer Card •
ORG -- set Location counter •
LTOR3 -- Begin Literal Pool • • •
END -- End Assembly • • • • • • •

65
65
65
65
66
66

Planned Overlay Structure . .

67
Overlay Using the FETCH Macro • • • 67
Coding of Phases without
Subphases • • • • • • • • • • • • 67
Coding of a Phase ~ith Subphases 68
Overlay Using the LOAD Macro • • • 69

Macro Instructions

.. 70

Macro-Instruction Format

71

positional Macro Instructions • • 71
Keyword Macro Instructions
• 72
Assenbly of ~acro Instru~tions • 74

Macro Language . . . _ . .
Positional Macro Definitions
MACRO -- Header statement •
Prototype statement •
Model Statements

•

•

75

• 75
75
• • 75
•

•

0

'O.

•

•

•

•

•

•

•

•

~

I'll'

.:II
"' .....

D .. f t f":::1t ..
.:11 ....
........
tal

.......

(DPS/TPS)

· .104

Job Control Statenents
Program Control statements

AWORK

=~

Assembler

• .105

• .105

W~rkfile

Statement • • • • • • • •
• .105
AOPTN (Assembler Option)
Statements
~. ~ • • ~
~ .106
ICTL -- Input Format :ontrol
• • 107
ISEQ -- Input Sequence Checking .107

Cataloging a Macro Definition 108
Job Control Statements (DPS)
Job Control statements (TPS)
Program Control State~ents

• • • 108
• • • 108
.108

Output Listings. . . . .

.109

Language Compatibility.

.110

Glossary. . . . . . . . . .

.111

APPENDIX A. MACHINE-INSrRJCrION
MNEMONIC CODES

.122

APPENDIX B.
r;'ORMAT

.124

........·
MACHINE-INSTRUCTION
........ .·

APPENDIX C. ASSEMBLER INSfRUCTIONS 126

76

APPENDIX D.

80
80
81
83
85

APPENDIX E. SUM~~RY OF MA:RO
LANGUAGE
• • • • • • • • • • • • • 128
Expressions in MacrJ Language
.128
Name an~ Operanj Fielj of
Instructions
••.••
• • • 129
Symbolic Parameters an~ Variable
Symbols in Expressions
• • • • • • 130
IBM-Supplied ~acro Definitions • • 131

Conditi~nal-Assembly

Instructions
••••
• • • ..
SET Variable Symbols
SETA
SET_Arithmeti~
SETC -- SET'Character
SETB -- SET Binary
• •
Sequence Symbols
•• • • • • • •
AIF -- :onditional B~anch
• •
AlFB -- Conditional Branch
Backwar~
. • • • • • • • • • • •
AGO -- Unconditional Branch
•
AGOB -- Unconditional Branch
Backward • • • • • • • •
•
ANOF -- No Operation • • • •
MEXIT -- Macro Definition Exit •
MNOTE -- Request for a Message •
MEND -- Trailer statement
••
Keywor~ Macro Definitions • • • • •
System Var iable Symbols • • • •
&SYSNDX -- Macro Instruction
Index • • • • • • • • • • • • • •
&SYSECT -- Current Control
Section
~
&SYSLISTCn) -- Macro
Instruction Operan~ Fiel~
· .
Sample Macro Definition • •
• •
In-Line Use of the GMOVE Macr~
Instruction • • • • • •
Reserving Space in the
Destination Fielj • • •
• .
Use of the Subroutine Facilit~
of the GMJVE Macro Definition • •
Main-Storage Considerations for
GMOVE Subroutines • • • •
•
Error CheckinJ • • • • •
Use of Global SET Sy~bois
wi thin the 3M.OVE Macro
Definition
• • • •

i i j au ....
••• lo.l.., ..
A.••

_

88
89

90
90
91
91
92
92
93
93

94
94
95

96
97
97
98
98
99
99
99

SUM~ARY

OF :ONSTANrs

APPENDIX F. ASSE~BLER
FEATURES
• • • . • .

.127

L~N3J~GE

. .132

APPENDIX G. OUTPUT LISfINGS
(ASSEMBLER AND MMAlNr)
• • 135
Assembler ProJra m • • • . •
..135
Macro Maintenance Program • . • • . 138
APPENDIX H. ASSEMBLER DIAGNOSfIC
MESSAGES
• • • • • • • • • • • • • 139
APPENDIX I. DIAGNOSTIC MESSAGES
OF THE MACRO ~AINTENANCE PROGRAM

.145

APPENDIX J. CHARACTER CODES • • • • 147
APPENDIX K. MINIMUM AND MAXIMUM
SYSTEM CONFIGURATION • • • • • • • 153
Minimum System Configuration • • • 153
Maximum System Configuration • • • 153
APPENDIX L. HEXADECIMAL-DECIM~L
NUMBER CONVERSION TABLE • •
• .155
APPENDIX ~. SA~PLE PROGRAMS
DPS Assembler LanJuage Program
TPS ~ssembler Language Pr:>gran

Inde:.: . . . . . . . .

· .161
• .161
• .188
.189

Assembler Language - - Introduction

computer programs may be expressed either
in machine language, i.e.~ language directly interpreted by the computer, or in a
symbolic language which is nore meaningful
to you, the programmer. The symbolic language, however~ must be translated into
machine language before the computer can
execute the program. 'rhis is the function
of translator programs such as the
Assembler.
Of the various symbolic programming lanAssembler languages are cl~sest t~
machine language in form and content.
guages~

The Assembler language discussed in this
manual is a symbolic programming language
for the IBM system/360 Model 20.
It
enables you to use all IBM System/360 Model
20 machine functions as if you were coding
in system/360 Model 20 machine language.
The Assembler program translates or pr~­
cesses (assembles) Assembler-language programs int~ machine language for execution
by the computer.
A program written in the
Assembler language and used as input to the
Assembler program is called the ~Q~E£~_E~Q=
~!~~L the machine-language program produced
as output from the Assembler program is
called the Q~i~£~_E!~!~~.
The translation
or processing procedure performed by the
Assembler program to produce the object
program is called ~§§~~Qli!!~ or ~§§,~~Qby.

rhere are two outputs from the assenbler
run.
The first is an object pr~gran consisting of actual machine instructi~ns
corresponding to the sour~e progran statements written by you.
rhe object program
is punched either into cards or it is written on magnetic tape or on disk.
rhe second output is a program listing
or assembly listing.
~his docunent shoNS
the original source pr~gran statements side
by side with the object program instructions created from them.
Many programmers
work from the assembly program listing as
soon as it is available, hardly ever referring to their coding sheets again.
An
example is shown in Figure 2. rhis figure
is explained below.
(Proceeding from right to left):
a.

The items listed under A should be
exactly the same as the handwritten
entries on the coding sheet.
rhis provides a good check on the accuracy ~f
the keypunching.

b.

rhe items under B are a re?resentation,
in hexadecimal notati~n, of the c~rres­
ponding instructions and c~nstants.

c.

C shows the addresses (in hexadecimal
notation) of the instructi~ns, ~on­
stants, and areas of storage specified
by you.
For more details see ~p?endix

The entire process is illustrated in
Figure 1~ The Assembler program is supplied by IBM.

TYPES OF ASSEMBLER-LANGJA3E

Programmer
Statements'

An assembler-language program nay cJnsist
of up to four types of statements:

Model 20

Figure 1.

srArE~E~rS

Schematic Representation of the
Assembly Process

•

machine instruction statements (hereafter called machine instructions)

•

Assembler-instru~tion

•

macro-instruction statements (hereafter
called macro instructiJns)

•

comments statements (hereafter called
comments).

statenents
(hereafter called Assembler
instructions)

Assembler Language --

Intr~du~tion

5

OBJECr CODE
B

LOCATN
C
~,

"

ADDl A.DD2 STMT

SO(JR~E

S"rATEMENr
A.
A

...

...

Oloe 4880 B020

0122

0001
SrA.Rr 256
0002 BE3IN
B!\'SR 11,0
0003
USING *,11
L:)!-\D RE:;rSTER 8
0004
8,DA.rA.
LH
0005
8 , rEN
A.DD 10
A.H
0006 * rHE F:)LLOiVING :)PERArI:)N ;1ILL Y10LrIPLY BY 2.
8,8
0007
~R
8,DArA+2
0008
SH
NJTE RELA.fIVE A.DDRESSIN3

I, 1\ (') 1\

nl'\,)11

1\1,)£

1\1\1\0

0114 4890 B026
0118 4A.90 B028

0128
012A.

011C 47FO 00C2

00C2

0010
LH
9,BIN1
0011
9, BIN2
A.H
0012 * THE NExr MA.CRO INsrRo:::rION
0013 * ;.JILL CA.LL rHE END :)F J:)B MA.CR).
E:)J
0014
0015+
15,194(0,0)
BC
0016 *
H'25'
0017 DArA.
DC
0018
H'15'
D:
H'10'
0019 rEN
DC
0020 RESULr DS
H
0021 BINl
H'12'
DC
H'78'
0022 BIN2
DC
0023
BE3IN
END

0100
0100 ODBO
0102
0102 4880 BOlE
0106 4l\80 B022

0120
0124

010A. lA.SS
1\1 1

1\

V..L..LV

0120
0122
0124
0126
0128
012A
0100

..,VOV

UV.L...,

V..L.L.v

0019

OOOF
OOOA.
000:::
004E

Figure 2.

A.ssembly

Listin~

VVV.;l

coTta

"-'..L

L~

0

U

I

OC'COr-lTTt

L'"\..L:.IvU.LA..L.

Produced by the A.ssembly of the Program

Predefined mnemonic codes are provided
in the A.ssembler language for all machine
instructions, A.ssembler instructions, and
IBM-supplied macro instructions. Additional extended mnemonics are provided for the
various forms of the Branch-on-Condition
machine instruction.
rhe Assembler language provides for the
symbolic representation of any addresses,
machine components (such as registers), and
actual values needed in source statements.
Also provided is a variety of forms of data
representations: decimal. binary, hexadecimal, or character representation. You
can select the representation best suited
to express a given data item.
Machine instructions: Machine instructions
are-one=£;=one-representations ·of System/
360 Model 20 machine instructions. The
Assembler produces an equivalent machine
instruction in the object program for each
machine instruction in the source program.

•

program sectioning and linking,

•

data storage field definition, and

•

controlling the !\.ssembler
itself.

progra~

with a fe~ excepclons i Assenbler
instructions do not result in the generation of any machine-language code by the
A.ssembler program.
Macro instructions: Macro instructions
cause-the-Assembler to retrieve a coded
symbolic routine, called nacro jefiniti~n,
from the macro library, modify the routine
according to the infornation in the nacro
instruction, a.nd insert the modified routine into the source program for translation into machine language. IB~ supplies
macro definitions (mainly fOr input/output
operations) as part of the nacr~ library.

~~~~~Ql~r_irr~~£~£~iQg~:
Assembler instructions specify auxiliary functions to be
performed by the ~ssembler program in addition to its function of translating. These
auxiliary functions assist you in

You may also define your own nacro
definitions and refer to them throu~h macro
instructions which you define yourself.
These definitions and statements are
defined according to the nacro language and
are processed by the A.ssenbler in the same
manner as the IBM supplie~ macro definitions. rhe macro language is described
also in this publication.

•

checking and documenting programs,

:::omments:

•

controlling storage-address assignment,

of your program, what you inten1ed to be

6

Comments allow you to state, for

your-o~n reference or for any other reader

done in the particular instruction.
Your
comments should be as precise as possible.

g~!Q£~~~Qi!i~i:

rhe object prograns proby the Assembler may be in a format
enabling relocation from the originally
assigne~ storage area to any other suitable
area through the Linkage Editor Program.
duce~

CHARACTER SET
Assembler-language statements may be written using the following alphabetic, numeric, an~ special characters:
~!Eh~Qg~!~_£h~E~£~~E~:
29 characters are
classified as alphabetic characters. These
include the characters @~ n, and $ as well
as the characters A through Z.
The three
additional characters are included so that
the category can accommodate certain nonEnglish languages.
(The printer graphic
may vary according to the national character set.)

~E~£i~!_£h~E~£~~E~:

blank

+ -

,

= •

* ( )

II

&

These letters~ digits, and special
characters are only 51 of the 256 EB~DI~
(Extended Binary-Coded Decimal Interchange
Code) characters. Each of the 256 characters (including the 51 characters above)
has a unique card punch co~e.
~ost of the terms used in Assemblerlanguage statements are expressed by the
letters~ ~igits. and special characters
shown above.
However, such Assemblerlanguage features as £h~E~~~~E_~~!f=
g~fi~!Q~_~~E~~ and £h~!~£~~E_£QQ~~~~~~ permit the use of any of the 256 card codes.
Appendix J shows the 256 EBCDIC character
codes.

MAJOR ASSEMBLER LANGUAGE FEATURES
~EQgE~~_~i~~ig~~:

A listing of the sourceprogram statements and the resulting
object-program statements is produced by
the Assembler for each source program it
assembles. You can partly control the form
and contents of the listing (see Figure 2).
Error Indications:
As a source program is
assembled;-It-Is-analyzed for actual or
potential errors in the use of the Assembler language.
Detected errors are indicated
in the program listing.

~~£~!QQ!Q~_~Q~_~!Q~!~~:
rhe Assembler language anj program provi~e facilities for
partitioning an Assembler-language program
into one or more parts called control sections.
Because control sections do not
have to be loa~e~ contiguously in main
storage# a sectione~ program may be loaded
and execute~ even though a continuous block
of storage large enough to accommo~ate the
entire program is not available.

The linking facilities of the Assembler
language an~ program allow symbols to be
defined in one assembly and referre~ to in
another, thus effecting a link between
separately assembled programs.
rhis permits you to reference jata andlor transfer
control between programs.

OPERATIN3 ENVIRONMENT
The Assembler program is either tape- or
~isk-resi~ent.
The TPS Assembler program
operates un~er control of the rps Basic
Monitor program and the DPS Assembler program un~er the control of the JPS Monitor
program.
Appendix K contains the minimam
and maximum system configuration.
For the TPS Assembler progran, the
Assembler control car~ an~ the associated
source-program input must be read on a car~
reading ~evice.
rhe object program may be
punched into cards or written onto tape.
For the DPS Assembler progran, the
Assembler control car~ an~ the associate~
source-program input may be read on a card
reading jevice or, in car~-image format,
from a magnetic tape.
rhe object program
is placej in the Relocatable Area on the
system disk pack an~, in ad~ition, nay be
punched into cards or written onto tape.
The absolute or relocatable object program will then be processed as jescribe~ in
the Model 20 SRL publications describing
the DPS and TPS Control and Service Programs (Form numbers GC2~-9006 and
GC24-9000, respectively).

Assembler Language -- Introduction

7

Assembler Language Ceding Conventions

This section discusses the 3eneral coding
conventions associated with use of the
~ssembler

language~

The above statement boundaries nay be
altered by means of ~he I2TL (Input Fornat
control) statement discussed lat~r in this
publication.

DESCRIPTION OF CONvENTIONS

A source program is a sequence of source
statements punched into cards. rhe statements may be written on the standard IBM
coding form, X28-6509 (Figure 3). One line
of coding on the form is punched into one
card. The vertical columns on the form
correspond to card ~olumns.

Statements may consist of one to four
entries in the statement field. rhese
entries are, from left to right: name,
operation, operands, and comments. rhe
entries must be written in the order stated
and separated fron each other by One ~r
more blanks.

Space is provided at the top of the form
for program identification. You can also
give instructions to the keypunch operator;
any character code that does not have a
corresponding printer graphic can be
assigned any special graphic to identify
the code to the keypunch operator, who can
then punch the corresponding card punch
code wherever he encounters the special
graphic.
(See under £h~£~££~£_§~£ for the
representation of the valid character codes
that can be used in a source program.)
Neithe~ the program information (Program,
Programmer~ Date etc.)
nor the instructions to the keypunch operator are punched
into a card; they are for your own use.

The coding form is ruled to provide an
eight-character name field, a fivecharacter operation field, and a 56character operand andlor comments field.

The body of the form is composed of two
fields:
the statement field, columns 1-71,
and the identification-sequence field,
columns 73-80. The identification-sequence
field is not part of a statement.

Source statements are normally contained in
columns 1 - 71 (statement field) of the
statement lines. However, macro instructions (and only those) may be continued in
columns 16 - 71 of as many continuation
lines as required. Therefore, columns 1,
71, and 16 are referred to as the "begin",
"end"~ and "continue" column, respectively.
If a macro instruction line extends
beyond column 71 it is to be continued on
the next line. This is indicated by a continuation character in column 72. The continuation character may be any non-blank
character and is not considered part of the
statement coding. The columns of the continuation line preceding the continue
column, columns 1-15, must be blank.
8

If you wish, you may disregard boundaries and write the name~ operation,
operand, and comment entries in other positions, subject to the following rules:
1.

The entries must not extend beyond statement boundaries (either the conventional boundaries, or the ones you have
designated by means of the IcrL
statement).

2.

rhe entries must be in proper sequence,
as stated above.

3.

The entries must be separated from each
other by one or more blanks.

4.

If used, a name entry must be written
starting in the be3in colunn.

A description of the name, operation,
operands# and comments entries folloRS:

~~~~:

rhe name (also called label) is a
symbol you create yourself to ijentify a
statement or to represent an address or an
arbitrary value. Whether a name entry is
required, optional, or not pernitted
depends on the particular statenent.
rhe symbol must consist of eight characters or less; it must be entere~ with the
first character appearing in the be3in
column. If the begin column is blank, the
~ssembler pro3ram assumes no nane has been
entered. No blanks must appear within the
symbol.

QQ~E~~Qg:
The operation is a mnenonic
code s~ecifying the machine operation or
Assembler function desired.
An operation
entry is mandatory and must start at least
one position to the right of the begin
column. Valid mnemonic operation codes for
machine and Assembler operations are contained in Appendixes A and 2 of this
publication.

Valid operation codes of your selfdefined macro instructions must be alphameric and must not be longer than five
characters~
The leftmost character must be
alphabetic. special characters and/or
embedded blanks are not permitted.
QQ~~~gg~:

Operands identify and describe
data to be acted upon by the instruction;
they indicate such things as registers~
storage locations, masks, storage-area
lengths, or types of data.
Depending on the needs of the instruction, one or more operands may be written.
Operands are required for all machine
instructions.
Operands must be se~arated from each
other by commas.
No blanks are permitted
between operands and the se~arating commas.
Symbols app,earing in the operand field
of a statement must be defined.
A symbol
is considered to be defined when it appears
either in the name field of a statenent or
in the ,operand field of an EXTRN statement.
The o~erands must not contain embedded
blanks.
However, if character re~resenta­
tion is used to specify a constant, a literal~ or immediate data in an operand~ the
character string may contain blanks.
Comments: comments are descriptive items
of-information about the program that are
to be inserted in the program listing. All
valid characters including blanks (see
£h~!aC~~E_§~~) may be used in writing a
comment. The entry must not extend beyond
the end column (column 71), and at least
one blank must se~arate it from the
operand.
An entire line may be used for a comnent
by placing an asterisk in the begin column.
Extensive comments entries may be written
by using a series of lines with an asterisk
in the begin column of each line.
In statements where either an optional
operand is omitted or an operand is not
permitted but a comments entry is desired,
the absence of the operand must be indicated by a comma preceded and followed by
one or more blanks, as follows:

r-------T----------T----------------------,
I Name
10peration
lo~erand

1

~-------+----------+----------------------~
Il _______ L1END
I______________________
,
comment
__________ L
J1

~~~~~~~gt_§~~~Q!~:

The following eKam~le
illustrates the use of nane, operation,
o~erand, and comments entries.
~n ~dd
instruction has been named by the synbol
ADD; the operation entry (AR) is the nnemonic for a register-to-register add operation, the two operands, eight and nine,
designate the two general registers.
rhe
comments entry will renind you that you are
adding "new sum" to "old" with this
instruction.

r------T-----------T----------------------,
1Operation 1Operand
1

I Name

f------+-----------+----------------------~

ADD
NEW SUM TO OLD
lI ______
LI~R
___________ L18,9
______________________
J1

Figure 3 shows an example entered on the
standard coding form.
Since, in this
example, the keyboard is assuned not to
have a graphic for the character code >,
the character code & has been chosen as a
substitute.
rhis is indicated to the keypunch operator on the coding sheet.

The identification-sequence field of the
cbding form (columns 73 -- 80) is used to
enter program identification and/or
statement-sequence characters.
rhe entry
is optional.
If the field, or a portion of
it, is used for program identification, the
identification is punched by the user in
the statement cards, and re~roduced by the
~ssembler in the ~rinted listing of the
source program.
To aid in kee~ing source statements in
order, you may code an ascending se~uence
of characters in this field or a portion of
it. These characters are punched into
their respective cards.
During assenbly,
you may request the ~ssembler to verify
this sequence by the use of the ISE~ (Input
Sequence Checking) statement.
rhis
instruction is discussed later in this
publication.

SUMM~RY

OF CODIN3 CJNVENTIONS

The "begin", "end", and "continue" colunns
are 1, 71, and 16 respectively unless the
statement boundaries are altered by neans
of an IcrL instruction.
Assembler-Language 20ding :onventions

9

All entries must be contained within the
designated begin and end column boundaries.
The entries in a statement must al~ays be
separated by at least one blank and must be
in the following order: name, operation~
operand(s), comment.
Depending on the particular statement, a
name entry is either required~ or optional,
or not permitted. Every statement, with
the exception of comments statement,
requires an operation entry. Operand
entries are required for all machine
instructions and most Assembler instructions. comment entries are optional.

10

The name and operation entries m~st not
contain blanks. Operand entries must n~t
have a blank preceding or foll~Ning the
commas that separate them.
A name entry must always start in the
begin column.
20lumn 12 must be blank~ except for
macro instructions, for which a continuation pun~h may be placej in col~mn 72.

..
PIIOGIAM

--.0
1

"f0

"'FIRST
lOUR HAl«

-

•

YE

10

DATE

...

."....

NYC

"

..

20

TN EIRI~

.

a.--

INSTRUCTIONS

~

I>

GlAPHIC

PUNCHING

j

IE

.....eH

IMGI

1
1

I

01'

c_
30

:IS

UE ~.

CO NT EN TS

I'u IPL Ilc Ir T

A.

40

50

OS

f:R Of.4

66

55

H~

R&

-

l~fLlCllO~

STATEMENT-

65

TO

71

n

s..-

*
10

Iris A. CO ~IH ENT

~

TU II.S

'It

ull! iA~ IANIn

IAI:lIE

I/')I~

l6R El6I~

lIN

'HA II IN 1ST

I ..

1.... 1-

I

form, 11M electro 6SfJ9, it oWi11ab1e for p.lftChine toUf'(:e stotemenb ffIOIII this r...
-........ Ior ...... thls _ ... ;oany
_ _ I.
_ _ _ cone...;.. th. _ .. 11M ~;..,.~..
~ 232. Son ...... Calilorn.. 95114.

• A ~ card

IIMS~""""""'Io

Figure 3.

N>I_.

Co:ling Form
~ssembler-Language

:oding

~onventions

11

Terms and Expressions

An operand is composed of one or more
~~ef~22!QQ.2, which" in turn, are composed
of a ~~£~ or an arithmetic combination of
terms.
Terms anj expressions are used in
to define storage locations. genII. operands
eral registers~ immediate data, or constant
values.

Terms
All terms represent a value. This value
may be assigned by the Assembler program
(symbols, symbol length attribute, Location
Counter reference) or may be inherent in
the term itself (self-defining terns).
Terms are classed as absolute or relocatable. They are absolute-or-relocatable
accordIng to the effect of program relocation upon them.

Self-defining terms are classed as absolute terms since the value they represent
does not change upon program relocation.
Q~!!l9._§.~lf=-Q~f!.!l!'!:!9._!~f~§':
Self-defining
terms are the means of specifying n~chine­
language binary values or bit configurations without equating the value to a
symbol.

Self-defining terms nay be used to sgecify such program elements as inmediate
data, masks, registers, and addresses. rhe
type of term selected (1ecimal. hex~decim­
aI, binary, or character) depenis ~n ~hat
is being specified.
Self-defining terms are not to be confusej with jata constants or literals.
When a self-jefinin~ term is usej in a
machine instruction, its value is asse~blej
into the instruction. when-a-jata constant
or literal is specifiej in the operand of
an instruction, its ajdress is assenblej
into the instruction~------

Program relocation is defined as:

•

either reassembling the program with a
different starting address
or relocating the progran - by neans of
the Linkage Editor Program - to storage
locations other than those originally
assigned by the Assembler program.

A term is absolute if its value does not
change upon relocation. A term is relocatable if its value changes by n when the
program is relocated Q. bytes away from the
location where it is first assembled.
The section below discusses each type of
term and che rules for its use.

Limitations on the value of the term
depend on its use. For example, a decinal
term that designates a general register
should have a value between 8 and 15 inclusively; one that represents a jisplacement
should not exceed 4095.
Q~£!m~l_~~lf~Q~f~rr~~g_r~f~:
~ jecinal
self-defining term is an unsigned jecimal
number written as a sequence of decinal
digits. High-order zeros may be usej.
~ decimal term must not consist of mOre
than five jigits, or exceed 32,767 (2 15 _1).
~ decimal term is assembled as its binary
equivalent.

Some examples of decimal self-jefining
terms are: 8, 147, 4092, 00021.
SELF-DEFINING TERMS

A self-defining term is one whose value is
inherent in the term. It is not assigned a
value by the Assembler program. For
example, the decimal self-defining term 15
represents a value of fifteen.
rhere are four types of self-defining
terms: Q~£!~~!' h~!~Q~£~m~!, ~!~~~~, and
character. Accordingly, we speak of dec inaI;-hexadecimal, binary, or character
representation of the machine-language
binary value (or btt configuration) a term
represents.
l:l

ff~~~~~£~~~l_§glf=-~~f!'Qi~~_I~E~:
A hexadecimal self-defining term is an ~nsigned
hexadecimal number written as a sequence of
hexadecimal digits. The digits must be
enclosed in apostrophes and precedej by the
letter X; for exa~ple, K'249 1 •

Each hexadecimal digit is assenbled as
its four-bit binary equivalent. Thus, a
hexadecimal term used to represent an
eight~bit mask woulj consist of two hexadecimal digits. The naxinun value of a hexadecim~l term is X'7FFF'.

The heKadecimal digits and their bit
patterns are as follows:

r------T---------T------T---------,
I Hex
I
I Hex
I
I

character term.
In addition, any of the
256 punch combinations (shown in AppendiK
J) may be used in a character self-defining
term.
Examples of character self-defining
terms are as follows:

I Dig. I Pattern I Dig. I Pattern I

t------+---------+------+---------i
I 0
I 0000
1 8
1 1000
,
I
I

I

1
2
3

I

4

I
I

5
6
7

I

I
I
I
I
I

I
I

0001
0010
0011
0100
0101
0110
0111

I

I

1
I
I
I
I

9
A
B
C
D
E
F

I
I

I
I

I

I
I

1001
1010
1011
1100
1101
1110
1111

I
I

I

1
I
I
I

L______ ~ _________ ~_-----~---------J

A table for converting hexadecimal t~
decimal representations is provi1e1 in
Appen1ix L.
A hexadecimal self-defining term that is
not specified as a complete byte is
assembled as one byte.
rhe specified bits
are assembled right-justified, and the portion of the byte not specified is padded
with binary zeros.
For example, X'~' w~uld
be assembled as 00001111.

::::'/'
::::'A'

'""

,

( blank)

e'l'

Because of the use of apostr~phes in the
Assembler language and ampersands in the
macro language as syntactic characters, the
following rule must be observed when using
these characters in a character tern:
For each apostrophe ~r ampersand desire1
in a character term, two apostr~phes ~r
ampersands must be written.
For eKample,
the character value ' would be written as
C"" and the value & as ::::'&&'.
The character is assembled as its eightbit code equivalent (see Appendix J).
rhe
two apostrophes or ampersands that nust be
used to represent an apostrophe or an
ampersand are assemble1 as one apostr~phe
or ampersand.
ASSEMBLER PROGRAM DEFINED rERMS

~i~~!y_~~lf~Qgf!~!~~_!g!~:

A binary selfdefining term is written as an unsigned
sequence of ones and zeroS enclose1 in ap~­
strophes and preceded by the letter B.
F~r
example, B'10001101'.
rhis term would
appear in storage as shown within the apostrophes and occupy one byte.
A binary term
may have up to eight bits represented.
Binary representation is used primarily
in designating bit patterns of masks ~r in
logical operations4
The following example illustrates a
binary term used as a mask in a TM (TestUnder-Mask instruction.
rhe contents of
GAMMA are to be tested, bit by bit, against
the pattern of bits represented by the
binary term.

r-------r-----------T---------------------,
I Name
I Operation
IOperan1
I

Terms whose value depends on the Assembler
program are classified as Assenbler pr~gran
defined terms although you actually create
them yourself.
rhe classificati~n is made
t~ distinguish these terms from the selfdefining terms.

A symbol is a character or combination of
characters used to identify a statenent ~r
to represent addresses or arbitrary values.
Symbols are used as names and in
operands to provide you with an efficient
way to name and to refer to a program statement.
A symbol, which you create f~r use
as a name entry or in an ~perand, nust c~n­
f~rm to the t2!!Q~~Qg_£~!~~:
1.

~-------+-----------+---------------------~
I _______
ALPHA 4IrM
L
___________ IGAMMA,B'10101101'
_____________________ JI
~

A binary self-defining term that is not
specified as a complete byte is assembled
as one byte.
rhe specifie1 bits are
assembled right-justified, and the portion
of the byte not specified is padde1 with
binary zeros.
For example, B'101011' would
be assembled as 00101011.

DrF

£h~!~2~~£_~glf~Q~f!~!g~_!g£~:

A character
self-defining term consists of one character enclose1 by apostrophes and preceded by
the letter C.
All letters, decimal digits,
and special characters may be used in a

rhe symbol must not consist ~f n~re
than eight characters, the first of
which must be alphabetic.
rhe other
characters may be letters, 1igits, ~r a
combination of the twO.
Since synb~ls
used by Ioes begin with I, 3ymb~ls in
problem programs should n~t begin with
the letter I.
Als;~-the-synbol ~r the
first portion of a symbol (up t~ seven
characters) in problem pr~grans ~h2~1~
not be the same as the file name in a
header entry.
(F~r further
details, refer to the SRL publicati~ns
describing the pertinent In9ut/)utput
::::ontrol System.)

2.

No special characters are permitted in
a symbol.
Terms and EK?res3ions

13

3.

No blanks are permitted in a symbol.

The follo~ing are examples of valid
symbols:

READER
A23456
X4F2

LOOP2
N

S4

$13
iilPRICE
#'LB1

The following symbols are invalid, for
the reasons noted:
256B
RECORDARE1-\2
BCO*34
IN 1-\REl\

first character is not
alphabetic
more than eight characters
contains a special character.
namely *
contains a blank

aram that ~as assembled seDaratel~ from the
iirst (see under ~!~~Q!!£_~!Q~~g~~):Previousl~ Defined Symbols:
A 3ymb~1 13
called-ftpreviollsly-deflned" if it has
appeared as a name in an instruction or as
the operand in an EXTRN statement prior to
being used as an operan1 in a 1ifferent
instruction. Symbols used in the operands
of the Assembler instructions )R3 and ~~U
must have been previously defined.

~~~f~!_~~~~f~££~QQ~_~~_2YillQ2!~:

~ s~mbol

may be defined only once in an assembl~.
That is, each s~mbol used as the nane of a
statement or as the operand of an ~xrRN
instruction must be unique to that
assembly.

Defini~~_~mbo!~:

A symbol is defined when
it apoears as the name of a source statement-or as the operand of an EXTRN statement. The Assembler pro.gram. assigns a
value to each symbol appearing as a name
entry in a source statement. The value
assigned to symbols naming storage areas,
machine instructions, constants, and control sections represents the address of the
leftmost byte of the storage field containing the named item. Since the addresses of
these items change upon program relocation,
the symbols naming them are re!Q~£abl~
mm~·

A symbol used as a name entry in the EQU
(Equate Symbol) Assembler instruction is
assigned the value stated as the operand of
the instruction. Since the operand may
represent either a relocatable or an absolute value~ the symbol is considered a
relocatable or absolute term depending upon
the-varue-to-;hich-it-rs-e~uated.

The length attribute ma~ be used as a tern.
Reference to the attribute is made b~ coding L' follo~ed by the symbol, e.g., L'BETA. rhe L' •••• term allowS coding where
lengths are unknown.
The following example illustrates the
use of L'symbol in moving a character constant into either the high-order or loworder end of a storage field.

r-------T-----------T---------------------,
I Name
I Operation I Operand
I
~-------+-----------+---------------------~

I ~1

! DS

! CLB

!

IB2
IDC
ICL2'~B'
I
IBIORD IMVC
11-\!(L'B2),B2
I
Il LOORD
_______ LIMVC
___________ 1~1+L'A!-L'B2(L'B2),B21
_____________________ J
~

The value of a relocatable symbol may
vary bet~een 0 and 2 15 -1 (=32767). The
value of absolute symbols may vary between
-2 15 (=-32768) and 2~5_1 (=32767).
Symbol definition also involves the
assignment of a !~Qg~h_~~~~!e~~~ to the
symbol.
(The Assembler program maintains
an internal table, the symbol table, in
which the values and attributes of symbols
are kept. When the Assembler program
encounters a symbol in an operand, it
refers to the table for the values associated with the symbol.) The length attribute of a symbol is the size~ in bytes, of
the storage field ~hose address is represented by the symbol. For example, a symbol naming an instruction that occupies
four bytes of storage has a length attribute of four.
Normally, symbols are defined in the
same program in which they are used as
operands. However, you can define a symbol
in one program and use it in another pro14

Ai names a storage field eight bytes in
length and is assigned a length attribute
of eight. B2 names a character constant
two bytes in length and is assi~ned a
length attribute of twO. rhe statenent
named HI~RD moves the contents ~f B2 into
the leftnost two bytes of 1-\1. rhe term
L'B2 in parentheses provides the length
specific3tion required by the instr~ction.
When the instruction is assembled, the
length is placed into the pr0per field of
the machine instruction.

LOORD moves the contents of B2 into the
right-most t~o bytes of ~1. A1+L'~1-L'B2
results in the addition of the length of ~1
to the beginning address of Al~ and the
subtraction of the length of 82 fron this
value. rhe result is the addre3s of the
seventh byte in field ~1. rhe constant
represented by 82 is moved into ~! 3tartin~
at this address. L'B2 in parentheses provides length specification as in HIJRD.

You may refer to the current value of the
location counter at any place
in a program~ by using an asterisk in an
operand. The asterisk represents the current value of the location counter.
Using an asterisk in a machine instruction or O:-instruction is the same as placing a symbol in the name field of the particular instruction and then using that
symbol rather than the asterisk in the
operand.
A reference to the location counter must
not be made in an address constant specified in literal form.
The Location counter: In each control sectIon-a-locatIon-2ounter is used to assign
storage addresses to program instructions
occupying storage.
As each machine or DCinst~uction or data area is assembled, the
location counter is first adjusted to the
proper b6undary for the item, if adjustment
is necessary. After the instruction is
assembled the location counter is incremented by the length of the assembled item.
Thus, it al~ays points to the next available location. If an instruction is named
by a symbol, the value attribute of the
symbol is the value of the location counter
after boundary adjustment, but before addition of the length.
The location counter setting can be controlled by using the START and ORG Assembler instructions, ~hich are described under
~rQgra~_~~£tiQll!ll~_~g~ ~!ll~!g~.
The counter affected by either of these Assembler
instructions is the counter for the control
section in ~hich they appear. The naximun
value for the location counter is 21.5-1
(=32767),.

Two of the terns within a 3-tern expression can be grouped within parentheses to
indicate the order in which they are to be
evaluated. When terms in parentheses are
encountered in combination with another
term, the combination of terms inside the
parentheses is first reduced to a single
value.
This value then is used in reducin3
the rest of the expression to another
single value.
The rules for combinin3 terns are discussed under Absolute and Relocatable
~~E!~~~!Qg~. -In-addItion-to-these;-the
following rules apply to the coding of
expressions:
1.

An expression must not start with an
arithmetic operator (+,-,*).

2.

An expression must not contain t~o
terms or two operators in succession.

3.

An expression must not consist of more
than 3 terms.

ij.

An expression must not have more than
one pair of parentheses.

5.

A multi-term expression must not contain a literal.

The following are examples of valid
expressions:
AREA1+X'2D'
*+32
N-25
FIELD
FIELD+332

(EXIT-ENTRy)*a
=H'123!l'
L'BETA*10
B'101'

29
L'FIELD
C' A'
LI\M.BDI\+::;~MM~

In the example *+32, the asterisk is not
used as an operator.
EVALUATION OF EXPRESSIONS

Ezpressions
Expressions are operand entries consisting
of either a single term or an arithnetic
combination of terms.
Up to three terms can be combined
the follo~ing arithmetic operators:
+
*

2.

1.

Each term is 3iven its value.

2.

Expressions wi thin parenthes es are eva'luated first.

3.

Arithmetic operations are perforned
left to right.
Multiplication is done
before addition and subtraction, e.3.,
A+B*C is evaluated as A+(B*C), not
(A+B)*C.
The computed result is the
value of the expression.

~ith

addition, e.g., ALPH~+2
subtraction, e.g., ALPHA-BETA
multiplication~ e.g., 5*L'D~TA

Note: The character * (asterisk) has two
meanings when used in an operand:
1.

A single term expression~ e.g~, 29, BET~,
*, or L'SYMBOL, takes on the value of the
term involved.
A multi-term expression
(e.g., BETA+10, ENTRY-EXIr, 10+~*B) is
reduced to a sin3le value, as follows:

Reference to the location counter (in
this case it is not an operator).
Arithmetic operator (multiplication).

Final values of expressions representing
storage addresses may vary between 0 and
21.5-1.
HOwever, intermediate results may
Terms and Expressions

15

vary between -2 15 (=-32768) and 2 15 _1
<=32767).
~BSOLUTE

~ND

RELOCATABLE EXPRESSIONS

An expression is called absolute if its
value is not affected by program relocation.
An expression is called relocatable
if its value changes upon program relocation.
The two types of expressions, absolute and relocatable, take on these characteristics from the term or terms they
contain.
rwo terms of an expression are said to
be paired if both are relocatable, defined
in the same control section, and have opposite signs.
Any other term of an expression is called unpaired.

An absolute expression may be an absolute
term or any arithmetic combination of absolute terms.
An absolute term may be an
absolute symbo~, any of the self-defining
terms, or the length attribute reference.
Addition, subtraction~ and multiplication
are permitted between absolute terms.
An absolute expression may contain two
relocatable terms (RT) -- alone or in combination with an absolute term (Ar)
under the following conditions:

1.

2.

The relocatable terms must be paired.
The paired terms do not have to be contiguous, e.g., RT+AT-RT.
No relocatable term must enter into a
multiply operation.
Thus, RT-RT*10 is
invalid.
However. (RT-RT)*10 is valid.

The pairing of relocatable terms cancels
the effect of relocation.
Therefore, the
value represented by the paired terms
remains constant, regardless of program
relocation.
For example, in the absolute
expression A-R 1 +R 2 • A is an absolute term,
and R2 and R1 are relocatable terms from
the same control section.
If A = 50. R1 =
25, and R2 = 10, the value of the expression woul1 be 35.
If R2 and Ri are relocated by a factor of 100 their values would
then be 125 and 110.
However# the expression would still be evaluated as 35
(50-125+110=35).

A-R~+R2

A
A*A
R2 -R 1 +A
*-R 1
(a reference to the locati~n counter
is paired with another relocatable
term from the same control section).

A relocatable expression is one whose value
would ch~nge by n if the progr~TI in Mhich
it appears is relocated n bytes awa~ from
its originally assigned area of storage.
All relocatable expressions have a positive
value.
A relocatable expression may be a relocatable term.
A relocatable expression may
also contain several relocatable terns -alone or in combination with absolute terms
under the following conditions:
1.

There must be an odd number, 1 or 3, of
relocatable terns~---------

2.

If a relocatable expression contains
three relocatable terns, tHO of then
must be paired.

3.

The unpaired term nust be 90sitive.

4.

Relocatable terns must not enter into
mUltiply operations.

A relocatable expression is reduced to a
single relocatable value.
This value is
the value of the unpaired reloc~table ter~~
adjusted by the values represented by the
absolute terms and/or paired relocatable
terms associated with it.
For example, in the expression R3 -R 2 +R 3 ,
R3 and R2 are relocatanle terms tron the
same control section.
If; initially; R3
equals 10 and R2 equals 5, the value of the
expression is 15.
HOwever, upon relocation
this value will change.
If a relocation
factor of 100 is applie1, the value of the
expression is 115.
Note that the value of
the paired terms R3 -R 2 renains constant at
5 regardless of relocation.
Thus, the new
value of the expression, 115, is the result
of the value of the unpaired tern (R 3 )
adjustea by the values of R3 -R 2 •

stants (see DC instruction).

The following examples illustrate relocatable expressions.
~ is an absolute
term, R3 and R2 are relocatable terns fron
the same control section. R1 is a relocatable term from a different contrDI section.

rhe following examples illustrate absolute expressions.
A is an absolute term;
R2 and R1 are relocatable terms froTI the
same control section.

R1 -32*A R3 -R a +*
R3 -R 2 +R 1
* (reference to
location counter)

Absolute expressions are reduced to a
single absolute value.
Absolute expre-

ssions may nnly be negative in address con-

16

=H'1234'
A*A+R 3

R3 -R 2 +R 3

R~

(litera])

Machine Instructions

This section deals with the coding of the
machine instructions featured in the
Assembler language. Machine instruction
statements are used to tell the Assembler
to generate the object (machine language)
coding for Model 20 instructions. Format
and function of each machine instruction
are described and the use of each instruction is illustrated by an example.

Object Format of Machine
In struc t ions
The instruction format indicates the length
of the instruction and the type of operation to be performed. The length of the
instruction can be one, two, or three halfwords. 'rhe types of instruction formats
are shown in Figure 4.

First Halfword

Mel, Me2
I

I
I
I

RR Format

I

Secnnd Halfword

Third Halfwqrd

I

R.glster
Operand 1 Operand 2

I

718I 111215iI '

I

Operand 1 I

I

RJgister:

R~ FO£~~:
Denotes a register-to-storage
or a storage-to-register operation. In
this format, bits 12 through 15 must be
zero.
§I_EQ£~~~:
Denotes a storage-immediate
operation. In this format the I2 field of
the instruction is the second ~perand.

§§ Fo£!!!~~:
oper,ation.

Denotes a st,orage-to-storage

In each format, the first byte of the
first halfword contains the operation code,
commonly referred to as the op-code.

Mach ine-Instruction Al ignment

I

J
R.g,ster

All machine instructions are automatically
aligned by the Assembler on halftlord boundary. If any instruction tha~ causes information to be assembled requires alignment,
the byte skipped is filled with hex~decimal
zeros.

1~c..[iliJ
;0

Denotes a register-to-register

The second byte of the first half~ord
may be used to contain data, specify
•
operand lengths, or specify registers to be
used by the operation. Each instruction
consists of an op-code and two operands.

I

I

I

I

RR Format:

operation.

AcId....
Operand 2

rA....

Machine-Jnstruction Mnemonic Codes

RX Format

,0

II
I

51 Format

I

I

1~c..GJ"
10
I

I

I
10
I
I

I

The mnemonic operation codes (shown in

I

IllIIIMCIIotej
Operand I

Appendix A) are designed to be easilyremembered codes that indicate the functions of the instructions. The normal format of the code is shown below; the items
in brackets are not necessarily present in
all codes:

Acldr. .

Ope~ 1
D,

718151161920
I

I

I Length

Ope~ 1

I

AcId....
Operand 2 Operand 1

7 18 1112 1 161920
I
I

I
I

: Length:

Addr. .
Operand 1

AcId....
Operand 2

Verb [Modifier] [Data rype] [Machine
Format]

31132 35 36
I
I

I

AcId....
Operand 2

47

Figure 4.

Object Format of Machine
Instructions

The verb, tlhich is usually one or t~o
characters, specifies the function. For
example, A represents Add and ~v represents
Move. The function may be further defined
by a modifier. For example, the mOdifier L
indicates a logical function and the : a
character as data type, as in :LC f~r :ompare Logical :haracter.
The letters R and I are added to the
codes to indicate, respectively, RR and SI
machine instruction formats. rhus, AR
indicates Add in the RR format. Functions
Machine Instructions

17

involving character and decimal data types
imply the SS format.

the field to indicate a particular oper3nd
(e.g., R1 , R2 , L1 , D2 etc.).
There are three types of operands:

EXTENDED MNEMONIC CODES
For your convenience, the ~ssembler provides extended mnemonic codes, which allow
conditional brancheS to be specified mnemonically as well as through the use of the
Be machine-instruction. These extended
mnemonic codes specify both the machine
branch instruction and the condition on
which the branch is to occur. rhe codes
are not part of the machine instruction,
but are translated by the ~ssembler into
the corresponding operation and condition
combinations.
The extended mnemonic codes and their
operand formats are shown in ~ppendix ~
together with their machine instruction
equivalents. Unless otherwise noted, all
extended mnemonics shown are for instructions in the ~X format. The only difference between the operand fields of the
extended mnemonics and those of their
machine-instruction equivalents is the
absence of the R1 field and the comma that
separates it from the rest of the operand
field.
The extended mnemonic list, like the
machine-instruction list~ shows explicit
address formats only. Each address can
. also be specified as an implied address.
Examples illustrating instructions using
extended mnemonic codes are given below.

r------T-----------T----------------------l
I Name I
I Operand
I
~peration

~------+-----------+----------------------~

I
I B
I 40(0,8)
I
I
I BNL
I GO
I
I 8
I
I
I BO
BR
I ______________________
REG9
IL______ I ___________
JI
~

~

The first instruction specifies an
unconditional branch to an explicit
address. The address is the sum of the
contents of base register 8 and the displacement ~O. The second instruction speci~
fies a branch on not low to the address
implied by GO. The next to last instruction is a branch on one to the address contained in register 8. The last instruction
is an unconditional branch to the address
contained in the register equated to REG9
elsewhere in the program.

Machine-Instruct ion Ope rands
The operands of a machine instruction are
referred to as first and second operands~
They have~ in the following examples. a
subscript (lor 2) to the code letter for
18

1.

operands that are main-storage
addresses.

2.

Immediate data operands that are

vue

byte constants.
3.

Operands that are the general
registers.

Tne aaaress specified in an instruction
always refers to the leftmost byte of the
field addressed. There is no relation
between the address specified in the
operand and that of the instruction~
The length of an addressed data field
may be fixed or variable. In the latter
case, the length is indicated in the length
field (L) of the operand. rhe L-field
indicates the number of bytes used. The
maximum length of a field is 256 bytes.
Immediate data is used only as the
second operand in logical operations in the
SI-Format. The length is one byte and,
being part of an instruction, inmediate
data has no address.
Data in registers have a fixed length of
one halfword •

OPER~ND

FIELDS

~ND

SUBFIELDS

Some symbolic operands are written as a
single field. Other operands are written
as a field followed by one or two subfields. For example, addresses consist of
the contents of a base register and a displacement. ~n operand that specifies a
base register and displacement is ~ritten
as a displacement field followe~ by a base
register subfield, as follows:
40(8).
Since the Model 20 does not ha~e index
registers, the base register subfield must
be preceded by a zero and a comma in the RX
format, e.g., 40(0,8). In the SS format, a
length subfield and a base register subfield are written as follows: ~O(21,8).
~ comma must be written to separate
operands. Parentheses must be written to
enclose a subfield or subfields, and a
comma must be written to se~arate two subfields within parentheses. When parentheses are used to enclose one. subfield,
and the subfield is omitted, the parentheses must be omitted.

In the case of two subfields separated
by a comma and enclosed by parentheses, the
following rules apply:

1.

If both subfie1ds are onitted, the
separating comma and the parentneses
must also be omitted.
For example:
LH
LH

2.

4.

(implicit address)

If the first subfie1d in the sequence
is omitted, the comma that separates it
from the second subfield is written.
The parentheses must also be written.
For eKample:
MVC
MVC

3.

12,48(0,15)
12,FIELD

32(16,15),FIELD2
BET~(,15),FIELD2

(implicit
length)

If in the RX format a base register is
specified, the first subfie1d (index
register) must be specified as a zero
because this subfield is not used.
rhis zero must not be omitted.
For
example:
LH-12~48{O~15f----If the second subfie1d in the se~uence
is omitted, the comma that separates it
from the first subfie1d mu~t be
omitted.
rhe parentheses must be written.
For example:
MVC
MVC

32(16,15),FIELD2
FIELD1(16),FIELD2

(inp1icit
adjress)

Fields and subfields in a symbolic
operand may be represented by absolute or
re10catable expressions, depending on wnat
the field requires.
Refer to Appendix B
for a detailed description of field
re~uirenents.

Blanks must not appear in an operand
unless provided by a character selfdefining term or a character literal.
Thus, blanks are not permitted between
fields and the comma separators, between
parentheses and fields, etc.
In the following, when we speak of a
data field or storage field, we mean the
field in main storage defined by the fields
and subfields of the first or second
operand of a nachine instruction.

Explicit and Implic it Adressing
Byte locations in storage are expressed in
binary form and are numbered consecutively
from hexadecimal 0000 to the upper limit of
the available storage.
rhe first 144 bytes
(bytes 0000-0143) are reserved for internal
CPU control and thus not available to the
progran.
rhe location of any field or
group of bytes is specified by the address
of the leftmost byte.

~ppendix B showS two types of addressing
formats for RX, SI, and S5 instructions.
In each case, the first type sho~s the
method of specifying an address explicitly
as a base register and a displacement.
rhe
second type indicates how to specify an
implied address as a re10catable
eKpression.

EXPLICIr

~DDRESSIN3

If you use explicit addressing in an
operand you must specify a base register
and a displacement.
For example, eKp1icit
addressing is used in the first operand of
the following Move-Immediate instruction:

where D1 is the displacement and B1 is the
base register.
B1 may be an absolute
eKpression with a value between 0 and 15
inclusive.
D1 may be an absolute eKpression with a value between 0 and 4095 inclusive.
rhe address specified in an operand
occupies one halfword of the object code.
~t object time, the ~odel 23 differentiates between a base register specification of 0~B1~1 and 8~B1~15A

The content of the halfword containing the
address is taken as the effective address
by the cpu.
For example, the source
statement
~VI

4095(3),X'FO'

will be assembled as follows
92F03FFF

(object code).

rhe CPU takes the second halfword (3fff)
of the object code directly as the effective address (16383) of the field addressed
by the first operand.
rherefore, one
speaks of direct addressing.

Here, the first four bits of tne half Nord
containing the address specify one of the
general registers 8 through 15.
rhe other
12 bits contain the displacement.
rhe CPU
adds the content of the general register to
the displacement to forn the effective
address.
For eKanple, the source statenent
~VI

1095(9),X'FO'

will be assembled as followS
92F09447

(object code).
~achine

Instructions

19

rhe CPU adds the content of register 9
(assumed to have been loaded previ~usly
with a value of lq288 or 37DO hexa5ecimal)
and 1095 (hexadecimal qq7) to get the effective address 16383 (hexadecimal 3FFF)~
This is referred to as effective ~r
indirect addressing.

language and as it would be assembled.
Note that the value of D2 is the difference
between 7400 and 4096 and that K2 is
assembled as zero, since double indexing is
not possible on Model 20.
rhe assenbled
instruction is presented in hexadecimal
notation:
SJurC2

IMPLICIT

st3tem2nt~

14,rIEL)

J~n

~DDRESSING

Assembled instruction:
If you use implicit adjressing you nust
specify an expression to represent an
address.
The-expression may either be
absolule 8r relocatable.

r---------T---r---T---r----'
1 JP·Code IR1 IX 2 IB2 1)2
1
~---------+---+---+---+----1

1L _________
40
1___
E
10___ 18___ 1CE8
1
____ J
~

rhe value of the expression must n~t exceed
4095 (hexadecimal FFF).
The Assembler
regards this absolute expression as displacement and auto~atically assumes base
register O.
For example, the source
statement
BC

15,EJJ

+'-v-'
B D

~

~

Here again, direct and indirect addressing is possible depending on whether y~u
specify one of the pseudo registers 0
through 7 or one of the general registers 8
through 15.
Jirect and indirect addressing
is explained under ~~eli~it_~~~~§~~i~g.
A special application of implicit
addressing is ~~l~t!~~_~~£~~~~i~g:

where the absolute expression EOJ has the
value 194 (hexadecimal OC2), will be
assembled as follows
47FOOOC2

~

(object code).

Again, at object time, we have direct
addressing as described ab~ve.

In this case, the Assembler uses
of the relocatable expression to
base register and displacement.
end, you must tell the Assembler
register to use as base register
USING and DROP instructions.

the value
calculate
T~ this
which
by issuing

You can find an explanation on how to.
use the USING and DROP instructions in the
section ~!~§_~§g!~£§~_fQ~£~~~£~Q~_~£~£§~
~§~£~.
You will find that the implicit
addressing feature of the Assembler language is a great help to you.
It relieves
you of the necessity to separate each
storage address into a displacement value
and a base adjress value, thus eliminating
a likely source of error and reducing the
time required to check out your program.

Relative addressing is the techni~ue of
addressing instructions and data areas by
designating their l~cation in relation tJ
the location counter or t~ sone synb~lic
location.
This type of addressin~ is
always in bytes, never in bits, halfwords,
or instructions.
T~us, the expression *+4
specifies an address that is f~ur bites
greater than the current value Jf the l~ca­
tion counter.

In the sequence ~f instructiJns shJwn in
the following example, the location ~f the
SR machine instruction can be expressed in
two ways, ALPHA+2 or BErA-4, because all of
the mnemonics in the example are for
instructions Nith a len~th of tN~ bites.
r-------r-----------T---------------------i
1 Name I Operation 1 Operand
1
~-------+-----------+---------------------~

I ALPHA 1 AR

I 13,14
1
1 8R
I 14,15
I
1 BC R
I 1, 14
1
I BErA 1 AR
1 12,13
1
,L-- _____ I ___________
B
I _____________________
ALPHA+2
JI

1
1

~

EKPLICIr AND
For examp~e, assume that FIELD is a
relocatable symbol, which has been assigned
a value of 7400=
Assume also that the
Assembler has been notified (by a USING
instructi~n) that general register 8 currently contains a relocatable value of 4096
and is available as a base register.
The
following example shows a machine instruction as it would be written in Assembler

~

I~PLICIT

LENGrHS

The length in 88 instructions can be explicit or implied.
To imply a length, simply
omit a length field fr~m the Jperand.
rhe
omission indicates that the len~th field is
either of the following:

1.

The length attribute Jf the cxp~eGsion
the displacement, if an

specifyin~

explicit base and displacement have
been written (explicit ~ddressing).
2.

You may conbine explicit and inplicit
addressing with explicit ~nd inplicit
lengths.
Examples are given below.

The length attribute of the expression
specifying the effective address, if
the base anj displ~cement have been
implied (implicit addressing).

Examples

In either case, the length attribute f~r
an expression is the length attribute of
the leftmost term in the expression.
~ self-jefining term has the length
attribute 1.
Both a symbol referring t~ a
machine instruction and ~ Location Counter
reference have the length ~f the instruction in which they ~ppear.
The length
attribute of a literal is deternined the
same way ~s that of a const~nt in a DC
instruction.

Implicit addressing, c~ntr~l secti~n
anj the function of the USIN3
Assembler instruction are not consijered
here.
F~r discussi~n of these considerations and for examples of coding se~uences
that illustrate them, refer t~ ~~Qg~~~_2~~~
~jdressing,

An explicit length is written in the
operand as an absolute expression.
The
explicit length overrides any implied
length.

~i2~i~1_~nd §~21i~i~_~~~_1~21i~i~_~i~~i~1

Whether the length is explicit ~r
implied, it is always ~n effective length.
rhe value inserted into the length fielj ~f
the assembled instruction (object coje) is
one less than the effective length.
If the
specified length is a zero value, a zero is
ihsertej into the length fielj.
In the

foll~wing

ex~mple:

I Operation

1Operand

1

t--------+-----------+--------------------~

I
I
I

I MVC
I.
I•

anj ~~~~~§.§.i~l.
RR Format
---------

Both operands must be absolute

expressi~ns.

r----T---------T--------------------------l

I

INamelOperationlOperand

t----+---------+--------------------------~

r--------T-----------T--------------------,

IName

The foll~wing ex~nples ~re grouped ~ccord­
ing to machine-instruction forn~t.
rhey
illustrate the various synbolic operanj
formats.
All symbols used in the ex~nples
are assunej to be definej either within the
same assembly or by means of an EKrR~ st~­
tement within another assenbly.
~ll synb~ls specifying register numbers, m~sks,
and lengths are assumed to be e~uated, by
an EQU instruction, elsewhere to absolute
values.

1SYMBOL, A

1

I
I

I
I

I ~1

I ~R

1~2

ISR
,I B~ 3 R

111,12
1
IREG11,RE312
1
I B1
IRE 31 0 , J
I
182
IB~SR
ILINKRE3,LINKRE3
1
I C1 1BCR
12, LINKRE3
1
lIC2
____ IBCR
_________ LIHIGH,LINKRE3
__________________________ J1
~

Il ________
SYMBOL LIDS
___________ LICL3
____________________ J1
three bytes are moved since the ~peranj
SYMBOL has an implicit length of 3 as
defined by the DS instruction.
~s shown
below, the value insertej into the length
field of the object code is two.

1~1
1~2

~

Note the length specification of

tN~.

Using an explicit length, e.g:
SYMBOL(5),~

h~ve

I

t----+---------+--------------------------~

lID2102IB~ID~IB2ID21
__ L __ L __ L __ __ L __ J

would

r----T---------T--------------------------l

INamelOperationlOperand

r--T--T--T--T--T--'

MVC

rhe first operand must be an absolute
expressi~n.
Explicit or implicit addressing or a literal may be used in the sec~nd
oper~nd.
~ length cann~t be specified.

ILH

IC~LCRE3,38(O,10)
IC~LCRE3,DISPL1(J,RE310)
IC~LCRE3,M~XIMU~

I
I
181
ICH
I
IB2
IBC
I LOtl, *+8
I
183
ISH
IC~LCRE3,BIN100J
I
IB4
IsrH
IC~LCRE3,REsuLr
I
IB5
IB~S
IREG8,800N
I
ICl
l ____ LI~H
_________ LIRE314,=H'1000'
__________________________ JI
I~H

the following effect:

r--T--T--T--T--T--'

lID2104IB~ID~IB2ID21
__ L __ L __ L __ L __ L __ J

Note the length

specific~tion

of four.

Instructions ~1 ~nd ~2 use explicit
addressing; the first oubfield Nithin the
p~rentheses must not be omitted ~nd must be
zero because double indexing is n~t p~ss­
ible in the ~odel 20.
Instructi~ns 81, 82,
~achine

Instructi~ns

21

second operand of instructions A3, A4, B2,
and B4.
Instruction 21 c8ntains a literal.

B3, B4, and B5 use implicit addressing.
C1 contains a literal.

Expl1Clt anj 1mpl1cit addressin} may oe
combined with explicit and implicit length
in the first 8perand just as in the SS
decimal format.
In the second JPer~nj,
explicit or implicit ajdressinJ or a literal may be used.

Explicit 3nd implicit 3ddressing may be
used in the first operand.
The sec8nd

operand

=

if any

=

must be an absolute

expression with a value between 0 and 255
(hexadeci~al 00 and FF) inclusively.
~
length cannot be specified.

r----T---------T--------------------------,i
iNameiO~erationiOperanj

~----+---------+--------------------------~

IA1
ICLI
IA2
IMVI
IA3
IHPR
IB1
INI
IB2
10I
IB3
IrM
IB4
L____ ISPS~
_________
~

14 0(9),X'40'
IDISPL(REG9) ,BLANK
ISTOP01DO,0
ISWBYTE,X'FF'-BITO-BIT7
ISWBYTE,BITO+BIT7
I BYTE, MASK

I
I
I
I
I
I
INE~PSW
__________________________ JI

r----T---------T------~-------------------1

INamel Operation I Operand
I
~----+---------+--------------------------1
I A1 I MVN
12 (20,9) ,22 (9)
I
IA2
IMVZ
IDISPL+19(,R9),JISPL+18(R9)1
IB1
IrR
IFIELD(10~,rRArABLE
I
IFIELD+1(L'FIELJ-1),FIELJ
I
IB2
ICLC
lED
IPArrFLD,RESFLD
I
IB3
ICl
L
____ IMVC
_________ LIPRINTAR,=2'RESOLr'
__________________________ jI
~

~

Instructions A1, A2, and A3 use explicit
addressing, instructions B1, B2, B3, and B4
use implicit addressing.

A combination of explicit 3nd implicit
addressing with explicit and implicit
length is possible in both operands.
rhus,
for both 8perands you have the follo~ing
four p8ssibilities:

Instructions ~l and ~2 show explicit
addressing, instructions B1, B2, and B3
sho~ implicit addressinJ.
Explicit length
is shown in instructions Al, B1, and B2 and
implicit length in instructions A2, B3, and
21.
Instruction 21 uses 3 liter31.

Types an~ Functions of Machine
Operations
rhere are five types of operatiJns:
1.

Binary arithmetic 8perati8ns.

2.

Decimal arithmetic op2r3tiJns.

•

explicit addressing with explicit length

•

explicit addressing with "implir.it-_ 1 engt- h

•

implicit addressing with explicit length

4.

Branch operations.

•

implicit addressing with implicit length

5.

1/0 operations.

Literals may be used in the second
operand only.

r----T-----r------------------------------,I

I
lOper-I
INamelationlOperand

I

~----+-----+------------------------------~

I
I
I
I
I

I 20 (10, 8) ,10 (6,13)

110(LE~10,R8),DISPLO(SIX,12}

ID4(9,REG11),0(,10)
IFIVE(LFJUR,RB~SE),ZERJ(,R311)

I

I
J

~

~

~

I
I
_

IRESULT(2),PFOUR(1)
IMVO
IFIELD2(LEN3),FIELD1
IPACK 1PFIELD,ZFIELD(L'PFIELD+1)
IUNPK IZFIELD,PFIELD
I _____
~AP
I _________________________
RES FIELD , =P' 0'
~

~

IA2
IA3
IA4
IB1
IB2
IB3
IB4
I ____
Cl
L

I MP
IDP
lAP
ISP
ICP

~

I A1

All A-instructions use explicit addressing and 311 B-instructions use implicit
addressing.
Explicit length is sh8wn in
the second operand of instructions Ai, A2,
B1, and B3; implicit length is shown in the

22

rhese operations differ not 8nly in
their internal lOJi~ but also in th2 format
of data, use of registers, and f8r~at 8f
instructions.
rhe first four 8perati8ns
are discussed in the subsequent secti8ns.
Some operations set a condition c8de in
bits two and three of the Progran status
Word (PS~).
rhis coniition code indicates
the relationship (less than/greater than,
zero, negative, positive etc.)
betNeen the
t~o operands as a result 8f the last 8peration effectinJ the condition c8de 5etting.
For details about the PSw see the SRL publication I~~_~y~t~~~l~~_~Qg~1_~~_~~~£~~Q~~1
~h~E~£~~E!~~!£~' Form GA26-5847.
BINARY ARITHMETIC

JPER~rIJNS

Binary arithmetic is used for 8peranjs like
addresses, indexes, counters, and binary
data.
rhe length of each 8perand is 8ne

halfword including the sign.
Negative nu~­
bers are given in the two's-co~ple~ent
for~.
The first operand must be in one of
the general registers.
The other operand
may be either in a register or in main
storage. For detailed information refer to
the SRL publication !~~_~~~~~~l~Q_~Q~~l_£Q
[~~£iiQ~~l_£h~r~£i~Ei~ii~r Form 3~26-5847.

Q~i~_~Q£~~i

Binary numbers have a fixej length of one
halfword (16 bits). The first (leftmost)
bit contains the sign, the other 15 bits
the binary value. Binary numbers may be
stored in one of the general registers or
in main storage.
In main storage, the
address of the left byte must be even.
Binary halfword

r----T----------------1

ISignlBinary
Value
L
____ ________________
JI
~

o

1

15

Binary numbers are represented as signed
integers.
Positive numbers are represented
in true form with a O-bit as sign.
Negative numbers are in the twos-complement
form with a 1-bit as sign.
The twoscomplement form is found by reversing each
bit (0 to 1 and 1 to 0) and adding a 1 to
the rightmost bit.

r--------T----T----'
tR1
IRa I

llOp-code
________

o

~

____

8

~

____ J

12

R1 indicates a general register containing the first binary number anj R2 a general register containing the second binary
number. R1 and R2 may refer to the same
register.
rhe result of an instruction in
the RR-Format replaces the first operanj.

r--------T----T----T----T------------,
x
I
I

lOp-code
I R1
1____
D2
2 =0 L B2
L
________ L
____ L
____ L ____________
JI

o

8

12

16

20

31

R1 injicates a general register ~ontain­
ing the first binary number.
rhe address
of the seconj binary number is formed by
adding the contents of the register naned
in the B2 -field to the jisplacement given
in the D2 -fielj.

r------------------T-----T-----T-----T--'

12onditioncoje
100 1 01110 1111
~------------------+-----+-----+-----+--~
IAR-Add Register
Izero Izerol- I
I zero I z ero 1- I
I SR-Subtract Reg.
ICH-Comp.Halfword* I equal I low I highl- I
IAH-AddHalfword
Izero Izerol- I
Halfw.lzero
lISH-Subtract
__________________
_____ LIzerol_____ L _____ L __ J1
~

*first operand compared to second.
A zero is always positive by definition.
The absolute value of the lowest possible
negative number is higher by 1 than the
highest possible positive number.

All other binary operations leave the condition coje unchanged.

Highest possible positive number:

BINARY ARITHMETIC ERROR

r--------r--------,

Error conditions that may occur during the
execution of binary operations are:

~

15 -1=+32767
1011111111111111111=2
l ________ ________ l

CJ~DIrIJNS

o

15

Lowest possible negative number:

r--------r--------,

1.

Jperation code invalij

2.

Addressing error
a.

1100000001000000001=-(215)=-32768
L________ ________ J
~

o

15

b.
c.
MACHINE FJRMATS OF INSTRUCTIONS FOR BINARY
OPERATIONS
d.
Instructions for binary operations use the
RR- or RX-For~at.

An instruction address or an
operand address refers to the protected first 1~~ bytes of nain
storage (adjresses 0 to 1~3).
An instruction address or an
operand address is outside available main storage.
rhe last (highest) main-storage
position contains any part of an
instruction that is to be executed.
rhe R1 or R2 fieljs of a binary
instruction contain binary values 0
throu:Jh 7.
Machine Instructions

23

3~

Specification error
a.

rhe lo~-oraer bit of an instruction
address is one~ i.e., no halfword
b:)undary.
The half-word second operand is not
located on a halfword boundary.
Bits 12 through 15 of an RX format
instruction are not all zer~.

b.

c.
~.

Binary overflow check

5.

CPU

p~rity

error

r-------------T-------T-------,
lOp-code I R1
I
R2 I
~-------------+-------+-------~
I _______
8
I _______
9
JI

I

V\
l _____________

~

~

After execution, re~ister 8 ~ontains
hexadecimal 0655. rhe condition co:le is
10.

SR -- SUBTRACr REGISTER

r--------T---------T----------------------,
I Name
IOperationlOperand
I
INSTRUCTIONS FOR BINARY ARIrHMErIC

~--------+---------t----------------------~

Iblank orlSR
IR 1 ,R 2
I
ILsymbol
________ I _________ I ______________________ JI

r----------------------T-------T------,
IOp-codelFornatl

~

I~ame

~

~----------------------+------~+------~
InAn ."-::J-Rpni~rpr
--- (nR)
... --....

1"'---

•I

1n
_.-

II

RR

----

I

I

Function: rhe content of the secon:l
operand-field is subtracted fr~n the content of the first operand fiell.
rhe
result will be in the register specifie:l bi
R1 • Both operan:ls an:l the result consist
of 15 numeric bits plus the sign. rhe
second operand remains unchanged.

ISubtract Register (SR) I 1B
I RR I
IStore Halfword (STH)
I ~O
I RX I
1Load Halfwor:l (LH)
I ~8
I RX I
ICompare Halfword (CH) I ~9
I RX I
IAdd Halfword (AH)
I ~A
I RX I
ISubtract
Halfword (SH) 4I _______
~B
RX JI
L
______________________
4I ______

AR -- ADD REGISrER
r--------~---------T----------------------l

I Operation I Operand

I Name

I

~--------+---------+----------------------~

Iblank orlAR
IR 1 ,R 2
I
IL symbol
________ 4I _________ 4I ______________________ JI
~~g£!!Qg:

rhe subtraction is performe:l bi ~dding
the twos-complement of the second oper~nd
to the first operand. All 16 bits Jf b~th
operands are added. If the result is higher than 2 15 -1 (=32767) or lower th~n -2 15
(=-32768), a binary overflow check occurs.
A register may be cleared to zerJ bi
subtraction from itself.

The content of the first operand
field is added to the content of the second
operand field. The result is stored in the
register specified by the first operand.
The second operand remains unchanged.

There is no two's-complement for the
highest negative nunber. rhis number
remains unchanged when a complenentation is
performed. Nonetheless, the subtra~tion is
still executed correctly.

The si~n is 3etermined by the rules of
algebra. A zero result is always positive.
If the result is higher than 2 15 -1 (=32767)
or lower than -2 15 (=-32768), a binary
overflow check occurs.

00
01
10

Result
zero
Result < zero
Result > zero

~!~~Ql~:

00
01
10

Result
zero
Result < zero
Result > zero

~!~mQ!~:

Assume register 8 contains hexadecimal 0123 and register 9 contains hexadecimal 0532,.

Source statement:
AR

8,9

From this source statement the Assembler
creates the follo~ing object code:
24

Assume register 8 contains heKadecimal 047F and register 13 cJGt~iGS hexa~
decimal 0007.
Source statement:
SR

B,13

From this source statenent the \ssenbler
generates the followin~ object code=

r-------T--T--'

IOp-co:1e\R 1 I R21

.-------+--+--~

IL _______
lB
18__ I __
D JI
~

~

~fter execution register 8 contains
hexadecimal 03A8. The condition code is
10.

operand is 1F4 (decimal 500), and the field
starting at storage location hexadecimal
226 (decimal 550) contains 80AF.
Source statement:

STH -- STORE

HALF~ORO

9,500(0,12)

LH

I Name

r--------r---------T----------------------,
I Operation I Operand
I

From this source statement the 'ssenbler
qenerates the folloNin~ object =ode:

.--------+---------t----------------------~
Iblank orlSTH
IR1w D2 (O,B 2 )
1
I symbol I
1
1

r-------r--T----r--r---l
IOp-codeIR 1 IX 2 =0IB 2 I D2 I

~-~-_-

___ _________
~

~_---------------------J

Fun£tiQ!l: 'The content of the register specified by R1 is stored in the half~ord at
the main-storage location addressed by 8 2
and 02..rhe first operand remains
unchanged.

~-------t--+----+--t---~
1L_______
48
0 4I::__ 11F41
419
__ 41 ____
~-_-1

After execution register 9 contains
hexadecimal 80AF.

:H -- COMPARE
~~mE!~:

Assume register 9 contains hexadecimal 68AF, register 1'1 contains hexadecimal 001E, and the displacement in the
second operand is hexadecimal 29E (decimal
670) •

HALF~ORD

r--------T---------r----------------------l
1Name
IOperationlOperand
1
~--------+---------t----------------------.
Iblank orlCH
IR 1 ')2(0,B a )
I
I symbol
L
__ _____ I _________ 41______________________ JI
~

~

Source statement:
STH

9,670(0,11)

From this source statement the Assembler
generates the following object code:

r-------r--T----T--T---'

IOp-codeIR 1 IX 2 =nIB 2 ID 2 1

Function: The content of the register specified-by R1 is compared Nith the halfword
at the main storage location addressed by
B2 and O2 • The comparison is algebraic,
i.e. the signs must be taken into consideration. Both operands remain unchanged.
A condition code is set.

~-------+--+----+--+---~
~

~

~

9 L1____
IL_______
40
1__
0 IB
__ 129EI
___ J

After execution the field starting at
storage location hexadecimal 28: (decimal
700) contains 68AF.

00
01
10

First operand = second operand
First operand < second operand
First operand > second operand

§!~mE!§:

LH -- LOAD

HALF~ORD

r--------r---------r----------------------,
I Name
I Operation I Operand
I
~--------+---------+----------------------~
Iblank orlLH
IR1 ,D 2 (0,B 2 )
I
1L symbol
________ 41_________ 4I ______________________ JI
~!!!!£tiQ!l:

The halfword at the main storage
location addressed by 8 2 and D2 is placed
into the register specified by R1 • The
second operand remains unchanged.

Assume register 9 contains heKadecimal 0001, the displacement in the
second operand is hexadecimal 690 (decinal
1680), register 13 contains heKadecimal
0025, and the halfword at storage location
hexadecimal 685 is AF99.
Source statement:
:H

9,1680(0,13)

From this source statement the Assenbler
generates the followin~ object =ode:

r-------r--T----T--T---l
IOp-codeIR 1 IX 2 =0IB 2 10 2 I

~-------+--+----+--+---~
690 J1
1L _______
49
0 ID__ 41___
419
__ 4I ____
~

~!~mE!§:

~ssume register 9 contains hexadecimal A~~A, regi?ter 12 contains hexadecimal 0032. the displacement in the second

After comparison the resulting condition
code settin~ will be: 10.

Machine Instructions

25

AH -- ADD HALFwORD
r========T=========T=========~-~~~=~~~~=--l

I Operation I Operand

INam~

I

t--------+---------+----------------------f
Iblank
IR D (0,B
I
orl~H

2
2 )
symbol I _________ I ______________________ J
L ________

I

~

00

01
10

Result
zer::>
Result < zero

Result > zero

1y

~

I

Function: The halfword in nain storage,
addressed by B2 and D 2 , is added to the
content of the register specified by R1 The sign is determined by the rules of
algebra. ~ zero result is positive by
defini tion.

§~~~E!~:

~ssume register 9 contains hex~­
decimal 047F, register 11 cont~ins hexadecimal 0050, the displacement in the 3ec~nd
operand is hexadecinal 320 (decinal 800),
and the field starting at stor~ge location
hexadecimal 370 (decimal 880) contains
hexadecimal 00D7.

Source statement:
SH

If the result is higher than 215 -1
(=32767) or lOwer than -2 15 (=-32768), a
binary overflow check will occur.

9,800(0,11>

From this source st~tement the
generates the following object

~ssenbler

~ode:

I~-------~--~----~--~---.
I
I
I .
•

00
01
10

IOp-codeIR 1 Ix 2 =0IB 2 I D2 I

f-------+--+----+--+---~

Result
zero
Result < zero
Result > zero

IL_______
4B
I __
9 I ____
0 I B I ___
3201J
~

~~~~E!~:

~ssume register 9 contains hexadecimal 047F w register 11 contains hexadecimal 0028, the displacement in the second
operand is 1E~ (decimal 490), and the field
at storage location hexadecimal 212 (530)
contains hexadecimal 1F29.

9,,490(0,11)

From this source statenent the ~ssenbler
generates the following object code;
IOp-codeIR 1 Ix 2 =0IB 2 ID 2 I

~-------+--+----+--+---f

I

19__ I ____
0
LI B
__ L11E~1
___ J

~

execution register 9 cont~ins hex~de­
03~8 an1 the con3ition ~o3e is 10.

DECIM~L ARITH~ErIC

OPERATIONS

D~t~ is tr~nsferre3 to and from the
external I I ) devices in zoned f~rnat.
rhus, the data has to be packed and
unp~~ke1 before ~nd after processing respectively. In zone3 Eorm~t, each byte contains a zone in the left halfbyte ~n3 a
digit in the right halfbyte eKcept the last
one which contains the sign an3 a 3igit.

r-------r--T----T--T---l

4~
L _______

~~_L

Decimal ~rithmetic ~an be performe1 onli
with data in packed fornat. Packed fornat
means th~t there ~re two 3igits in one byte
eKcept for the iON order byte. It ~ontains
one 3igit ~n3 the sign.

Source statement:
AH

~fter

cimal

~

~

After execution register 9 contains
hexadecimal 23A8 and the condition code is
10.

rhe ajdress in an instruction alNays
specifies the left-nost byte of the d~t~
fiel1.
rha length Eiel1 in an assenble1
instruction indicates how many bytes are
part of the 1ata field in addition to the
addresse1 (left) byte.

sa -. SUBTRACT HALFWORD

r--------r---------r----------------------J
I Name
I Operation I Operand
I
~--------+---------+----------------------~
Iblank orlSH
IR 1 ,D 2 (0,B 2 >
I
I symbol ! !

!

L ________ • __ -------4----------------------~

Function:

This instruction is identical to

the-~dd-Halfword instruction with the fol-

lowing exception: The two's complenent of
the second operand# addressed by 8 2 and D21
is added in place of the true value.
26

De~im~l operations are perforne1 in nain
storage. The data fields may have ~ length
from 1-16 bytes.
~ fiel1 may start at any
address including an odd Jne. [n z~ne1
format there ~ay be a naxinu~ ~f 16 1igits,
in packed format ~ naximum of 31 digits
plus the sign in a field. rhe tNo Jper~nds
may be of different length. Multipli~~nd
and divisor are restricte3 to ~ maxinam of
15 digits plus the sign.

The values in the operand fields are
assumed t~ be right aligned, with leading
zeros where reqaired. rhe Jperands are
processed as integers from right to left.
If a result eKtends beyond the field indicated by the ~ddress and the length field,
the extending (high order) part is ign~red
and the c~ndition code is set to 11.

Decimal nambers consist ~f binary ::Jded
digits and a sign. The de::imal digits 0-9
are represented in the four bit c~de by the
bit combinations 0000-1001.
The combinations 1010-1111 are reserved
for representations of a sign (+,-). 1011
and 1101 represent a minus, the other four
combin~ti~ns a plus.
The represent~ti~ns
1100, 1101, 1010, and 1011 ~re created during calculations in main stJrage.
Neg~tive

rhe instru::tion fields B2 , )2' ~nd L2
give the respective infornati~n f~r the
se::ond d~t~ field.
rhe r=sult oE ~ de::inal JP=r~tio~
the ::~nt=nt of the first d~ta
field.
It cannot occupy nore st~rage are~
than indi::~ted in the L1 field.
rh= se::ond
data field remains unchanged. EKcepti~n:
overlapping fields.
repl~::es

The general registers are
by decimal operations.

n~t

CONDIrION CODE AFrER

OPER~rIO~S

DECI~~L

affected

nambers are represented in true
The decimal operations listed in the table
below set a condition ::od=.

form.
The

tw~

de::imal formats

~re:

r-----T-------T-------T-------T----------l
I 00
I 01
I 10
I
11
I

I

Packed decimal number (e.g. five digits)

~-----+-------+-------+-------t----------~

r-----------T-----------T-----------,
I
Byte
I
Byte
I
ByLe
I
I

In the source instructi~n statenent y~u
spe::ify the effe::tive length ~f the dat~
field.
rhe ~ssembler inserts ~ valae one
less than the effective length int~ the
length field of the assembled instraction.

I

I

I

I

I

IZ~P

I~P

I

lIDigitlDigitlDigitlDigitlDigitlSign
_____ _____ _____ _____ _____ _____ JI
~

~

~

~

I zero
I eqaal
I zero
I zero

ICP*
ISP

l _____ _______

~

~

I <
I

zer~1
l~w I

> zerol

I
highl
I
I < zerol > zerol overfl~N I
I < zerol > zerol overfloN I

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

*First operand ::ompared to
Zoned decimal namber (e.g. three digits)

r-----------r-----------r-----------,
~

~

~

sec~nd.

~ll other de::inal operations
condition code unchanged.

I
Byte
I
Byte
1
Byte
I
·1
I
I
I
I
I
I
IZone
L
_____ IDigitlZone
_____ _____ IDigitlSign
_____ _____ IDigitl
_____ J
~

___ L __________ J

DECI~~L

~

~RIrHMErIC

le~ve

the

ERROR :ONDIrrONS

The following err~r conditi~ns nay occur
during the eKecution ~f decim~l arithneti::
oper~ti~ns:

Machine

F~rmats

of Instractions

De::im~l

~perati~ns

f~r

Decin~l

~rI~fi~~~I£---------------------------------

have the 53

1.

Oper~ti~n

2.

~ddressing

lOP-Code

D.
8

12

16

20

inv~lid.

error

forn~t:
~.

o

::~de

32

36

47

~n instruction ~ddress ~r an
operand address refers to the prJte::tel first l~~ bytes of nain
storage.
~n instru::tion adlr=ss or ~~
~perand ~ddress is ~utside av~il­
able st~rage.
~n instru::tion ~c::apies the l~st
two (highest) nain-storage
p~siti~ns.

rhe fields B1 and D~ give the mainstorage ~ddress of the left byte of the
first dat~ field; L1 gives the nunber of
bytes in addition to the leftmost byte. L1
may vary between zero and 25 inclusively.

3.

Specification error
~.

rhe l~w-~rd=r bit of ~n instra::ti~n
address is one, i.e., no h~lfNord
o~unjary.

~a:~in=

Instra::tions

27

b.

Zero an3 ~33~ :ompare Decimal~
Decimal, an3 Subtract Decinal
instrQctions the length c~je L2 is
}reater than the length c03e L1 .
For Multip1i Decinal an3 Jivi3e
Decimal instru=tions, the len}th
co3e L2 is greater than 7 ~r greater than or equal to the len}th coje
F~r

~33

c.

[,1-

4.

~

n
:'.l.

b.

in the Zero an3 ~33, :onpa~e Decimal, A3d Decimal, Subtract Decimal,
Multiply Decimal, ~r Divide Decimal
instruction is inc~rrect.
rhe operand fie13s in these
instructions overlap incorrectly.
rhe first operand in a ~ultiply
Decimal instruction has insufficient high-order zeros.

c.

6.

~~_

Llle

~

~~

;::,e"';Jll...!

C~_1~

L.1.e.1....!

~

~

:::tLe

.L::IllULe...!.

rhe TI~ve pro=eeds from right to left Jne
byte at a time.
rhe secJnd fiel~ n~y ~vec­
l~p the first ex~lujinJ the riJntm83t byte
~f the first fiel3.

Da t::t error
(,..4..

5.

not have equal lengths. Leading zeros are
inserted if tne first field is l~nge~ than
the se=onj~
If tr.e se~ond field is lonJer
than the
first, the__ high-~rder
digits ~f
___
! _____

~~~n

.....

.L':'J

~~

~v
V..L.

~;~;~

.......

..L~..L

"-

~~4~
'-"-'..,A.,-

n~

V..L.

~n

~noY~n~
...,t'''-.L
I...A.L.J. .....

I.A.~'&'

ExaTIDle:

AssuTIe ce]ister 12 ~~ntains hexa0250, re~ister 15 =Jnt::tins nexadecimal 040F, the 3is~la=ement ~iven in b~th
operands is zero, storage location hexadecimal 040F-0412 contains hexa3e=imal
123456 i and storage location hexadecimal

jecinil

0250-0253 contains

hexaie~im~l

Decimal divide check
The resaltant quotient in a Divide
Decinal instruction ex=eejs the specifie3 data fie13 instruction (inclujing
jivision by zero) or the 3ividend has
no leading zero.

Source statement:

CPO parity error.

r-------T--T--T--T---T--T---'

MVO

77RR9902.

0(4,12),0(3,15)

Fron this s~u~=e statement the ~ssembler
produces the following ~bject c~de:
l)p-codeIL 1 IL 2 IB 1 ID 1 13 2 10 2 1

~-------+--+--+--t---+--+---~

I f.1

INsrRU2rI~NS

FOR

DE2IM~L

13 12 I: IODOIF POOl

L _______ L __ L __ L __ L ___ L __ L ___ J

~RIrHMErI:

r----------------------------T----T------l
I

I Jp- I

IName

IcojelF~rnatl

~fter execution the field at IJ=atiJn
hexadecimal 0250-0253 c~ntain3 hexajecinal
01234562.

I

t----------------------------t----t------~

I~ove with )ffset 01V»)
I FI I SS I
I Pa=k (P~:K)
I F2 I 33 I
I Unpack (ONPK)
I F3 I S8 I
IZero anj ~jj Packed (ZAP)
I F8 I 33 I
I Compare Oecinal Packe3 (2P) I F9 I SS I
I F~ I SS I
I ~dd Decimal Packed (~P)
ISubtract Decimal Packe3 (SP) I F8
33
I Mul ti ply Dec i ma 1 Pac k e 3 ( Y1 P) 1 F C
SS
I ____________________________
Divide Decimal Packej (DP)
1 ____
FD I ______
SS JI
L
L

PI\CK -- PI\CK

r--------T---------T----------------------l

IName

~

~FF8Er

r--------T---------T----------------------,
lName

l)perationl)peran3

I

t--------t---------t----------------------~

Iblank orlMVO

ID1{L1,81),D2(L2,B2)

I

I

LIsymbol
________ L _________ LI ______________________ JI

Function:
rhe contents of the sec~nd data
-------field are moved to the location specified
by the first operan3.
rhe move is executed
with an offset of half a byte (~ne digit)
to the left. rhe right halfbyte of the
first data field remains un=hanged.
rhere
is no check for validity.
rhe fields need
28

I

Iblank orlPI\2K
ID1(L1,B1),D2{L2.32)
I
IL________
symb~l
I _________ LI ______________________ J1

~

MVO -- MOVE WIrH

IOperationlOperand

t--------+---------+----------------------~

Function:
rhe unpacke3 c~ntent of the
second-data field is packed and placed into
the first data field.
rhe second jata
field must contain an unpacke3 3ecinal
number. It may have a maximuTI size of 16
bytes.
rhere is no check for validity ~f
digits and sign.
The lengths of the fields need n~t be
equal.
Leading zeros are inse~ted if the
first field is too Ion} fJr the reSult.
The high-order digits Jf the second field
ace i~nore3 if the first field is t~~ short
f~r the result.
rhe fields are ?rJ~essej
from right to left one byte at a tine.

~~~~El~:

~ssume register 11 contains hexadecimal 044~, register 9 contains hexadecimal 02CO, the displacement in the first
operand is hexa~ecimal 244, in the second
operand it is hexadecimal 180, and that
storage location hexadecimal 0440-0444 contains hexadecimal F1F2F3F4C5.

UNPK

4020(5,10),100(4,10)

From this source statement the Assembler
produces the following object code:

r-------r--r--r--r---r--r--l

\Dp-codeIL 1 IL 2 I BLID L IB21D21

Source statement:
PACK

Source statement:

~-------+--+--+--t---t--t--~

I F3

580(4,11),384(5,9)

14 13 IA IFB41A 1 5 51

L _______ L __ L __ L __ L ___ L __ L __ J

Fron this source statement the Assemble~
produces the following object code:

After execution location hexadecimal lF54lFS8 contains F2F3F4F5D6.

r-------T--T--T--T---T--T---'

IOp-codeIL 1 IL 2 I B1ID 1 IB21~2 I
~-------+--+--+--t---+--t---~
1L _______
F2
13 14 IB 12 44 19 11801
L __ L __ L __ L ___ L __ L ___ J

ZAP -- ZERD AND ADD PACKED

r--------T---------T----------------------l

~fter

execation the field at storage location hexadecimal 068E contains 00123452.

IOpe~ationlOperand

INane

I

t--------+---------t----------------------~

I blanK o~IZAP
ID1(L1,B1),D2(L2,B2)
I
Is________
ymbol iI _________ i ______________________ JI
L

r

ONPK --

[J~P1\CK

r--------T---------T----------------------l

I Name

\Operation\Operand

I

~--------+---------+----------------------~

Iblank orlONPK

I

symbol
L ________

!D1(L1,BL),D2(L2,B2)

1

L! _________ LI ______________________ JI

Function:
rhe packed
second-data field are
mat and stored in the
The second data field
decimal number.
Sign
checked for validity.

contents of the
changed to zoned fo~­
first data field.
must contain a packed
and digits a~e not

After processing, the zoned decimal
number in the first data contains the sign
(high-order four bits) an~ one digit in the
rightmost byte.
Each of the other bytes
contains a zone and a ~igit.
rhe fields are processed from right to
left.
If the first operand field is too
long it is filled Nith leading ze~)s.
If
the first operand fiel~ is too short to
contain all the digits of the second
operand, the leading digits are ign)red.
rhe operands may overlap but you must exercise caation.

~~~~2!~:
Assume register 10 contains hexadecimal OFAO, the displacement in the first
operand is hexadecimal FB4, that in the
second operand is hexadecimal 65, and location hexadecimal 1004-1007 contains hexadecimal 0123456D.

Function:
rhe first data field is ze~oed
out-and-the contents of the sec)nd data
field are placed into the first data field.
rhis operation is e~uivalent to an addition
into a zero-field.
The second field mast
be in packed format.
A zero result is positive by definition.
rhe second field may be shorte~ than the
first field.
If the second field is longer, then a machine stop occurs and the
instruction is not executed.
Processing proceeds from right to leEt.
All digits and the sign of the second field
a~e cheCKed for validity.
Hig~ order zeros
are supplied if needed.
rhe fields may
overlap if the rightmost byte of the first
operand is coincident with, or to the right
of, the rightmost byte of the second
operand.

00
01
10

Resalt
zero
Result < zero
Resalt > zero

~~~~21~:

A.ssume register 10 co~tai~s hexadecimal 01F4, t~e displacenent in t~e first
operand is hexadecimal 294, that in the
second operand is hexadecimal 37~, and
storage location hexadecimal 056E-0570 contains 01234D.
Source statement:
ZAP

660(4,10),890(3,10)

From this source statement the ~ssenble~
produces the following object code:
~achine

Inst~uctions

29

r-------r-jop-codelL iL

T -- T --T ---T--T---l

io

2 iB

IB 2 i o2

i

1
1
1
L _______ ~--~--~--~---~--+---~

i

F8

j3

j2 in. j294jn.
j37n.j
__ L __ L __

L _______ L __ L __

~fter

L~_L~

exe~utiJn

~J

loc~tion

0487-048n. cJntains

0001234D.

From this source statenent the n.ssenbler
produces the following object code:

r-------T--T--T--T---T--T---'
/B21D2 I

IOp-~ojeILiIL2/BiIDi

~-------+--+--+--+---t--+---~

1l _______
F9
12__ 11__ IC__ 1 640
lB 13EBI
___ __ ___ J
~

~

~

~

~

~

n.fter comparison the condition cJde
CP --

~OMP~RE

DECI~~L

P~CKED

r--------T---------T----------------------l
l:>per~tionIJperanj
I

1N'~ne

~--------t---------+----------------------~

Iblank orl2P
ID1(L1,B1),D2(L2,B2)
I
symbol LI _________ LI ______________________ JI
I ________
L

~p

--

~D)

1S

lJ.

DE2IMlI.L PACKEJ

r--------r---------r----------------------l
I~ame
I)perationl)perand
I
~--------+---------t----------------------i

Iblank orl~P
IDL(L1,BL>,J2(L2,82)
I
Isynbol
I _________ I ______________________ JI
l ________ L
~

r~~£~!2~:

E~~£!!Q~:

rhe contents of the first data
fie11 are cJmpare:1 to the ~Jntents of the
second data field and the result is indicated by ~ new con1ition code.
rhe conparison proceeds from ri~ht to
left and is algebraic, i.e. the sign and
all digits are compared one byte at a time.
(Negative values are smaller than p~sitive
values).
~ negative zero is e~ual to a positive
zero. rhe sign and all di~its are checked
for validity. ~ halt occurs if the second
field is longer than the first field and
the instruction is not executed.
If the
second field is shorter it is extended with
leading zer:)s.

rhe contents of both fields do not
Change.
~n overflow cannot occur.
rhe two
fields may overlap if the rightmost bytes
coincide. Therefore, it is possible to
compare a number to itself.
Note the difference between "Conpare
Decimal Packed" and "Compare Logical Characters" (2L2).

00
01
10

First operand = second operand
First operand < second operand
First operand > second operand

~!!mE!~:
~ssume register 12 contains hexadecimal 0040, register 11 contains hexadecimal 02FO, the displacement in the first
operand is hexadecimal 640, that in the
second ~perand is hexadecimal 3E8, location
hexadecimal 0680-0682 contains 01000e, and
locatiJn 06D8-06D9 contains 999C.

rhe contents of the 3eco~d d~t~
field are added to the contents Jf the
first data field.
rhe resul t re9la~es the
content of the Eirst fielj.
rhe si~n is determined by the rules oE
algebra. n. zero result is positive by
definitiJn.
Ex~eption:
It is possible
that a remaining zero result after an overflow has a ne~ative si~n. A condition co:1e
is set.
If the se~ond Eielj is lon~er th~n the
first a program error halt occurs anj the
instruction is not executed. If the se~~nj
field is shorter th~n the first it is
eKpanded with leading zeros and ~ddition
will t~ke pla~e nornally.
Signs and jigits
are checke~ for valijity.
Adjition proceeds from right to left. rhe Lesult i3 in
packed format.
rhe two fie11s may overlap if the ri~ht­
most bytes coincide. rhus, it is ?ossible
to double a number.

00
01
10
11

Result
zero
Result < zero
Resalt > zero
OverfloW'

~~~m2!~:

~ssune rejister B contain3 heKadecimal 001~, storage location )329 (heKadecimal) contains 00222~, stora~e locatiJn
500 (hexadecimal) contains Cl0JJC, the displacement in the first operand is 315
(hexadecimal), and that in the secJnd
operand is 4EC (hexadecimal).

Source statement:
n.P

789(3,8),1260(3,8)

Source statement:
1600(3,12),1000(2,11)

30

Feom this SOurce statenent the ~ssenbleL
produces the following object code:

r-------r--T--T--T---T--r---'
IOp-cojeIL~IL2IB1ID1 IB 2 10 2 I

From this source st~tenent the ~ssenbler
produces the followin3 object coje:

.-------t--t--t--t---t--t---~

r-------r--r--T--r---r--r---'
IOp-codeIL1IL2IB1ID1 IB 2 10 2 I

12

I _______
FA
L
L12
__ L __ L18
__ L131518
___ L __ L14E~1
___ J

~-------t--+--t--t---t--t---1

After execution storage loc~tion 0329-032B
(hexadecimal) contains 0011SC.

I _______
FB
L
L11
__ 11
__ L19
__ 1100lS
___ L __ LIBB81
___ J
~

~

After execution stora3e location 0898
(hexadecimal) contains OO~O.
rhe con1ition
code is 10.
SP -- SOBTRACT DECIMAL

PA~KEO

r--------r---------r----------------------l
I JperationlJperanj
I
I~ame

~--------+---------+----------------------~
Iblank orlSP

ID1(L1,B1)D2(L2.B2)

1

IL symbol
I _________ L1 ______________________ J1
________ L

r--------T---------T----------------------l
IOperationlOperand
I

IN~me

~--------+---------+----------------------~

Iblank orlMP
IOL(~1,B1),)a(L2,B2)
I
symbol
I _________ L1______________________ JI
IL________
~

Function: rhe contents of the second field
are-subtracted from the contents of the
first 1at~ fie11.
rhe result is ~lacej
into the first field.
rhe sign is jetermined by the rules of algebra.
~ zero
result is positive by definition. Exception: A zero result remaining in case of
an overflow may have a minus sign.
If the secon1 field is longer than the
first a program error halt occurs and the
instruction is not executed. If the second
fie11 is shorter, it is exp~n1e1 with lea1ing zeros and subtraction Nill take place
normally.
All digits and the signs are checked for
validity. The operation proceeds from
right to left by reversing the sign of the
second number and then adding the second
number to the first.
The result is in
packed format.
The fieljs may overlap if the ri3htmost
bytes coincide. Thus it is possible to
clear a field to zero.

00
01
10
11

Result
zero
Result < zero
Result > zero
Overflow

§!~~E!~:

Assume register 9 contains (hexadecimal) 00~8, register 8 contains (hexadecimal) 012C, stora3e location 898 (hexa1ecimal) contains 012C, stora3e location OCE4
(hexadecimal) contains 0082, the displacement in the first field is 700 (hexadecimal), an1 that in the secon1 fie11 is BBB
(hexadecinal).

Function:

in the second data field. The product is
placed into the first field.
rhe secon1
field may have a maximum of 15 jigits
(L 2 =1) plus the si3n anj must be shorter
than the first operand. If L2 > 1 or L2 ~
L1 a pro3ram error halt occurs ~nd the
instruction is not executed.
The len3th of the pro1uct is equ~l to
the sum of the lengths of nulti?lier an~
multiplican1 (L of pro1uct = L1 +L 2 ) .
Therefore, the multiplicand must be
expan1e1 with le~1ing zeros by the number
of bytes of the multiplier. otherwise ~
halt occurs.
An overflow is not possible.
The product may have a maximum length of 30
1igits plus the si3n.
It contains ~t least
one le~1in3 zero.
The f~ctors ~nj the result ~re considered to be signed integers. rhe si3n is
determine1 by the rules of a13ebra.
rhe
fields may overlap if their ri3htnost bytes
coincije.
rhus, it is possible to s~u~re ~
number.
Sote:
You can save computing time by usin3
fhe-Iar3er of the two f~ctors ~s the seconj
operand.

1.
Source statement:
SP

2000(2.9),3000(2,S}

The nultiplicand in the first

~ifa-lIeld is multiplie1 by the multiplier

Multiplic~nd

MAND
2.

~en3th

x multiplier
MOR

x

MANO + length MOR

= pro1uct
= PROD
= len3th PROD

Machine Instructions

31

3.

The M~ND nast be right-3ligne3 3n3 have
leading zeros before the multiplication
is elCecate1.

r------T-----------T--------------------,I
I Name I Operation 1 O~erand
~------t-----------t--------------------~

I
I
I
I

1
2

!

i
I
I
l
!

1

I

I
1
I MOR
I MA.NO

Dt-I---""!t 2

MaR

1372 ! 9

MAN 0

I.. 2 5 C~I

I

PROD

PROD,MA.ND
PROD:MOR

Z~P

MP

I
I
I OS
I OS
I PR:>O 1 os
1
I
!
!

CL3
CL2
CL5

IL______ iI ___________ i ____________________ J

10 0 0 0 0 0 " 2 5

'.00
cl

10 1 5 8 1 8 07 5 DI

i 2

Note: Maximum length of product i, 16 byt...
Maximum length « MOil il 6 byi_.

Figure 5.

Decimal

~ulti~lication

DP -- DIVIDE DECIMAL PACKED

r--------T---------r----------------------,
IName
I
IOperationlo~erand

A.ssame the A.ssembler has allocated
storage l~cati~n (hexa3ecim3l) lC92 to statement MOR •. Then, MA.ND has location lC95
and PROD has location lC97. Further assume
that the storage locations in~licitl~
addressed by MOR and MA.ND contain 37219D
and 425C respectively and register 12 contains (hexadecimal) 1194.
(The A.ssembler
automatically calculates the dis~lacement
shown in the object coding b~ subtracting
the contents of register 12 from the location counter value of the s~nbolic
address).
Source statement:
PROD,MA.ND

ZAP

~--------+---------+----------------------i

Iblank orlOP
ID1{L1#B1),D2{L2,B2)
I
symbol LI _________ LI ______________________ JI
IL________

Function:

rhe dividend in the first data
divi3ed by the divisor in the
second data field. The quotient an3 the
remainder are placed into the first j3ta
fie13.

field-is

rhe luotient occupies the left ~3rt of
the first field, i.e. the address )f the
quotient is t~e same as the address of the
1ivi1en1. ~h?- remainjer occupies the right
part of the first field and has a length
e~ual to that of the 3ivisor.
The quotient and the remainder together
the entire aivi3ep3 fie13 (first
operand). rhis ~eans the diviaend field
must be large enough to accomodate a divisor of maximum length and a quotient of
maximum length. In the elCtreme case the
dividend field has to be expanded ~ith
zeros to the left by the number of b~tes of
the divisor.
occu~~

Assembler

pro~uced

object code:

r-------T--T--T--T---T--~---,

IOp-code1L 1 1L 2 1B11 0 1 IB 2 10 2 I
~-------+--+--+--+---+--+---~
~

~

IL _______
Fa
L14
__ LIi
__ LIC
__ LIB031C
___ __ IBOll
___ J
and
PR:>D,M::>R

MP

r-------r--T--r--T---T--T---'
i~p-codeIL11L2IB1ID1

18 2 1D2 1

t-------+--+--+--+---+--+---~
1L _______
FC
L14
__ 12
__ IC
__ IB031C
___ __ IA.FEI
___ J
~

~

~

T~e results of the
sho~n in Figure 5.

32

rhe length of the luotient fielj (in
bytes) is L 1 -t 2 • rhe divisor fie13 n3~
have a malCim~m of 15 3igits pl~s the sign
and must be smaller than the diviaen3
fie13.

~

~

two instructions is

If L2 > 7 or L2 ~ LL a halt )cc~rs and
the operation is not executed. rhe dividend must have at least one lea1ing zer~.
Divi3end, 3ivisor, ~~otient, and
remainder are signe3 integers. rhe sign is
3eternine3 accor3ing to the r~les of algebra from the signs of dividend and divis~r.
The sign of the remainder is al~ays ident-

r-------T--T--T--T---T--T---'

ic-al to the sign of the dividend,.
This
also holds true if the quotient or the
remainder are zero.

IOp-codeIL 1 IL 2 IB 1 I D1 IB21D2

If the quotient contains more than 29
digits plus the sign~ or if the dividend
has no leading zero, then a halt occurs and
the operation is not executed. The divisor
and the dividend remain unchanged and there
is no overflow. The two operands may overlap if their rightmost bytes coincide.

J

~-------+-~+--+--+---+--+---~
7 5819 160 91
IL_______
F8
14
__ L13
__ L19
__ L1___
i __ i ___ J
~

and
Source statement:
PROFE,DOR

DP

Assembler produced object code:

r-------T--T--T--T---T--T---'

Example:
1.
2.

(Op-codeIL1IL2IB1ID1 IB21D2

Dividend
DEND

Divisor
DOR

= Quotient

8 ACIJ
11
__ L19
__ L175819
___ i __ L1___

I _______
FD
L
i14
__ i

QOOT

Length of processing field
QUOT + length DOR

I

~-------+--+--+--+---+--+---~

length

The results of the two instructions are
shown in Figure 6.

maximum length of processing field
(PROFE) = length DEND + length DOR
(packed bytes).
3.

The dividend must be right-aligned with
at least one leading zero before the
division is performed.

PROFE

ro;o 12

I

719 ,513 I " 13 ,e I PROFE 111 311 , 213 ,

Cll I" Ie ,
I"

r-----T---------T-------------------------,

IName IOperationlOperand

I

~-----+---------+-------------------------1

I

I

I
I

I

I

I
1 ZAP
1 DP
I

1

IPROFE~DEND

I
I

lPROPE;, DOR
1

1

LOG~CAL

1

There are special instructions for the nonarithmetic processing of data. The data
fields are processed one byte at a time.
In some cases the left four biti and the
right four bits of a byte are treated
separately.

I

I

I
I
I

I

I

I
1
I DEND I DS
IDOR
1 DS
IPROFEI DS

1

1
ICL4
ICL2
ICL5

I

Figure 6.

Decimal Division

I

1
I

1
I

I
1
I
1
I
I
I
I
Il _____ i I _________ iI _________________________ JI
Assume the Assembler has allocated
storage locations as follows:
DEND hexadecimal A09, PROFE hexadecimal F40, and DOR
hexaaecimal CAC. Register 9 contains hexadecimal 0400.
The Assembler automatically
calculates the displacements for the two
operands by subtracting the contents of
register 9 from the respective storage
address values.

OPERATIONS

Processing of data fields in main
storage proceeds from left to right. A
field may start at any address excluding
the reserved areas.
In logical operations the data fields
are considered to contain alphameric data.
An exception is the Edit-instruction which
requires packed decimal numbers in the
second data field.

The source and object codings for the
ZAP and DP are shown below.
Source statement:
ZAP

PROFE,DEND

Assembler produced object code:

The data are either in main storage or in
the instruction itself. They may be a
single character or an entire field.
If
two fields are used, they must be of equal
length. Exception:
the Edit-instruction.
The two formats for logical data are:
Machine Instructions

33

Fixed Length (one byte; storage-immediate
operations)

r---------,

55-Format

Isingle
I
IL character!
_________ J

o

II

I

7

0

Variable Length (1 to 256 bytes; storage to
storage operations)

~

o

8

L

8

exl,;e1-Jl... .J.uu

U.1.

20

D2

36

32

47

The first and second operand

__ _________ J
~

15

In storage-to-storage (SS) operations,
the fields may. start at any address_1-.':_'with _ _ _
~

16

82

D1

1

fields must have the same length.

CONDITION CODE

_ _ _ _ _ _ ..L..! _ _ _

8

The address of the each data field is
the sum of the con~ents the respective Band D-fields.

r--T---------,
r---------T---------T-1
I character Icharacter I
I character I
L---------~---------J-4

I

I

_
. I
OP';'code

.L.1-._

l..ue

~~

_ _ ..L.

.I...J..L~l..

...

,.,.

.J.'1"t

1-. __ .L.. _ _

..

J.J:tl..t:~f'

WU.J.l,;U

Cl.I..e

AF~ER

LOGICAL OPERATIONS

The results of the logical operations
determine the condition code. Moveoperations do not set a code.

In case

_.c

U.1.

reserved. The maximum length of a field is
256 bytes. Immediate data is limited to a
length of one byte.

the Edit-instruction the condition code
indicates the status of the field to be
transferred into the mask.

Only the EDIT operation handles data of
packed format. The other instructions
handle all bit combinations.

In the case of the Compare Logical Immediate the first data field is compared to
the immediate data. In case of the Compare
Logical Character the first data field is
compared to the second data field.

Storage-to-storage instructions may
address· overlapping fields. The result of
overlapping depends on the particular
operation. overlapping does not influence
the operation if the contents of the field
remain unchanged (e.g. in a comparison).
If one or both change, however, execution
of the operation may be influenced by the
overlapping and by the manner in which the
data are rounded off and stored.

Table of condition codes:

r---------------T-----T--------T------T---'
I 00 I 01
I 10
111 I

I

~---------------+-----+--------+------+---~

ITest under Masklzero Imixed
1-lonel
lAnd
Izero Inot zerol-1-- I
jCompare Logicaljequalilow
ihigh I-lOr
Izero Inot zerol-1-IEdit
zero LI>
zerol-L
_______________ Izero
_____ 1<
________
______
L ___ JI
~

MACHINE FORMATS OF INSTRUCTIONS FOR LOGICAL

OPERATIONS

~

All other logical operations leave the condition code unchanged.

Lo~ical instructions are either in the
SI-or the SS-forrrat.

Error conditions .which may occur during the
execution of non-arithmetic operations are:

SI-Format

OP-code

o

8

16

20

31

The first data field has a fixed length
of one byte. The second operand also has a
length of one byte but it is contained
directly in the instruction.
The general registers are not affected
by an SI-instruction.
34

1.

Operation code invalid

2.

Addressing error
a. An instruction address or an
operand address refers to the protected first 144 byt~s of main
storage (addresses 0 to 143).
b. An instruction address or an
operand address is outside avail=
able storage.
c. The last (highest) main-storage
position contains any part of an
instruction that is to be executed.

r-------T--T--T---'

4.

5.

~

IOp-codeII 2 \B 1 ID 1 I
~-------+--+--+---~
I _______
92
15BIA
L
__ __ 11F41
___ J
~

specification error
The low-order bit of an instruction
address is one, i.e., no halfword
boundary.

~

3.

Data error
An invalid digit code is contained
within the second operand field of an
Edit operation_

After execution storage location A22 contains hexadecimal 5B, a $ sign.

CFU parity error.

MVC -- MOVE CHARACTERS

r--------T---------T----------------------,

INSTRUCTIONS FOR LOGICAL OPERATIONS

r-----------------------------T----T------,

I
-IOp- I
I
ICodelFormatl
IName
~-----------------------------+----+------~
lMove Immediate (MVI)
I 92
SI
IMove Characters (MVC)
I D2
SS
IMove Numerics (MVN)
1 Dl
SS
IMove Zones (MVZ)
1 D3
SS
ICompare Logical Immediate
I 95
SI
I (CLI)
I
ICompare Logical Character
I D5
SS
I (CLC)
I·
IEdit (ED)
I DE
S5
lAnd Immediate (NI)
I 94
SI
lOr Immediate (01)
I 96
SI
ITest under Mask (TM)
1 91
SI
IHait 6 Proceed (HPR)
I 99
S1
(TR)
I ____
DC _____
SS _
LITranslate
_____________________________
~

~

~

Function: The contents of the second data
field are placed into the first data field.
Processing is performed from left to right
one byte at a time.
The two fields may overlap. If the
first field is to the left of the second
field, then transfer will proceed correctly. If the first field is exactly one byte
to the right of the second f ield then this
byte will be propagated throughout the
first field.
i•

Condition Code:

No change.

~

MVI --- MOVE IMMEDIATE

r--------T---------T----------------------,
\ Operation 1Operand
I

I Name

~--------+---------+----------------------~
\blank orlMvI
\D 1 (B 1 ).1 2
1
1L________
symbol \ _________ I _______________ - ______ J1
~

!Name
1Operation I Operand
I
~--------+---------+----------------------~
Iblank orlMVC
ID1(LJB1),D2(B2)
I
1
symbol I _________ I __ - - __________________ JI
L ________

Example: Assume register 11 contains
(hexadecimal) 0258, register 15 contains
(hexadecimal) 04BO, storage location 3E8
(hexadecimal) contains optional data"
storage location 07DO (hexadecimal) contains C9C2D4, the displacement in the first
field is 190 (hexadecimal), and that in the
second field is 320 (hexadecimal).
Source statement:

~

Function: The byte fro~ 12 is placed
directly into the storage location
addressed by B1 and D1 -

MVC

400(3,11)J800(15)

From this source statement the Assembler
produces the following obj·ect code:

r-------T--T--T---T--T---'

10p-codelL IB11D1 IB21D2 1
~-------+--+--+---+--+---~

IL _______
D2
12
__ IB
__ 1190lF
___ __ 13201
___ J
~

Example: Assume.register 10 contains
 of each byte
remain unchanged. Movement is from left to
right one byte at a time.
The digits are
not checked for validity. The fields may
overlap.

Source statement:
200(4,15),400(15)

MVN

From this source statement the ~ssembler
produces the following object code:
r-------,.--T--T---T--T-

~

Ex~~£1~:

Assume register 10 contains
 second operand

-- MOVE NUMERICS

r--------T---------T----------------------,

IName
I Operation I Operand
I
~--------+---------+-----------------i
Iblank orlMVN
ID1(L~B1}~D2(B2)
I
Il ________
symbol LI _________ I ______________________ JI
~

Function: The low order four L ~s (the
numerics) of each byte in the sec ld data
field are placed, from left to rigl.·, into
the corresponding low order four bit~ of
the first field.
The high order four bits
(the zones) of each byte in the second
field remain unchanged. The digits are not
checked for validity. The fields may
overlap.

Ex~E1~:

Assume register 15 contains
(hexadecimal) 7DA, storage location 08A408A7 (hexadecimal) contains F4F3F2Cl,
storage location 096A (hexadecimal) contains F9F8F7D6, the displacement in the
first field is C8 (hexadecimal), and that
in the second field is 190 (hexadecimal).
36

Examp!~:

Assume register 15 contains
(hexadecimal) 01F4, storage location 05DC
(hexadecimal) contains E9, the displacement
in the first operand is 03E8 (hexadecimal),
and the immediate data is the letter A.
Source statement:
eLI

1000(15),C'A'

From this source statement the Assembler
produces the following object code:

r-------T--T--T---'
jop-codejI 2 jB 1

iD 1 i

r-------t--t--t---1
I 95
ICll F 13E81

l _______

~

__ i __ i ___ J

After execution the condition code setting
is 10.

CLC -- COMPARE LOGICAL CHARACTERS
r-~------T---------T----------------------'

I Name

I Operation I Operand

I

~--------+---------+----------------------~
Iblank orlCLC
ID1 (L,B 1 ),D 2 (B a l
I

I
I
L________ L _________ L ______----------------J

I symbol

I

Function: The contents of the first data
field ?re compared with those of the second
data field.
The fields may have a maximum
length of 256 bytes. Comparison proceeds
from left to right. The comparison is terminated as soon as inequality is
encountered.
All bytes are treated alike as eight bit
unsigned binary values. The order of comparison is the Systern/360 collating
sequence: Special characters, lower case
letters~ upper case letters, digits.
All
256 bit combinations are valid.
Condition Code:
00:
01:
10:

first operand
second operand
first operand < second operand
first operand> second operand

Exam£1~:

Assume r~gister 11 contains
(hexadecimal) 0320 storage location AFO-AF3
(hexadecimal) contains D1D6C8D5, storage
location 0708-070B (hexadecimal) contains
D1D6C5E8. the displacement in the first
operand is 7DO (hexadecimal), and that in
the second operand is 3E8 (hexadecimal).
Source statement:

crc

2000(4,11).1000(11)

From this source statement the Assembler
produces the following object code:

r-------T--T--T---T--T---'I

IOp-codelL tB11D1 l Bal D2

~-------t--t--+---+--t---~

I D5

of the pattern (the first data field). The
edited result replaces the pattern. The
two fields must not overlap.
Editing iLcludes sign and punctuation
control and the suppressing and protecting
of leading zeros. It also facilitates programmed blanking of all-zero fields.
Several numbers may be edited in one operation, and numeric information may be combined with alphabetic information.
The length field applies to the pattern.
It may have a maximum of 256 bytes. The
pattern has unpacked format and may contain
any character. The source field has packed
format and must contain valid decimal
digit-and sign-codes. Its left half-byte
must always contain one of the digits 0-9.
The right half-byte may be a digit or a
sign.
Both fields are processed left to right
one character at a time. Overlapping
pattern-and source-fields give unpredictable results.
A so-called S-trigger controls the Editoperation. Depending on various conditions
during the operation the trigger is set
either to ON or OFF. This setting determines whether a source digit or a fill
character is inserted into the result
field.
As mentioned before, the pattern may
contain any unpacked character. However l
three bit-combinations have special
significance:
0010 0000 (hexadecimal 20)
digit-select
character
0010 0010 
I

6
7

1L symbol
I _________ LI ______________________ JI
________ .L

8-11

12-15
16-31

The rightmost 16 bits of the
a5dress of the next sequential
instruction, are storej as link information
in the general register specified by R1..
Next~ the address specifie5 by B2 /U 2 is
stored as an instruction address in the
PSW. This amounts to a branch to the
address specified by B2 /D 2 •

Not Used
Condition Code
Not [Jse:l
Overlap Mo1e (8ubmodel 5 only)
USA.SCII Mode Bit
Channel Mask
Device A.::l::lress
Function Specification
Instruction A.ddress

Function:
PsW~-the

Pro~ramming

1.

Nhich is transferred fCJD nain

storage to the PS~ by the Set PSW
instruction should:
a. ~ot refer to the protected first
llJ4 bytes of main stora~e,

rhe contents of register 10 are arbitrary.
A.ssume Lhat register 11 contains hexadecimal OlJlJB,
PSW bits 16-31 represent hexadecimal 036B,
D2 is hexadecimal 12C (decimal 300).

BAS

The instruction ajjress portion of the
~ord

f~~!!e.!.~:

Source statement:

Notes

b.

Have t. he 1 east. s; go i fi

c.

zero, anj
Be within the limits of available
storage.

C::;J

ot. hi t-.

If these ~onjitions are not satisfied,
an addressing or specification error
halt will occur.
2.

rhe con::lition co1e is set by the Set
PSW instruction to the value containe::l
in the wor::l transferred from main
storage to the PSW.

3.

Main-storage boundaries are not
require:l of the first operand a::l:lress
in the set PSW instruction.

U

The condition code, US~SCII no:le bit,
channel mask, and overlap mode bit in
the PSW are zero wben tbe CPU is in the
reset state. rhe instruction a:l::lress
portion of the PSW is not changed when

10.300(0,11)

Assembler produced object code:

r-------r--r----r--r---l
IOp-co:leIR1.IX=O IB21D2 I
~-------+--t----+--+---~

IL _______
lJD
~ LI ____
0
I __
B 112
CJI
LI __
___
~

~

A.fter execution register 10 contains
hexadecimal 0368 and a branch to storage
locati~n

hexajecimal 0577 is taken.

..LL. .....

Lue

""T""!""
~ru

.! _ _ _ _ _
~b

.-.L

L~b~L.

§!~m2!~:

Assume D1 is 875 (hexadecimal
036B)J and register 11 contains 555 (hexadecimal 0228). Bits 16 "throu;Jh 31 of the
psw cpntain .0444 (hexadecimal),

•

Control I/O (CIO)

•

Test I/J and Branch (TIOB)

•

Transfer I/O (XIO)

Source statement:
SPSw

875(11)

The address of the next sequential instruction as given bl' bits 16 through 31 of the
PSw will now be 1430 (hexadecimal 0596).

You can find a detailed descriotion of
these instructions in the SRL pubiication
r~~_~Y~~~m~l~~~Qi~!_~~Fug£~iQg~l_~h~E~£~
~~£i~~i£~,

INPUT/OUTPUT

Form

G~26-5847.

OPER~TIONS

The ~ssembler program supports the following Input/Output operations:

It is recommended, however" that you use
the IBM-supplied Ioes nacro definitions for
your input/output operations.

Machine Instructions

45

Literals

A l~teral is one way to introduce data into
a ~rogram. It represents data itself rather than a reference to data.
Literals provide a means of entering
constants (such as numbers for calculation,
addresses, messages, etc.)~ into a program
by specifying the constant in the o~erand
of the machine instruction in which it is
used. The ~ssembler program assembles the
value specified by the literal, stores this
value in a nliteral pooln, and places the
address of the storage field containing the
value in the operand field of the assenbled
s~urce statement.
A literal is an alternative to using the
~ssembler instruction as a means to
enter data into the program, and then using
the name of the DC instruction in the
operand. Literals can be used in nachine
instructions only. There, you may use a
literal wherever a storage address is ~er­
mitted as an operand.
DC

Only one literal is allowed in a machine
instruction. ~ literal must not be specified in the first operand of a machine
instruction. It cannot be changed in
storage. i.e., it must not be used as the
receiving field of a machine instruction
that modifies storage~ e.g., 8TH.

=CL7'PA3E'

a character constant with
eKplicit length.
=X i lA4C'
a hexadecimal constant.
=B'10011110'-- a binary constant.
=P'+324'
-- a de~imal constant r the various
constant types in the absence of a length
modifier. The implied length is assigned
before application of the duplicati~n
factor.
Examples of literals appear throughout
the discussion of the DC instruction.
Duplication Factor: The duplication factor
way be omitted. If specified, the constant
is generated the number of times indicated
by the factor. The duplication factor must
be an unsigned decimal value. It is applied after the constant is fully assembled,
i.e., after it has been developed into its
proper format.
A duplication factor of zero is not
permitted.
!Ye~:

The type defines the type of constant being specified. From the type specification, the Assembler determines hON it

is to interpret the constant and translate
it into the appropriate machine format.
The type is specified by a letter code as
shown in ~ppendix D. Further information
about these constants is provided under
Co!!sta!!:!:_
Length Modifier: A length modifier explicitly describes the length of a constant in
bytes (in contrast to an implied length)
apd becomes the length attribute of the
symbol in the name field.
The length modifier is written as Ln,
where n is an unsigned decimal value. The
value of n represents the number of bytes
of s'torage that are assembled for the constant. The maximum value permitted for
length modifier supplied for the various
types of constants is summarized in Appenoix D. This table, also indicates the
implied length for each~ type of constant;
the implied length is used unless a length
modifier is present.
A length moditier may be specified for
any type of constant. You would use a
length modifier when you want the assembler
to pad the constant (extend 'it with either
blanks or zeros).
For example, the instruction DC CL3'~'
defines a constant having a length of three
bytes" the leftmost byte containing the
character and the other two bytes containing blanks.
Note: No boundary alignment will be performeo when a length modifier is specified.
constant: A data constant (all types
except-Y) is enclosed in apostrophes. An
address constant (type Y) is enclosed in
parentheses. Thus, the format for specifying the constant is one of the following:
•

'constant'
(constant)

The total storage requirement for a data
definition is the product of the length
times the duplication factor (if present)
plus any byte skipped for boundary alignment of the first constant.
The subsequent text describes each of
the constant types and provides examples.
~::=~har~r Con~!!!!1:

Any of the valid
256 punch combinations may be designated in
a character constant.

Special consideration must be given to
representing apostrophes and ampersands as
characters. Each apostrophe or ampersand
desired as a character in the constant must
be represented by two apostrophes or ampersands. Only one apostrophe or ampersand
appears in storage.

The maximum length of a ch~racter constant is 32 bytes. No boundary alignment
is performed. Each character is translated
into one byte. Two apostrophes or two
ampersands count as one character.
If no length modifier is given, the size
in bytes of the character constant is e~ual
to the number of characters in the constant. If a length modifier is provided~
the result varies as follows:
1.

If the number of characters in the constant exceeds th,e specified length, as
many of the rightmost bytes as necessary are dropped.

2.

If the number of characters is less
than the specified length, the excess
rightmost bytes are filled with blanks.

In the following example, the implied
length attribute of FIELD is 12:

r-------T-----------T---------------------,
I Operation I Operand
I

I Name

.-------t-----------r---------------------~

IC'rorAL
IS 110'
lIFIELD
_______ 4IDC
___________ L
_____________________
JI
However, in this next example, the
explicit length attribute is 15, and three
blanks appear in storage to the right of
the zero:

r-------T-----------T---------------------,

I Name
I Operation I Operand
I
.-------+-----------+---------------------~
I FIELD IDC
ICL15'rOT~L IS 110'
I
l ____

---L-----------L---------------------J

In- the next example, the implied length
attribute of FIELD is 12, although 13
characters appear in the operand.
The two
ampersands count as only one byte.

r-------r-----------T---------------------,
I Name
I Operation IOperand
I
~-------+-----------+---------------------~
Il FIELD
IS &&10'
_______ LIDC
___________ 4IC'TOT~L
_____________________
JI

Note that in the next example, a length
of four has been specified~ but there are
five characters in the constant.

r-------r-----------T---------------------,
I Name
I
I~peration

I~perand

~-------+-----------+---------------------~
FIELD IDC
lI _______
___________ L13CL4'~BCDE'
_____________________ JI
~

The generated constant would be:
ABCDABCDABCD
The same constant could be specified as
a literal as follows:
~ssembler

Instructions

49

r-------T-----------T---~-----------------,

IName

I Operand

I Operation

I

.-------t-----------t---------------------~

lI _______

I ___________
MVC
I AREA
(12) , =3CL4' ABCDE ' JI
_____________________

~

~

On the other hand, if the length had
been specified as six instead of four, the
generated constant would have been:
ABCDE ABCDE ABCDE

x -- Hexadecimal constant: A hexadecimal
constant-consists of-one-or more of the
hexadecimal digits 0-9 and A-F. rhe maximum length of a hexadecimal constant is 32
bytes (64 hexadecimal digits). No halfword boundary alignment is performed.
Constants that contain an even number of
hexadecimal digits are translated as one
byte per pair of digits. If an odd number
of digits is specified, the leftmost byte
has the leftmost four bits filled with a
hexadecimal zero w while the rightmost four
bits contain the odd (first) digit.
If no length modifier is specified, the
implied length of the constant is half the
number of hexadecimal digits in the constant (a hexadecimal zero is added to the
high-order byte if there is an odd number
of digits). If a length modifier is specified, the-constant is handled as follows:
1.

2.

If the number of bytes the constant
could occupy exceeds the specified
length, the extending 1ef~mos~ bytes
are dropped.
If the number of bytes the constant
could occupy is less than the specified
length, the necessary bytes are added
to the left and fillej with hexadecimal
zeros.

A four-digit hexadecimal constant provides a convenient way to set the bit pattern of a binary halfword. rhe constant in
the following example would set the bits of
the first byte of a halfword to ones:

r------T-----------T----------------------,
I Operation I operand
I

I Name

~------+-----------+----------------------~
IDS
10H
I
lITEST
______ IDC
___________ IX'FFOO'
______________________ JI

I

~

~

The DS instruction 3ets the location
counter to a ha~.fword boundary.

In the following example, the digit A
would be dropped, because five hexadecimal
digits are specified for a length of two
bytes:
50

r----------T-----------T------------------,
I Operation I Operand
I

I Name

t----------+-----------+------------------~

IALPHACON
l __________ IDC
___________ L13KL2'A6F4E'
__________
~

I

~~~-----J

The resulting constant"would be 6F4E,
which would occupy the specified two bytes.
It would then be duplicated three tiwes, as
requested by the duplication factor. If it
had merely been specified as X'A6F4E', the
resulting constant would have had a hexadecimal zero in the leftmost p~siti~n:
Ol\6F4E
~_-- Binary Constant:
A binary constant is
written using ones and zeros enclosed in
apostrophes. Duplication and length may be
specified. The maximum length of a binary
constant is eight bytes.

The implied length of a binary constant
is the number of bytes occupied by the constant, which includes any necessary padding. Padding or truncation takes place on
the left. The padding bit used is a zero.
The following example shows the coding
used to designate a binary constant. BCON
would have an implied len~th attribute of
one.

r--------T-----------T--------------------,
I Operation I Operand
I

'Name

.-~------+-----------+--------------------~

I BCON
I DC
I B' 11011101'
I
IBTRUNC IDC
IBL1'100100011'
I
lI BPAD
________ LIDC
___________ IBL1'101'
________________ -- __ JI
~

BTRUNC would be assembled with the leftmost bit dropped as follows:
00100011
BPAD would be assembled with five padding zeros, as follows:
00000101
~~!~ed=E2!~1_£2~~!~~!:

A fixed-point
constant is defined as an integer and written as a signed or unsigned decimal value.
A positive sign is assumed if an unsigned
number is specified.

The decimal value is .converted to its
binary equivalent and assembled as a halfword. It is aligned on halfword boundary
if a length is not specified. ~n implied
length of two bytes is assumed. A length
of one or two bytes may be specified by a
length modifier, in which case no boundary
alignment occurs.
Highest positive and negative values for
a fixed-point constant are:

Max
2 15 -1(=32761)
2 7 -1(=127)

the digits is iaentical to the configurations for the hexadecimal digits 0-9 as
stated under ~exaaeci~al S~!f-~efig~g~
Term.

Mir.

=2'15"(=-32768)
- 27 (=-128)

The binary number occupies the rightmost
portion of the field in ~hich it is placed.
The unoccupied portion (i.e., the leftmost
bits) is filled ~ith the sign. A 1-bit for
positive and a a-bit for negative numbers.
If the value of the number exceeds the
length 9 the necessary leftmost bits are
dropped after conversion. A negative number is- carried in twos complement form.
~ halfword is generated from the statement shown belo~. The value attribute of
CONWRD is the address of the left byte of
the half~ord, and the length attribute is
two f which -is the impliea length- f or a
halfword fixed-point constant.

For both packed and zoned decimal numbers, a plus sign is tran~lated into the
hexadecimal digit C, and a ninus sign into
the digit D.
L
If no length modifier is given, the
lmplied length for either constant is the
number of bytes the constant occupies (taking into account the format, sign, and
possible addition of zero bits for packed
decimals). If a length modifier is given!,
the constant is hanalea as follows:

1.

If the constant requires fewer bytes
than the length specifies, the necessary number of bytes is added to the
left. For zonea decimal format, the
character zero is placed in each added
byte. For packed decimals, all eight
bits of each added byte are set to
zero.

2.

If the constant requires nore bytes
than the length specifies, the neces~
sary number of leftmost digits or pairs
of digits is aroppea, depenaing on the
specified format (zoned or packed).

r--------T-----------T--------------------l
IName
I Operation I Operand
I
~--------t-----------+--------------------~

I

ICONWRD
L
________ IDC
___________ IH'658'
____________________ J
~

~

The next example uses a naIf word constant as a literal and lo~ds ones into bits
8 through 15 of register 15.
r------T-----------T----------~-----------l

I Name

I Operation !Operand
I
~------+-----------+-~--------------------~
I ______ ILH
L
___________ 115~=H'255'
______________________ JI
~

~

P and Z -- Decimal Constants: A decimal
constant is written as-~-~I~ned or unsigned
decimal value. If the sign is omitted. a
plus sign is assumed. The maximum length
of a decimal constant is 16 bytes.
No
halfword boundary alignment is performed.
If zoned decimal format (Z) is specified,
each decimal digit is translated into one
byte. Except for the rightmost byte" the
translation is done according to the
character set sho~n in Appendix J. The
rightmost byte contains the sign in its
left half-byte and the rightmost digit of
the ~ecimal constant in its right
half-byte.
In packed decimal format (P), the -rightmost byte contains the rigntmost decimal
digit in its left half-byte and the sign in
its right half-byte. The other
decimal digits are "packed" two at a time
into one byte.
If you specify ~n even number of decimal
digits, one digit will be left unpaired,
because the rightmost digit is paired with
the sign. Therefore, in the leftmost byte J
the leftmost four bits ~ill be set to zeros
and the rightmost four bits will contain
the first digit. The bit configuration for

For example, the instruction DC; P'12' is
translated into hexadecimal 012:, and the
instruction DC Z'-5~3' into hexadecimal
F5F4D3.
The follo~ing example illustrates the
use of a packed decimal literal.

r------T-----------T----------------------,
I Operation I Operand
I

I Name

.------+-----------+----------------------~
IL______ lAP
___________ IOUT~RE~,=PL2'+25t
______________________ JI
~

~

Y -- Address Constant: ~ddress constants
are-normally-usea-for initializing base
registers to facilitate the addressing of
storage. Furthermore, they provide the
means of communicating between control sections of a multi-section progran. rhe
latter is explained in the section ~~~~
Segis!er_Ig~1r~£1!2g~·
~n adaress constant, unlike other types
of constants, is enclosed in parentheses
and specified as an absolute, relocatable,
or complex relocatable expression.
(Complex relocatable expressions are discussed
below. )

The value of the expression may range
between -2 15 (=-32768) and 215-1(=32761).
The implied length of an address constant
is t~o bytes, and the value is placed in
the rightmost portion. ~lignnent is to a
~ssembler

Instructions

51

halfword boundary, unless a length is specified. A length modifier may be used" in
which case no alignment will occur. The
length that may be specified depends on the
type of expression used for the constant; a
length of 1-2 bytes may be used for an
absolute expr.ession, while a length of two
tytes must be used for a relocatable or
complex relocatable expression=
If an address constant contains a
location-counter reference, the location
counter value used is the storage address
of the first byte the constant will occupy.

is a complex relocatable expression constant describing the length of SECTION1.
E~lo£~tion Di£~!2g~EY_iRLD):

If an address
constant is specified by a relocatable or a
complex relocatable expression, the
Assembler automatically places certain
information into the relocation dictionary.
This informa~ion tells the Linkage ~ditor
that this address constant DUst be updated
when the program is relocated and how this
updating is to be performed.
DS -- DEFINE

If you specify a duplication for an
address constant containing a locationcounter reference, the value of the location counter used in each duplication is
incremented by the length of the constant ••
In the following example, the field
generated from the statement named ~CONST
contains a constant that occupies two
bytes. Note that there is a locationcounter reference. The value of the location counter will be the address of the
first byte allocated to the constant. The
second statement below shows an address
constant used as a literal. since a
location-counter reference is not permitted
within a literal, the instruction must be
named and the name used in the literal if a
location-counter reference is desired. The
instruction ADCON will generate the address
of the constant named FIELDA.

r-------T-----------T---------------------,
IName
1 Operation I Operand
I
t-------+-----------+---------------------~
jACONST I DC
I Y(*+4096)
I

11\

I LH
I 14" =Y (A)
I
IFIELDA I DC
I H'lOl'
I
DC
I _____________________
Y(FIELDA)
lIADCON
_______ 1I ___________
JI

The OS instruction is used to reserve areas
of storage and to assign names to those
areas. The use of this instruction is the
preferre~ way of symbolically defining
storage for work areas~ input/output areas.
etc.

r----------T-----------T------------------,

I Name
I Operation I Operand
I
~----------+-----------+------------------~
JA symbol IDS
lOne operand
I
lor blank 1
Iwritten in the
I
I
Ifor~at described
I
Il __________ I ___________ I ___________
below
- ______ JI
~

1.
2.

3=

For example, if SECTrONl and SECTION2
name two consecutive sections, the
instruction
DC

Y(SECTION2-SECTION1)

~

The format of the DS operand is similar
to that of the DC operand.
It consists of
a duplication factor, a type c~dew and a
length modifier. The rules for DC instructions are also applicable for DS instructions with the following exceptions:

~

Complex Relocatable EXEf~~~!2g~:
rhese
expressions contain two or three unpaired
relocatable terms or a negative relocatable
term in addition to any absolute or paired
relocatable terms that may be present. A
complex relocatable expression may only be
used to specify an address constant.
Unlike relocatable expressions, complex
relocatable expressions may represent a
negative value. A complex relocatable
expression may consist of external symbols
and designate an address in an independent
assembly that is to be linked and loaded
with the assembly containing the address
constant.

ST~RAGE

~ duplication factor of zero i3 permitted.
(It does not advance the location counter>.
Only constants of types C and Hare
permitted in the OS instruction. ~
duplication factor is permitted for
both types.
The length modifier may only be specified for the c-type constant.
(Range

0-256).

4

The specification of data
is not permitted in a DS ~perand.

If you have a symbol in the name field
of a OS instruction, its value attribute is
the location of the leftmost byte of the
reserved area. The length attribute ~f the
symbol is the length (implicit or explicit)
of the type of data specified. 1\ny positioning required for aligning the storage
area to the proper type of boundary is done
before the address value is determined.
Skipped bytes are not zeroed.
A fixed-point field (H) has an implied
length of two bytes. rhe leftmost byte is
aligned to a halfword boundary_ Use this
code if 'you desire to reserve two bytes of
storage aligned to a half~ord b~undary. A

duplication factor would have to be used to
reserve a larger area~ because the maximun
length specification for this type is two
bytes.
Character (C) fields have an implied
length of one byte. If you use this code,
you would have to specify a length modifier" unless you want to reserve just one
byte. Although no alignment occurs, the
use of a c-type field permits greater latitude in length specifications, the maximum
for this type being 256 bytes,.
The size of a storage area that can be
reserved by using the os instruction is
limited' only by the maximum value of the
location counter. Since the maximum length
specification is 256, an area larger than
256 must be specified with a duplication
factor.
For example" the statement
OS 2CL200
can 'be used to reserve 400 positions of
main storage.
To define four 10-byte fields and one
100-byte field. the respective 'OS instructions might be as follows:

r----------T-----------T------------------,

IName
I Operation I Operand
I
~----------+-----------+------------------~
tFIELD
IDS
1 4C L10
I
Il AREA
IDS
ICL100
__________ .l ___________ .l. _________,_________ JI
Although FIELD might have been specified
as one 40-byte field, the preceding definition has the advantage of providing FIELD
with a length attribute of 10. rhis would
be important when using FIELD as a machineinstruction operand governed by a length
consideration.
Additional examples of OS statements are
shown below:

r-----T---------T-------------------------,

IName IOperationlOperand
I
~-----+---------+-------------------------~
lONE IDS
ICL80 (one ~O-byte field. I
I
I
I length attribute of 80) I
ITWO IDS
180C (80 one-byte fields, 1
I
I
I length attribute of one)1
ITHREEtDS
14H (four halfwords,
I
1
I
I length attribute of
I
two)
Il _____ .l.I _________ .l.I _________________________
JI
Note: A DS instruction causes the storage
area-to be reserved, but not to be set to
zeros. You cannot assume that the area
contains zeros or data saved from a previous program or program phase.

Forcing Alignment: The location counter
can be forced to a halfword boundary by
using the H-type field with a duplication
factor of zero.rhi's method may be used to
obtain boundary alignment that ~therwise
would not be provided.
For example, the
following statements would set the location
counter to the next half-word b~undary and
then reserve storage for a 128-byte field
(whose leftmost byte would be ~n a halfword boundary).

r----------T-----------T------------------,
I Name
I Operation IOperand
I
~----------+-----------+------------------~
I DS
10H
I
It __________
AREA
IDS
ICL128
.l.
___________ .l
__________________ I

I

~

Q.~fin!!:!g:_£:ie1~~_Qf_~!L~E~~:
A DS instrllction with a duplication factor of zero may
be used to assign a name and a length to an
area of storage without actually reserving
the area.

A OS statement for c-type fields with a
duplication factor of zero does not advance
the location counter. Additional DS and/or
DC instructions may then be used to reserve
the area and assign names to fields and
constants within this area.
For example, assume that 80-character
records are to be read into an area for
processing and that each record has the
following format:
positions
Positions
Positions
positions
Positions

5-10
11-30
31-36
47-54
55-62

Payroll number
Enployee name
Date
Gross wages
withholding tax

The following example illustrates how
you might use OS instructions to assign a
name to the record area, then define the
fields of the area and allocate storage for
them.

r----------T-----------T------------------,

I Name
I Operation I Operand
I
r----------+-----------+------------------~
IRDAREA
IDS
IOCL80
I
I CL4
i
I
I DS
IPAYNO
IDS
ICL6
I
I NAME
IDS
ICL20
I
IDS
IOCL6
I
I DATE
IDAY
IDS
ICL2
I
IDS
I CL2
I
I MONTH
I YEAR
IDS
ICL2
I
I
IDS
I CL10
I
IGROSS
IDS
ICL8
I
IFEDTAX
IDS
ICL8
I
IDS
I CL18
lI __________ .l.
___________ .l.
__________________ JI

Assembler Instructions

53

The first instruction names the entire
area by defining the symbol RDAREA; the
instruction gives RDAREA a length attribute
of 80 bytes~ but does not reserve any
storage. Similarly: the fifth statement
names a 6-byte area by defining the symbol
DATE: the three subsequent statements actually define the fields of DATE and allocate
storage for them. The second, ninth, and
last statements are used for spacing purposes and, therefore, are not named.
DCCW -- DEFINE CHANNEL COMMAND WORD
The DCCW instruction provides a convenient
way to define and generate a 6-byte channel
command word aligned at a half-word boundary. The format of the DCCW instruction
is:

r--------T---------r----------------------,
I Operation I operand
I

I Name

~--------+---------+----------------------1
IA sympollDCCW
/Four operands,
I
lor blank I
Iseparated by commas,
I
I
I
Ispecifying the conI
I
I
Itents of the channel I
word
lI ________ I _________ Icommand
______________________
JI
~

If READAREA represents i for. example, the
value 1204, the assembled CCW is
028012040080.
If there is a symbol in the name field
of the DCCW instru~tion. it is assigned the
address value of the leftnost byte of the
channel command worj. The length attribute
of the symtol is six.

Program Sect ioning and Link ing
Instructions
It is often convenient, or necessary, to
write a large program in sections. -The
sections may be assembled separately and
then combined into one object program. The
Assembler provides facilities fJr creating
multi-section programs and symbolically
linking separately assembled prJgran
sections.
Program sectioning and linking is closely related to the specification of base
registers for each control section. Sectioning and linking examples are given
under CS~f!_==_IQ~~~ify_Control_Se£~iQ~ and
~~dr~~~!ng An External Control Section.

~

CONTROL SECTIONS
The internal machine format of a channel
command word is described in the SRL publication !~M-§y~~em/~Mod~!_20L_Functi~~!
Char~teristi£§, Form GA26-5847.
All four operands must appear. They are
written, from left to right, as follows:
First operand: An absol"t~ expression
specifying the command code. The value of
this expression is right-aligned in byte
one.
Second operand: An absolute expression.
The value of this expression is rightaligned in byte two.
Third operand: An absolute or relocatable expression specifying a storage
address. The value of this expression is
right-aligned in bytes 3-4.
Fourth operand: An absolute expression.
The value of this expression is rightaligned in bytes 5 anj 6.
For further details see the pertinent
hardware SRL publication.
The following is' an example of a DCCw
instruction for a magnetic tape read:

r-----T-----------r-----------------------,

IName IOperation I operand
I
~-----+-----------+-----------------------~
l, _____ IDCCW
___________ IX'02',X'80',READAREA,801
_______________________ J
~

rio

""Of

~

A control section is the smallest logical
unit of a program. All elements of a control section are in a constant relationship
to each other. Therefore, the control section is the smallest separately relocatable
unit of a program. If a pro gran is sectioned, it must be written so that control
passes properly from one control section ~o
another. regardless of the position of the
control section in main storage.
A program is divide1 into control sections if it is to be assenbled in severa]
parts.
(Program parts assemblej at one
time are often called an assembly.) In a
multi-section program~ each control section
must be complete. An unsectioned program
is considered a single control section.
Since you have described storage symbolically you know ~h~~ eventually will be
entered into storage, regardless of whether
you write an unsectione1 program, a multisection program, or part of a nulti-section
program but you will, most likely, not know
where in storage a section appears. There
is no constant relatioship between individual control sections. rhus, knowing the
location of one control section does not
make another control section addressable by
relative addressing.
The output of the Assembler consists of
the assembled control sections, an External
Symbol Dictic>nary and a Relocation
Dictionary.

The External Symbol Dictionary contains
information the Linkage Editor program
needs to complete cross-referencing between
control sections as it combines them into
one object program. The Linkage Editor
program can take control sections from
various assemblies and combine them properly with the help of the corresponding
External Symbol Dictionaries. Successful
combination of separately assembled control
sections depends on the techniques used to
provide symbolic linkages between the control sections. This is described in the
sections below describing the CSECT, ENTRY,
and EXTRN instructions.
The Relocation Dictionary qonta~ns
information about certain address constants
(see DC-instruction) which must be updated
by the Linkage Editor Program when a control section is relocated.
The External Symbol Dictionary is contained in the ESD-cards in front of the
object deck.. The Relocation Dictionary is
contained in the RLD-cards mingled with the
TXT-cards.
The Linkage Editor program assigns locations to control sections in such a way
that the sections are placed.in storage
consecutively, in the same order as they
Occur in the program. Each control section
suhsequent to the first begins at the next
available half-word boundary.
A control section is normally identified
?y the CSECT instruction. However, if it
~s desired to specify a tentative starting
address, the START instruction may be used
to identify the first control section of an
assembly.
The first control section of an assembly
has the following special properties.
1.

Its tentative starting location may be
specified as an absolute value.

2.

It normally contains the literals
requested in the program" although
their positioning can be altered.· For
further explanation on positioning of
literals see the discussion of the
LTORG instruction.

Limitations
The-combIned number of control sections and
dummy sections (see QE~mY-£2ntro!_Section~)
for an assembly must not exceed eight.
The
combined number of control sections and
dummy sections plus the number of unique
symbols in EXTRN statements for an assembly
must not exceed 31. A maximum number of 20
ENTRY instructions can be processed in a
single assembly.

START -- START ASSEMBLY
~he START instruction may be used to give a
name and starting ad.dress to the first (or
only) control section of an assembly.
The
START instruction may be preceded only by
AWORK, AOPTN (in this order), r:TL, ISEQ,
REPRO, EJECT, SPACE, PRIN·r, TITLE instructions, and comments statenents.
There must
be only one START instruction in an
assembly.
ST~RT

The format of the
as follows:

instruction is

r----------T-----------T------------------,
1Name
IOperation IOperand
1
~------~---+-----------+------------------1
symbol 1START
lA self-defining
1
lor
blank 1___________ Iterm
or blank
L__________
__________________
J1

I~

~

~

If a symbol names the STARr instruction,
the symbol is established as the name of
the control section. If not, the control
section is considered to be unnamed. ~ll
subsequent statements are assembled as part
of that control section. This continues
until a CSECT instruction identifying the
beginning of the next control section or a
DSECT instruction is encountered.
A CSECT instruction naned by the same
symbol that names a START instruction is
invalid. An unnamed CSECT instruction that
occurs in a program initiated by an unnamed
START instruction is also invalid.
The symbol in the name field is a valid
relocatable symbol whose value represents
the address of the first byte of the control section. It has a length attribute of
one.
The Assembler uses the self-defining
value specified by the operand as the
starting location of the first control section. This value must be divisible by two.
For example~ either of the following stat~­
ments could be used to assign the name
PROG2 to the first control section and to
indicate an initial assembly 10cat:.iOlJ of
2040:

r-------r-----------r---------------------,

1Name
1Operation IOperand
1
~-------+-----------+---------------------~
IPROG2
1START
12040
1
2 1STARr
7 FB '
1LPROG
_______
___________ I X'
_____________________
JI
~

~

If the operand in a START instruction is
blank, the Assembler checks if NORLJ is
specified as the operand of an AOPTN
instruction, provided such an instruction
is given.
If NORLD is not specified~ the
Assembler Instructions

55

Assembler assumes that the program shall be
relocatable and sets the starting address
to zero. If it is specified, the Assembler
regards the program as not relocatable and
sets the starting address to the address of
the first available half word behind the
Monitor.

r------T---------T------------------------,
I Operation I Operand
I

I Name

t------+---------+------------------------~
I*************BEGIN OF PROGRAM************
ISECTl IS~ART
0
iBEGl
jBASR
10,0
I
lOSING
*,10

I

I.
I

i oe

If you omit the START instruction, the
~ssembler assumes one with blank name and
operand fields,.

Al

r'tr'lTII.."""

U0.Ll'11.:I

Bl
CSECT -- IDENTIFY CONTROL SECTION
The CSECT instruction identifies the beginning of a control section.
The format of
the CSECT instruction is as follows:

r----------T-----------T------------------,
I Name
I Operation I Operand
I
~----------+-----------+------------------~
I~ symbol
ICSECT
IBlank; or a comI
lor blank I
Iment preceded by
I
IL__________ 1I ___________ Lla__________________
comma.
JI

SEcr2,11

jUSING
LH
MVC

LH
CLC

11,=Y( SECT2)
FIELD1,FIELD2
ISECT3,12
112:,=Y(SECr3)
IFIELD1,FIELD3

I
I

IFIELDl OS
IH
I**********SECOND CONTROL SECTION*********
ISECT2 ICSECT
11,0
IBE32
IBASR
USING
*,11
I

I
I
I

IA2

I

USING
LH
MVC

FIELD1,10
10, =Y (FIELD!)
FIELD2il FIELDl

USING
LH
CLC

FIELD3,,12
12,=Y(FIELD3)
FIELD2 i, FIELD3

j

The symbol that names the CSEcr instruction is the name of the control section; a
blank indicates an unnamed section.
All
statements following the CSECT instruction
are assembled as part of that control section until a statement identifying the
beginning of the next control section
(i.e •• another CSECT or a DSECT instruction) is encountered.
The symbol in the name field is a valid
relocatable symbol whose value represents
the address of the first byte of the control section.
It has a length attribute of
one. Only one CSECT statement with the
same name is permitted within a program.

I
I

IB2

I
I
I

IFIELD2 OS
H
!**********THIRD CONTROL SECTION**********
ISECT3 ICSECT
I
,12,0
IBEG3
IBASR
*,12
1
lOSING

1
I
A3

~n

additional USING instruction is
needed because a CSECT instruction causes
the Assembler to disregard all previous
OSING instructions of the same assembly.
Figure 8 illustrates these rules.

BEG1+B1-~1,10

ILH
jMVC

10,=Y(BEG1+B1-A1)
FIELD3, FIELDl

I•
I.
B3

If you wish to use a symbol defined in
one control section as an operand in another of the same assembly, you must write a
USING instruction telling the Assembler
which register to use as the base register
for that control section.
The unpaired
term in the operand v in the OSING instruction (see USI~~_==_~§~_~~§~_~QQ!~§~_E~gi§~=
er) must be defined in that same control
section.

I·
I·
I USING

lOSING
ILH
ICLC

BEG2+B2-1\2,11
11~=Y(BEG2+B2-A2)

FIELD3,FIELD2

I•
I.
FIELD31DS

H

I•
I•

I ______ LlEND
END OF PROGRAM
L
_________ L ,________________________
J
Figure 8.

Example of a Multi-Section
Program

The MVC instruction in the control section named SECTl uses FIELD2 as an operand
and the CLC instruction uses FIELD3 as an
operand.
Both FIELD2 and FIELD3 are not
defined in control section SE:Tl. Therefore a USING statement must be issued prior

to using each symbol as an operand. aSING
SECT2,-11 tells the Assembler that a symbcl
defined in SECT2 will be' used and that its
base register is 11. Likewise. USING
SECT3" 12 tells that a . symbol d'~fined in
SECT3 will be used and that its base
register is register 12.
In the control section named SECT2 the
instruction USING FIELD1,10 tells the
Assembler to use register 10 as base
register to address control section SECTl
since FIELDlis defined in that control
section. The assumed base address is the
address of the instruction named FIELD1.
In the control section named SECT3!, to
use a different method" the i'nstruction
USING BEG2+B2-A2.11 tells the Assembler to
use register 11 as base register to address
control section SECT2 because the unpaired
term BEG2 is defined in' that control section. The assumed base address is the
value of the expression BEG2+B2-A2.
The statements named Al,B1"A2"B2, and
A3.B3 load the base register specified in
the respective USING statements immediately
preceding each statement with the address
of the first operand in each USING
statement.

If neither a named CSECT instruction nor a
riamed START instruction appearS at the
beginning of the program, the Assembler
determines that it is to assemble an
unnamed control sect~on as the first (or
only) control section. Only one unnamed
control section is permitted in a program.
If you write a small program that is unsecti6ned~ you need not use a CSECT
instruction ..

DUMMY CONTROL SECTIONS
A dummy control section is not part of the
obj~ct program; it only serves to describe
the layout of an area of 'storage without
actually reserving storage. (It is assumed
that the storage is reserved by another
assembly).

r----------T-----------T-------~-----------

,Name

\Operation

\ Operand

~----------+----~------+------------------~

lA symbol
I

I

L~

____

~

IDSECT

\ Blank; or a corr- !
Iment preceded by !
comma.
____ LI ___________ Lla
__________________
JI

I

The symbol in the name field must be a
valid relocatable symbol whose value rerresents the first byte of the dummy section.
It has a length attribute of one.
Symbols that appear in the name fiela of
a DSECT instruction or in the name field of
an instruction in a dummy secti~n nay be
used in USING instructions. Therefore,
they may be used in program elements (e.g .. ,
machine instructions and data definitions)
that specify storage addresses. An exampl-,::illustrating the. use of a dummy section
appears under AdgE§~~!~g~um~y_Se~~!2~~'
A symbol that names a statenent in a
dummy section maybe used in an address
constant (see DC instruction) :::'Oly if it iE:
paired with another symbol (with the opposite sign) from the same dummy section.

A location counter is used to determine thf
relative locations of named pr~gran elements in ~ dummy section. The location
counter is always set to zero at the beginning of the dummy section, and the locatior
values assigned to symbols that name statements in the dummy section are relative to
the initial statement in the section.

Suppose you wish to describe the format of
an area whose stora~e location will not be
determined until the program is executed.
You describe the format of the area in a
dummy control section and use symbols
defined in the dummy section as the
operands of machine instructions. ro
reference the storage area, you must:
1.

2.

Provide a USI~G instruction specifying
both a general register that the
Assembler can assign to the machine
instructions as a base register and an
address value from the dumny section
that the Assembler may assume the
register contains.
Ensure that the same register is loade~
with the actual address of the storage
area.

DSECT -- IDENTIFY DUMMY SECrION
The DSECT instruction identifies the beginning of a dummy section. More than one
dummy section may be defined per assembly,
but each must be named. The format of the
DSECT instruction is as follows:

Because the location counter is set to
zero at the beginning of the dunmy contra:
section~ the values assigned to symbols
defined in a dummy control section are
relative to the initial statenent of that
section. Thus, all machine instructions
~ssembler

Instructions

5~

referring to names defined in the dummy
section will~ at execution time, refer to
storage locations relative to the address
loaded into the register.

SYMBOLIC

An example is shown in the following
coding. ~ssume that two independent assemblies (assembly 1 and assembly 2) have been
loaded and are to be executed as a single
overall program. Assembly 1 is an input
routine that places a record into a specified area of storage, places the address of
the input area containing the record into
general register 13, and branches to
assembly 2~ Assembly 2 processes the
record. The coding shown in the example is
from assembly 2.
r---------T-----------r-------~-----------,

I Name

I Operation

I Operand

USING
CLI
BE
ATYPE

wORKA
WORKB

ICODE,C'A'
ATYPE

WORKB,PUrB

DS
OS

CL20
CL18

WORK~" PUT~

OSECT

AREA
CODE
PUTA
PUTB
L _________

1*,,12

I
I
I AREA, 13

MVC
MVC

DS

OS
DS
~

END
___________

~

I
I
I
I
CLl
I
CL20
I
CL18
I
1
___________________ JI

The input area is described in assembly
2 by the dummy control section named AREA.
Fields of the input area that are to be
proce~sed are named in the dummy control
section as shown. The Assembler instruction USING AREA,13 designates general
register 13 as the base register to be used
in addressing the DSECT control section and
indicates that general register 13 is
assumed to contain the address of ~RE~.
Assembly 1, during execution, ,loads the
actual beginning address of the input area
into general register 13. Because the symbols used in the OSECT section are defined
relative to the initial statement in the
section, the address values they represent
will~ at the time of program execution, be
the actual storage locations of the input
area.

58

Symbols may be defined in one assembly and
referred to in another, thus allowing symbolic linkages between independently
assembled sections. Linkages are only
possible if the ~ssembler is able to provide information about the externally
defined symbols to the Linkage Editor,
which resolves these symbols into
addresses. The Assembler places the necessary information into the External Symbol
Dictionary if the particular symbols are
specified in the ENrRY and ExrRN instructions. Symbolic linkages are described as
linkages between independent assemblies;
more specifically, they are linkages
between independently assembled control
sections.

I

~---------+-----------+-------------------~
~SMBLY2
START
10
BEGIN
BASR
112,0

USING

LINK~GES

In the program where the linkage symbol
is defined (i.e.# used as a name), it must
also be identified to the ~ssenbler by
means of the ENTRY Assembler instruction,
except when the symbol appears in the name
field of a ST~RT or CSECT instruction. It
is identified as a symbol that names an
entry point, which means that another program will use that symbol in order to
effect a branch operation or a data
reference. The Assembler places this
information in the External Synbol
Dictionary.
Similarly, the program that uses a symbol defined in some other program must
identify it by the EXTRN Assembler instruction. It is identified as an externally
defined symbol (i.e.,. defined in another
program) that is used to effect linkage tc
the point of 1efinition. The Assembler
places this information into the External
Symbol Dictionary.

ENTRY -- IDENTIFY

ENTRY-P~INT

SYMBOL

The ENTRY instruction identifies a linkage
symbol that is defined in one assembly but
may be used in another assembly. ~n ENTRY
instruction must not appear in an unnamed
control section or in a dummy section. The
format of the ENTRY instruction is as
follows:
r----~-T-----------T----------------------,

IName

I Operation I Operand

I

~------+------===--t----------------------~

IBlank I ENTRY
I A relocatable
I
I
I
I symbol that also
I
I
I
I appears as a state- !
I ment
name
lI ______ I ________ ===k=
_____________________
JI
~

The symbol in the ENTRY operand field
may.be used in the operand field of
instructions in other assemblies. The symbol· in the operand field must not be
defined in an unnamed control section or in
a dummy control section. The following
example identifies the statements named
SINE and COSINE as entry points to the
assembly.
r------T-----------T---~------------------,

\ Name \ operation \ Operand
I
~------+-----------+----------------------~
I
\ ENTRY
I SINE
I
\L ______ I ___________
ENTRY
I ______________________
COSINE
JI
~

~

NO~:
The name of a control s~ction need
not be identified by an ENTRY instruction
when another assembly uses it as an entry
point. The Assembler automatically places
information on control section names in the
External Symbol Dictionary.

r------T-----------T----------------------,
I Name I Operation I O p e r a n d i
~------+-----------+----------------------~
I EXTRN
I RArErBL
I
I
1 EXTRN
1 PAYC~LC
I
EXTRN
WITHCALC -----______ JI
IL ______ 1___________
LI ___________

I

~

External symbols shoulj be used only in
address constants. But if you do wish to
use an external symbol in a machine
instruction, you must write an OSIN3 statement before using the symbol as an operand
as illustratej in the following example:

r------T---------T------------------------,

\ Name I Operation I Operand
1
~------+---------+------------------------~
1
I EXTRN
1FIELD

1

I

1

I

1•

1

\

I•

I

Limitation: A maximum of 20 EN·rRY statements can be processed in a single
assembly ..
EXTRN -- IDENTIFY EXTERNAL SYMBOL
The EXTRN instruction identifies a linkage
symbol that is used in this assembly but
defined in some other assembly. Each linkage symbol must be identified, even symbols that name external control sections.
The format of the EXTRN instruction is as
follows:

1

I
I
I
I

I•

I LH
IUSING
ICH

I 8 r YFIELD
IFIELD,8
I 9, FIELD

I
I
I

I.
I.
I.

IYFIELDIDC

IY(FIELD)

i
I•
I
IL ______ I·_________ 1________________________ J
~

~

An example that employs the EXTRN
instruction appears under ~Qgf~~~ing_~n
~~tefnal_£Qg~E21_~~£!!Q~·

r------T-----------r,----------------------,
I Operation \ operand
I

1Name

~------+-----------+----------------------~
\Blank I EXTRN
I A relocatable
I
\ ______ I ___________ I ______________________
symbol
L
JI
~

ADDRESSING AN EXTERNAL CONTROL SECTION

~

The symbol in the operand field must not
appear as the name of a statement in this
assembly.
Limitation: The combined number of control
sections-;-dummy sections, and symbols specified in EXTRN instructions must not
exceed 31 for one assembly.
The following example identifies three
external symbols that have been used as
operands in this assembly but are defined
in some other assembly.

To link a program to a control section in a
different assembly, proceed as follows:
1.

Identify the external symbol with the
EXTRN instruction, and create an
address constant from the symbol.

2.

Load the constant into a general
register, and use the register for base
addressing or tranch to the section via
the register.

Figure 9 shows the coding that might be
used to incorporate a subroutine named SUBROUT (which is an external control section), to branch to this subroutine, an~ to
branch back to the main progran.

Assembler Instructions

59

r---------T-----------r-----------------------------------------------------------------,
NAME
I OPERATION I OPERAND
COMMENTS
i

!

~ND

~---------+-----------+-----------------------------------------------------------------~
cm7lorn
MAINPROG
I 0
BEGIN
BASR
S~ORE INSTRUCTION COUNTER INTO R12
I 12,0
USING
USE R12 FOR ADDRESSING rHE M~IN PROGR~M
i *,12
U.LC'1C'\..J.

EXTRN

I
I

LH

!CALLSUBR

B~SR

I
I
I

ISUB~DDR

Il _________

~

I
I
I
! SUBROUT
I
I
I
i lO,SUBADDR
! 11.10

DEFINE SUBROUT AS NAME OF EXrERNAL SECfrON

LOAD ADDRESS OF EXTERNAL SECrrON INTO RiO

BRANCH TO SUBROUT

I
I
I
DC
I Y(SUBROUT)
ADDRESS OF EXTERNAL SECrION
END
BEGIN
BRANCH TO BEGIN
___________
LI _________________________________________________________________
J1

r---------T-----------T-----------------------------------------------------------------,
I OPERATION I OPERAND AND COMMENTS
I

I NAME

~---------+-----------+-----------------------------------------------------------------~
ISUBROUT I CSECT
I,
CONTROL SECTION EXTERNAL ro MAIN PROGRAM
I
I
I USI NG
I *11 10
!

I
'
I
i
I
I ·
I
I
I
I .
I
I
I
I BR
I 11
RETURN TO INSTRUCTION FOLLOWING C~LLSUBR
I
Il _________ 1I ___________
END
LI _________________________________________________________________ JI
Figure 9.

~ddressing

an External Control section

Sa.e Regi.ter In.truction Statement.
USING -- USE BASE ADDRESS REGISTER
By means of the USING instruction you tell
the assembler
•

which pseudo registers (0 through 7) or
which general registers (8 through 15)
are available as base registers for
implicit addressing;

applies only to instructions following it
in the program. with the beginning of a
new control section (see CSEcr and JSECT
instructions) all previously available base
registers are dropped automatically. You
must use at least one USING instruction for
each control section you ~ant t~ address.
The format of the USING instruction is:

•

for which control section such a base
register is available;

r-----T---------T-------------------------,
IName IOperationlOperand
I

•

what value the register(s) will contain
at object time.

lIBlanklUSING
_____ L _________ LIv,r1~r2I1r3,rq
_________________________ JI

A USIN3 instruction does not load the
registers specified. It is your responsibility to ensure that the specified base
address values are placed into the registers (see the BASR instruction). ~n
example follows the description of the DROP
instruction.
A USING instruction has effect only
within the control section where it is contained and, withir that control section, it
60

~-----+---------+-------------------------~

Operands v and r1 are llandat~ry.
Operands r2' r3' and rq are optional.
Operand v must be a relocatable expression. It specifies a value that the
Assembler can use as a base address. The
unpaired relocatable term of this expression refers to that control section for
which base register{s) are to be made
available by this instruction. No literals
are permitted.

The operands r~, r2~ r3# r4 must be
absolute expressions, whose value must be
between 0 and 15. Operand r~ specifies the
register that can be assumed to contain the
base address represented py the operand v.
Operands r2~ r3' and r
specify registers
that can be assumed to contain v+4096, v+
8192~ v+12288~ respectively.
For example,
the statement:

r-------T-----------T---------------------,
lOperand
I

INamelOperation

~---~---f-----------+---------------------~

I

IUSING

1*.8,,9

I

l _______ ~ ______ -----~---------------------J

tells the Assembler to assume that at
object time the current value of the location counter (indicated by the *) will be
in general register 8, and that the current
value of the L6cation Counter~ incremented
by 4096 i1 will be in general register 9.
The registers r~, r2' .r,3' r 4 address
that control section where the unpaired
term of the expression v is defined. For
an example see the section Progfam secticning~d Linking In~ru£:!:;12!2~ •
rhus" if you
want to address two different control sections you must use two USING instructions.
If you change the value in a base
register currently used ~nd wish the
Assembler to compute displacements from
this value, you must tell the Assembler the
new value by means of another USING statement. In the following sequence the
Assembler first assumes that the value of
ALPHA is in register 9. The second statement then causes the Assembler to assume
that ALPHA+1000 is the value in register 9.

•

if a base register is available for that
control section (i.e. if you issued a
USING instruction).

If a base register is available, the
assembler determines. in'order to get a
positive displacement" whether or not the
base address value to be assumed for this
register (see USING instruction) is lower
than or equai to the storage address to be
separated. The difference between the base
address and the storage address must not
exceed 4095 (hexadecimal FFF)iI because
exactly three halfbytes are reserved in an
instruction to pold the displacement
specification ..
If more than one base register satisfies
the above condition, the assembler will
always cho6se the one giving the smallest
displacement. If more than one register
gives the same displacement, the nunerically highest register will be chosen.
USING instructions may specify the pseudo registers 0 through 7 as base registers.
This is referred to as direct addressing.
In this case, the object progran cannot be
relocated by the Linkage Editor Program
because the Linkage Editor Program does not
update a direct address in the operand of a
machine instruction.
The Assembler assumes fixed contents for
pseudo base registers as shown in the following list:
ggg1§.~~

o

1
2
3
4
5
6
7

r------T-----------r----------------------,
I Operation I Operand
I

1Name

~------+-----------+----------------------~

I
I USING
I ALPHA, 9
.
t
I '.
I
I·
I
I
Il ______ I USING
ALPHA+1000, 9
___________ I ______________________
JI
~

~

If you wish to use more than four registers as base registers to address one control section you must use two or more USING
instructions.
Whenever a storage location is specified
by a relocatable expression in an operand
of a machine instruction~ the Assembler
checks for an available base register to
separate the storage address into a base
address value and a displacement value.
To
this end the assembler determines:
•

which control section the relocatable
expression refers to (i.e. in which control section the unpaired relocatable
term of the expression is defined);

contents
------04,,096
8,192
12,,288
16.,384
20,,480
24,,576
28,672

The Assembler always uses these values.
However, a check is performed t~ determine
whether the expression v natches the contents of the pseudo base register referred
to, and a warning is issued if they do not
match. Unlike the general registers 8
through 15, the pseudo registers need not
be loaded in a program.
You may make the object program relocatable (referred to as indirect addressing)
at some future time by making the following
changes in the source program and reassembling it:
1.

Replacing pseudo registers in the
USING st~tement by general registers.

2.

Loading the new specified base registers with a relocatable value.
Assembler Instructions

61

The p:;endo registers must not be used as
1:0';' working with data.

,':."egi ster')

r-------T-----------T-------~-------------,

I Name
I operation I Operand
I
t-------+-----------+----~----------------~
'BEGIN
BASR
112,0
t
!
USING
! * ~ 12
!

i
I

iFIRST

DROP --

DROP

BASE REGISTER

ThE' OROP i n~ tr'1ction specifies ;:! nrpu; ()11~ 1 v
(;vailoble register that. must no -l~;g~~-b~-..!

used as 2 base register. The format of the
DROP instruction is as follows:

,-------7-----------T---------------------,
IOperation I Operand
I
l~ame

~-------+-----------+---------------------~
~Blank
IDROP
IUp to four absolute I
I
t
1expressions of the
I
I _______ LI ___________ 1______
form r 1- ______________
, r 2 , r 3,' r 4
J1
~

~

Operand r1 is mandatory~ operands r21
'("3' and r are optional. r111 r2. r3,and
r4 are absolute expressions indicating
registers previously named in a USING statement and are now unavailable for implicit
addressing. The following statement, for
example, prevents the Assembler from using
registers 9 and 11:

r------T-----------T----------------------,I
I Name I Operation ,Operand
~------+-----------+----------------------i
IL ______ IDP.OP
___________ 19,11
______________________ J,
~

~

If: (liOrf~ ':.han four registers are to be
;r-ade una.vc,ilable for base addressing, two
or more DROP instructions must be issued.

It is nJt necessary to use a DROP state-

Tent b~fore the base address in a register
is changed by a USING statement; nor are
DROP statements needed at the end of a
sourct.:> program.
A regis./:er made unavailable by a DROP
instruction can be made available again by
a subsequent USING instruction.

PROGRAMMING
In the

EXA~FLE

sequence, the BASR
loads register 12 with the
address of the first storage location immediately follcwing. In this case. it is the
instruction named FIRST. The USING
instruction indicates to the Assembler that
register 12 contains the address of this
ln~truction.
When' you employ this method.
the USIN3 instruction must immediately fellow the BASR instruction. No other USING
or load instructions are required if the
locatio~ named LAST is within 4095 bytes of
fol!ow~ng

instruc~ion

FIR3T~

62

,

i
I

,

1

I

l~n~T

I

I

I -----

iL_______

I

~

I

END
___________ i BEGIN
_____________________ Ji
~

In the following example, the BASR and
LH instructions load registers 12-15. rhe
USING instruction indicates t~ the Assembl=
er that these registers are available as
base registers for addressing a maximum of
16,384 consecutive bytes of storage, beginning with the location naned HERE. The
number of addressable bytes may be
increased or decreased by altering the
numrer of registers designated by the USING
and LH instructions and the number of
address constants specified in the DC
in str uc ti ons •

r----------T-----------T------------------,
I Name
1 Jperation I Jperand
1
~----------+-----------+------------------~

I BEGIN
I
I HERE
,

I BASR
I USING

.1 LH
, LH
I LH

I
I
I B
I BASEADDR I DC
I
I DC
!
I DC
I FIRST
I·
I

I
I LAST

I .

! •
I·

I
I
I
I
I

12,0
HERE,12.13,14,15
13,BASEADDR
14, BASEADDR+ 2
15,BASEADDR+4
1 FIRST
I Y(HERE+4096)
, ~(HERE+8192)
I Y(HERE+12288)

I
I

I
I

,L __________ I ___________
END
I ______
BEGIN - - - - - - ______ J
~

~

Registers 8, 9, 10,14, and 15 have special
uses and are available to you only under
certain conditions. Register 9 is used by
the DPS IOCS. Registers 8, 14, and 15 are
used by the FETCH routine. Register 10 is
used by the LOAD routine. Neither the
FETCH routine nor the IJCS nor the LO~D
routine save the contents of these registers prior to using them. If you use these
registers you must save their contents (and
restore them later) or be finished with
them before the FETCH routine or IO:S make
use of the registers.
If you use IJCS-routines and Specify a
DTFEN overlay you must issue a new USING 10
after each JPEN and CLOSE instruction,
because a DROP 10 instruction is given
within the OPEN/CLOSE routine. For further
details see the SRL publicati~ns

ment causes the listing to be advanced to a
new page (before the heading is printed).
For example, if the following statement
is the first TITLE statement to appear in a
program, and it appears before the ST~RT
statement:
Registers 11-13 are available to you
without any restriction. You will, as a
matter of fact~ decrease the possibility of
errors if you try to use only these three
' registers. However, if there is a shortage
of registers all general registers 8
through 15 are available to you under the
restrictions stated above.

then PGMl is punched into all of the output
cards n in 2o.c[;
phase to ensure that the literals are
defined in the same phase in which they
are used.

The following example demonstrates ho~
to use the phasing technique. It i~
assumed that a Linkage Editor run is not
required.
r-------T----~----T-----~-----------------l

I Name

I Operation I Operand

I

!

I REPRO

!

I

I
I
I
IPHASEl
1
IEXITl

1 PHASE

IFIRST,~,4096

I

I START
IUSING

14 096

I

I

I

I
I

I

1
ILTORG
IXFR

1*

1

t-------+---------+------------- --------- ,... --~

I REPRO

1

I PHASE
IORG

SECOND

PHASEl
SECOND,~,4386

PHASE1+290

\PHASE2 I

I

IEXIT2

I
I

I
I
~-_-

Overlay Using the FETCH Macro

1
\ FETCH

!

I

*,1,2

1

I
I FETCH
I
I

rHIRD

1LTORG
\ END

I

PHASE2

__ --L---------L-----------------------~
Second Assembly

CODING OF PHASES WITHOUT SUBPHASES

t-------,----------T-------·-- ------- - . - ... - .. '--1
1
I REPRO
I
I
I
I PHASE
ITHIRD,~,4336
!

To code phases without subphases you must
apply the follo~ing rules:

I
I STARr
1
IUSING
IPHASE3 1

14386
1.*-290,1,2
1

1

I

•

Each phase m~st begin with a REPRO
instruction followed by a PH~SE statement.
(For the first phase in an
assembly these two statements must precede the START instruction).

I

I _______ LlEND
L
_________ LIPHASE3
_______________________ J
When phase SECOND is loaded it overwrites phase FIRST except for the first
Planned

~verlay

~SG

Structure .C"

bytes. These 290 bytes may be used as data
areas or to contain subroutines or both.
Phase THIRD is fetched by phase SECOND and
in turn overwrites it.
The next example shows an almost identical program. Only this time the object
program generated by the Assembler must be
processed by the Linkage Editor program
before it can be catalogej.

r-------T---------r-----------------------,
IName
; Operationl Operand
i

phase. If the beginning of the head
phase coincides with the beginning of
the assembly, these two statements must
precede the STARr instructiJn.
•

The load ajdress for a subphase is
derived from the load address cJntained
in the first TXT-carj of this subphase.

•

The head phase and the sub~hases nust
end with a XFR instruction.
If the end
of the last sllbphase c:')incides with the
end of the assembly, this subphase must
end with an END instruction.

•

If a Linkage Ejitor run is re~uired
before cataloging, issue a REPRO
instruction followed by the Linkage Editor control statement ACTION DUP prior
to the XFR instruction of the head
phase. This ensures that the Linkage
Editor does not ignore all subse~uent
XFR and E~D instructions.

•

Issue a FETCH macro instruction Nithout
an operand at the point in the head and
subphases where you want the subs~uent
subphase to be loaded into main storage.

~-------t---------+-----------------------~

I REPRO

I
I

I PHASE
ICSECTl I START
IPHASEl IBASR
I USING
1
ILH
I

!

I
•I FETCH

!

I

i

I
I

IEXITl

I

I FIRST, S., 0
10
\12,,0
*,12,13
13,=Y(PHASE1+4098)
SECOND

ILTORG
IXFR

*

IORG
CSECT2 ICSECT
I REPRO
I PHASE
PHASE2 IBASR
IUSING
~

EXIT2

;

I

PHASEl

I

I
I FETCF1
I

,

ILTORG
I END

CSECT1+290

I
I

1SECOND, L y
112,0
1*,12

The following example shows how to code
a phase with subphases. It is assuned that
a Linkage Editor run is not required.

290, 2SE2Tl

1
1

I THIRD
I
I
i
I PHASE2

r-------T---------T-----------------------,
IOperationlJperand
I

I Name

t-------+---------+-----------------------~

I

I

~-~-----L-----_---L-----------------------~

1
Second Assembly
1
~-------T---------T-----------------------~
1
I REPRO
I
!
I
I PHASE
ITHIRD,L,0,CSECT2
I

I CSECT3 I START

10

IPHASE3 IBASR
] USI NG

112,0
I * ,12

I

I

I

1
I

I

I

lEND

L _______ ~ _________

1

i
I

I

1

I
l

IPHASE3
L-----------------------J

; ~PHASE

IPRUGR1,A,4U:;6
1 4096

IBEGIN

1 •

I
I

I .
t •

IEXITH

IFETCtI

I
I
I

i

I .

I

!

I
I
I
1*

1

IEXITl

To code a phase with subphases apply the
following rules:
•

•

If your program must be processed by the
Linkage Editor program before it can be
cataloged t the head phase and the subphases must be contained in one control
section.
A REPRO instruction followed by a PHASE

statement is required only for the head
.68

1*.1,2,3

I .

ILTORG
IXFR

BEGIN
BEGIN+4098

ORG

ISUBPHl

I
CODING OF A PHASE WITH SUBPHASES

I REPRJ

I STARr
I USING

i

I
I
1

I
1*

I

FETCH
LTORG
XFR

SUBPHl

ORG

BEGIN+4098

ISUBPH2

I

IEXIT2

I
I

FETCH

I .

I

I

1SUBPH2
lI _______ LI END
_________ L
_______________________ j1

In the following example a Linkage Editor run is required before the phase can be
cataloged.

r-------T----------T----------------------,

•

the load address of the phase or s~b­
phase is specified in the operand of the
LOAD instruction,

•

after loading the phase or subphase,
control is given to the next sequential
instruction.

IName
IOperation IOperand
I
~-------+----------+----------------------~
,
I REPRO
I
I
I PHASE
I PROGR1, S, 0
I
I START
10
I BEGIN IBASR
111,0
I
IUSING
~*,11,12
I
ILH
112~=Y(BEGIN+X·1002·)

An example illustrating tbe use of the
LOAD macro to load a phase (without s~b­
phases) is given below. It is assuned that
no Linkage Editor run is required.

I
I

First assembly:

!EXITH

1
I

I .
I .
I FETCH
I •
I .

I

I

ILTOR3
I REPRO

I

I~CTION

I
I*
I

I
I

r-------r---------r-----------------------,

I

I
I

IXFR

I
I
IDUP
I BEGIN

I

I

\ORG

I SUBPH1 I •

tName
I Operation I Operand
I
.-------+---------+-----------------------~
I REPRO
t
I
IROOT.A,4096
I
I PHASE
I STARr
14096
I
IUSIN3
1*,1,2
I
ROOTPH I .
I
I

IBEGIN+X'1002-

1 •
I LOAD

I

IMODOLE,YMOD

I
I

CONT

I.

I
I

I

YMOD

I .
I.
I •

I

I

~

I

I .

I

'FETCH

I
t

I •
~ •

I
I
I

ILTOR3
IXFR
I REPRO

SUBPH1

j

I~CTION

NODUP

Second Assembly:

1*

1

BEGIN+X'1002'

I Name

SUBPH2

.-------+---------+-----------------------~
I
I REPRO
I
I
1
I PHASE
I MODULE, A, 0
I
I
I STARr
10
I
I
I •
I
I
I
I •
I
I
Il _______ LlEND
_________ I _______________________ JI

I

IORG

I SUBPH2 I •

I
I

I

I .
ILTORG

I END

l_______ L__

~-------L----------------------

I

I
I
l _______ LlEND
______ - __ LI _______________________ JI

r-------T---------T-----------------------,
I Operation I Operand
I

~

Overlay Using the LOAD Macro
You can use the same technique with the
LOAD macro as with the FETCH macro.
The
LO~D macro is used to load selfrelocatable
phases or subphases; it differs from the
FETCH macro in the following two points:

When the program comes to the instruction LOAD, it loads the phase naned MODULE
(see second assembly) to the address of
YMOD.
After the phase MODULE has been
loaded, the program continues with the
instruction named CONr.

Planned Overlay Structure .69

Macro Instructions

The Assembler includes a macro, feature that
can be used to reduce the amount of repetitive coding required for general~ frequently used routines. For example, the routines for transferring records from magnetic tape to main storage, checking for
acc~racy. and deblocking to obtain a single
record for processing are used for any logical input file on tape. Such routines
involve many instructions that can be written once and. with modification, may be
used repeatedly in any number of programs.
The macro feature is composed of two
basic ~arts:

2.

a macro library of pre-written flexible
routines called ~~cro definitions.

A direct relationship exists between
thesE' two parts, i,. e., a single macro
instruction written in the source program
is replaced, in the object program, by a
routine taken from the macro library. The
macro definition contained in the macro
library consists of a series of instructions. Thus, many instructions are
a5s~mbled for one macro instruction.
The same operation code is used in the
macro instruction as in the macro definition. Therefore, the proper routine to be
included in the object program is found by
matching of operation codes.

r-----------------------l
I&NAM ADD &Sl,&S2,&SUM

IProt~type

!
I

The macro instruction in the source pr n gram specifies the values of the symbolic
parameters (commonly called EE~~m~~~2)
that are to be substituted in the macro
definition when it is assembled. An
example of this is:
70

11 ibrary
I

1

IA

ADD RATl,RAT2,TRArIExample of a

i
jcorresponding
IL _______________________ J! macro instruction

The example illustrates the prat~type
statement of an addition routine that could
be used by any program to add any tw~ terms
and store the sum in a sPecifiej location.
Program ~ might use the macro instruction
to add RATl to RAT2 and store the result in
a field named TRAr.
The parameters applicable t~ the specific job are specified in the macro instruction. The parameters are substituted f~r
the symbolic parameters in the prot~type
statement when the macro routine is
assembled. The parameters are also substituted in all the statements that fallow the
prototype statement to actually perform the
addition. The statements fall~wing the
prototype statement are called model
2~at~~~ts.
----For the above addition example, the COID=
plete macro definition routine night be:

r-----------------------,

I
MACRO
I Header statement
I &NA~ ADD
&21, &2'£, &§.~~! Prototype Rtat em.
I&~

1
I

As the instructions of a macro definition are assembled. they can be 'tailored to
fit the earticular problem program by a
substitution process. The first statement
of a macro definition (following the ~~~2
head~~l is the ~Q~:!:ye~_2:!;~ te~!!:!::..
It
defines the format of the macro instruction
and contains various symbolic operands
(called ~ymbolic P~~~~~~~21 for which
values may be substituted when the macro
definition is used by a specific program.

state-

! ment in macro

LH

AH
STH

13,&Sl
13,&S2
l3,&gUM

I Model statement

I Model statement
I Model statement

IL_______________________
ME~D
JI Trailer statement
The & character preceding the symbolic
name is part of the macro-language syntax
as explained in the following sections.
IBM provides a number of pre-written
macro definitions and specifies the macro
instructions you can use to call these routines from the library. You can write your
own macro definitions and store them in the
macro library.
There are two groups of IBM-supplied
macro definitions:
•

IOCS macro definitions

e

Monitor macro definitions

MACRO-INSTRUCTION FORMAT
The format of a macro instruction in a
source-language statement must correspond
to the format of the prototype statement in
the macro definition. Therefore~ the format of the prototype statement determines
the form in which the macro instruction
must be written in the source program.
The name field in the macro instruction
may contain a name if the name field of the
prototype statement contains a symbolic
parameter.
The operation field in the macro
instruction must contain exactly the same
mnemonic operation code as the prototype
statement, e.g., ADD. This may be any
alphameric code with a maximum of. five
characters. the first of which must be
alphabetic.
The operands in the operand field of a
macro instruction must be written in the
same format as the symbolic parameters in
the operand field of the prototype state~
mente Either the positional format or the
keyword format may be used.
POSITIONAL MACRO INSTRUCTIONS

The operation field of a macro instruction contains the same operation code that
appears in the operation field of the
corresponding prototype statement.

The placement and order of the operands
in a positional macro in~truction is determined by the placement and order of the
symbolic parameters in the operand field of
the prototype statement.
Any combination of up to eight characters may be used as a macro instruction
operand if the following rules are
observed:
1.

Apostrophes must always occur in pairs.

2.

Two apostrophes must be used to represent one apostrophe enclosed in paired
apostrophes.

3.

If an apostrophe is immediately preceded by the letter L, and immediately
followed by a letter~ the apostrophe is
not considered in determining paired
apostrophes.

4.

Parentheses must always occur in. pairs,
left parenthesis then right
parenthesis.

5.

Nesting of parentheses is not
permitted.

6.

A parenthesis that occurs between
paired apostrophes is not considered in
determining paired parentheses.

7.

An equal sign may occur cnly as the
first character in an operand or within
paired apostrophes.

8.

A comma indicates the end of an operand
unless placed between paired parentheses or paired apostrophes.

9.

A blank indicates the end of the
operand field unless placed between
paired apostrophes.

The format of a positional macro instruction is as follows:

r--------T----------T---------------------,
I Name
IOperation I Operand
I
.--------+----------+----------------~----i
, A sym- IMnemonic I Up to 49 operands,
I

I bol or loperation I separated by commas, I
I blank Icode
I in the form
I
described below
Il ________ I __________ I _____________________
JI
~

~

If the name field of a positional prototype statement contains a symbolic parameter. the name field of a positional macro
instruction may either contain a symbol or
be blank. If the name field is blank, the
symbolic parameter in the ·macro definition
is considered to be a null parameter.
(Null parameters are described below.)

10. Each group of consecutive anpersands

must be of an even number.
If the name field of a positional macro
definition is blank, the name field of the
positional macro instruction should be
blank. If an entry is present it will be
ignored.

The following are examples of valid
macro instruction operands:
SYMBOL

If an entry is made in the name field of
a macro instruction, the entry must conform
to the format for a symbol, regardless of
whether or not it will be used as a symbol
by the macro definition.

A+2

123

L'WORKAR

*X'189A'

=H'4096'
0(2,3)

Note:

All characters are generated.
Macro Instructions

71

The following are invalid macro instruction operrtnds, for the reasons stated:

r ~>JAME
5A.)8

Apostrophe not preceded by L
Single parenthesis not enclosed in apostrophes
First comma not enclosed in
parentheses or apostrophes
Blank does not occur between
paired apostrophes
More than eight characters

t

5,(0,3)
(15 B)

(TO,F'ROM)
If no

~perand

tinuation caras as are required. The name
field, if useo, must begin in the begin
column. The operation field f~llowed by at
least one blank must appear on the first
card of the statement. The other rules
are:
1.

If the parameters in the operand field
extend up to the end column and column
72 contains a nonblank character~ the
parameters may be continued in the continue column of the next card. ~
single parameter may be split between
two cards.

2.

A blank following a parameter signifies
the end of all symbolic parameters.

3.

comments may appear after the blank
that indicates the end of all parameters, up to and incluaing column 71.

is specified for a symbol-

ic parameter in the prototype statement J
the comma that would have separated it from

tne next operand must not be omitted. If
the last operand (or operands) are omitted
from a macro instruction, the trailing
comma is not required.
Any symbolic parameter for which a name
or operand is not specified in the macro
instruction becomes a null parameter.

As many continuation cards as are
required may be used in a positional macro
instruction.

The following example shows a macro
instruction preceded by its corresponding
prototype statement. The third and sixth
operands of the macro instruction in this
example are qmitted and are therefore considered to be null parameters.

r------T---------T------------------------,
Operand
I

I Name IOperationl

t------+---------+------------------------~

i

IEXMPL

I

&Aw&B,&C,&D,&E~&F

I

~------+---------+------------------------i

Il ______ 1_________
EXMPL
I
~

~_-

I

17,*+14,~AREA.~FIELD6
______________________
J

If the symbolic parameter that corresponds to a null parameter is used in a
model statement, a null character value
Ieplaces the symbolic parameter in the
generated statement. The result will be
~he same as though the symbolic parameter
did not appear in the statement.

Unless changed by
during assembly, the
macro instruction is
1, the end column is
71, and the continue
be column 16.

an IeTL instruction
begin colunn for a
assumed to be column
assuned to be column
column is assumed to

This format may be changed by an ICTL
instruction, the operand of which may be 25
or 25 J 71.38. If 25 is specifiea~ column 25
is the begin column, and column 71 is the
end column. No continuation cards will be
recognized. If 25,71,38 is specified, the
begin column is column 25, the end column
is column 71, and the continue column (for
macro instructions only> is column 38.
KEYWORD MACRO INSTRUCTIONS

For example, the first statement below
is a model statement containing the symbolic parameter &C. If the operand that
corresponds to &C is omitted from the macro
instruction, the second stateroent is
generated from the model statement.

r------T-----------T----------------------,
IName I Operation I Operand
I

The format of a keyword macro instruction
is as follows:

r-------T----------T----------------------,
I Operationl Operand
I

I Name

.-------+----------+----------------------~

I A sym-I Mnemonic I Up to 49 operands,

I

I bol orl operation I separated by commas, I
I blank I code
I in the forn
I
described below.
I _______ LI __________ I ______________________
L
JI
~

~------+-----------+----------------------i

I

I MVC

I

TH&C rHIS
r,

I

t------+-----------+----------------------i
IL______ I ___________
MVC
THwTHIS
I
LI ______________________
~

J

The positional prototype statement can
be written in a format similar to the format used for .other Assembler-language statements. To allow for the inclusion of up
to ~9 parameters in the prototvpe stateroent
1 m~cro definition, use as many con-

This format provides a direct association between the operands of the macro
instruction and those of the c~rresponding
prototype statement.
The very same parameters used in the
prototype statement are specified (without
the &) in the macro instruction, where they
are equated to the value des ired for the
specific job. The parameters of a proto-

type statement are called keywords when
they appear without the & in a macro
instruction followed by an equality sign.

2.

A keyword is specified in the operand
field of a macro instruction and no
value is associated with the keyword.

In the following example, the first line
shows a prototype statement, the second
line the corresponding macro instruction~

3.

No value is associated with a keyword
in the operand field of a prototype
statement, and the keyword and its
associated value are omitted from the
operand field of a macro instruction.

r------T--~--------T----------------------,

I Name I Operation I Operand

I

t------+-~---------+----------------------~
I
I CHECK
I &SUM=.&DIFF=
I
~------+-----------+-----------~----------~
I ______ I ___________
CHECK
I ______________________
DIFF=25" SUM=P1\Y
L
JI
~

~

since the association of parameters is
performed through the use of keywords, the
operands in the macro instruction may
appear in any order, arid any parameters
that are not needed may be omitted. If an
operand is o~itted, the comma that would
have separated it from the next operand
must not be written.
The rules for writing names and opera~
tion codes in keyword macro instructions
are the same as. those for positional roacro
instructions .•
The begin., end, and continue columns for
keyword macro instructions are the same as
those for positional macro instructions.
Each macro instruction operand must consist of a keyword immediately followed by
an equal sign and a value. Anything that
can be used as an operand in a positional
macro instruction may be used as a value in
keyword a macro instruction.
The keyword part of each macroinstruction operand must correspond to one
of the symbolic parameters that appears in
the operand field of the prototype statement.
~ keyword corresponds to a symbolic
parameter if the characters of the keyword
are identical to the characters of the symbolic parameter that follow the arrpersand.
Operands of a keyword ma6ro instruction
may appear on separate cards. ~ comma must
follow every operand except the last" and
the continuation column must contain a nonblank charact.er. Comments may be contained
on the separate cards that contain individual operands.
A symbolic parameter becomes a null
parameter if:
1.

~

The following rules are used to replace
the symbolic parameters in the no del statements of a keyword macro definition:

symbolic parameter appears in the
name field of a prototype statement and
the name field of the corresponding
macro instruction is blank.

1.

If a symbolic parameter appears in the
name field of a prototype statement and
the macro instruction is named, the
symbolic parameter in the name field is
replaced by the name.

2.

The value associ.ated with each parameter in the operand field of the prototype statement becomes the value of the
symbolic parameter.

3.

The value associated with each keyword
specified in an operand of the nacro
instruction replaces the value obtained
from the prototype statement for the
symbolic parameter.

The following keyword macro definition
(first box), keyword macro instruction
(second box), and generated statements
(third box) illustrate these rules:

r----T-----T------------------------------,

I
lOper-I
I
INamelationlOperand
I
~----+-----+------------------------------1
I
I MACRO I
I
I&NAMIMOVE I®=12,&ARE~=S~VE,&TO=,&FRO~=1
I&NAMISTH I®, &ARE~
I
1
I LH
I ®, &FROM
I
I
I STH 1 ®, &TO
I
I
I LH
I ®" &AREA
I
IMEND I
I
I
~----+-----+------------------------------~
lHEREIMOVE ITO=FLDA,FROM=FLDE,AREA=THERE I
.----+-----+------------------------------~
IHEREISTH 112,THERE
I
I
ILH
112,FLDB
I
1
1
ISTH 112,FLDA
THERE
1____ 41LH
L
_____ 4112,
______________________________
J1
Note that the keyword REG was omitted in
the macro instruction and the standard
value 12 obtained from the prototype statement was used in the generation wherever
® appeared in the model statements.
If the entry FROM=FLDB is ouitted from
the macro instruction J the second model
statement is generated as LH 12, which is
an invalid statement to the ~ssembler.
Macro Instructions

73

ASSEMBLY OF MACRO INSTRUCTIONS

from the macro library in
language.

At program assembly time~ the macro
instruction specifies ~hich definition is
to be called from the macro library.
The
definition is extracted, tailored by the
operands in the macro instruction, and
inserted in the program~
rhe complete program now consists of both source program
statements and tailored model statements

In subsequent phases of the assenbly,
the entire program is processed to produce
the machine-language object pr~gram.
Figure 10 illustrates the processing of
a macro definition.

ASSEMBLER
OPERATIONS

SOURCE PROGRAM
(Before)

~sse~bler

SOURCE PROGRAM
(After)

(

(

i

2------

2
!>ource

Locate Macro
library Routine
Source
Program
Statements

15·
16 Macro Instruction

~ 17

...

Program
Statements

15-----

Perform Indicated Selection and Substitution
Merge with

Source Program

l

16 Macro Instruction

}
...............

~Macro

Routine

Sou~e r~
~~~::nt~, :
I
~

Figure 10.

14

Schematic of Macro Processing

.

-----

Macro Language

The macro language is an eKtension of the
System/360 Model 20 Assembler language and
is an aid in ~riting an Assembler-language
program.
Before you can code a macro instruction,
the series of statements that the macro
instruction represents must be defined in a
macro definition.

2.

A e~~~2~ye§_~~~~~~~Q~.
This statement
indicates the various symbolic ~arame­
ters of a macro definition and the format and the mnemonic operation code to
be used in the macro instruction.

3.

Model statements and conditional~~semblY=Instr~ction~-and-co~~g~~~_~~~~
tements.
Model statements define
representations of the statements that
will replace the macro instruction in
the source program. 2onditionalassembly instructions vary the
sequence, number, and type of the statements generated, based on presence,
absence or values of the operands given
in a particular macro instruction (see

A macro definition is composed ~f a
header statement, a prototype statement,
one or more model statements, and a trailer
statement, in this sequence. You may
further include conditional-assembly
instructions.
This section contains a descripti~n ~f
the components of a positional macro definition and of the differences between it
and a key~ord macro definition. Furthermore, this section also contains an
explanation of the model statements, the
conditional assembly instructions, and the
system variable symbols.
Inner macro
instructions as special model statements
are also described. A sample macro definition and a step by step procedure f~r coding a macro definition is included.
you can use one of your own macro
definitions you must include it in the
macro library of your system. To this end,
use the MMAINT (Macro Maintenance) program
provided by IBM.
Bef~re

Positional Macro Definitions
To make a macro definition available to
many programs place the macro definition in
the macro library by means of a Macro Maintenance program (MMAINT).
rhe MMAINT program enables you to delete or replace macro
definitions in the macro library according
to your needs.
when writing a macro definition, you
cannot use the ICTL instruction to alter
the normal format of the macro component
statements. In a macro definition, the
begin column is column 1, the end column is
column 71, and the continue column for the
prototype statement or an inner macro
instruction is column 16.
Each macro definition includes (in the
sequence indicated):
1.

A header statement.
This statement
indIcates-the-begInning of a macro
definition"

Conditional-AssemblY_IQ~~~~£~!~~~)·

4.

A trailer statement.
It indicates the
end-of-a-macro-defInition.

MACRO -- HEADER STATEMENT
The header statement indicates to the
MMAINT (Macro Maintenance program) that a
macro definition follows. It must be the
first statement in every macro definition.
The format of this statement is:

r--------T---------T----------------------,
I
I Name

I
I

~per-

ation

I
I

I
I

Operand

~--------+---------+----------------------~

Il ________
Blank LI _________
MACRO LI ______________________
Blank or vvmm*
JI

*vvm~

applies to DPS only. vv is the number of the program version; ~~ is the modification level.
The operand, if pLesent,
is transferred into the macro directory
(last t~o tytes of the corresponding
entry) •

PROTOTYPE STATEMENT
The prototype statement indicates the format and the mnemonic operation code of the
positional macro instruction the Assembler
is to interpret.
It must be the second
statement of every macro definition.
The
format of this statement is:
Macro Language

75

r-------T---------r-----------------------,
I
I :)peri
i
IName

lation

Operand

I

~-------+---------+-----------------------~

IA sym- IA symbol I
Ibolic
I
IparaI
Imeter
I

Up to 49 symbolic
parameters, separated by connas

I

I

!

:nnnpn~;v
R.......
C" L _ .. __ .-.. .............

I;

()T

1--

i
_________ i

iblank
L
_______

~

i

i

_______________________ J

A symbolic p3rameter is an ampersand (&)
followed by one to seven alphabetic and/or
'1"'\"rnr\..".-';,....
~J.UUI'-~...L"-'

,.....h-=:a."....":),...... ...
\""'Ol~t.A.L\...A.'-

.....

t""\ ...... C'

'-..L'-',

alphabetic.
rhe operation code in the
operation field must be unique.
It must
differ from the operation code of ~ay IBMsupplied macro jefinition, any machine and
~ssembler instruction, and the operation
code of any other macro definition you
defined yourself.
~ list of the IB~­
supplied macro definitions is includej in

-I-ht""\..f="'; .."....~+\""J.J.'-

..L...L..L.o.,.J\.,...

,-.+,
V..L

'aT'h';,.....h

nJ..L...L'-LJ,

rn"C"'"+

~U\A""''-

QQgf~~~_rigl~:
The operand field may contain up to 49 symbolic paraneters separated
by commas.
rhese symboli~ par3neters are
used in model statenents and re?laced dur.; nrT

...L.L~~

rl'r"\T'lr"\'V'""",,\+-';~"""

l::j\..:.,:.l.1C..... .LUl-..L.V'lJ.

hT.,.

U:J

-I-hro.
\...L.1C

......

r"""\.'V' ......

,......r-o ......... ,....."'..:t..;,.....,-.

....... Vi.~C....>.t-'Vl~......l..LlJ.'::1

be alphabetic.

operands of the macro instructiJn.

You must not use any symbolic parameters
that have &SYS as the first four
characters.

The followin~ sample prototy?e statenent
contains three symboli~ p3rameters:
one in
the name field and two in the ~per~nj
field.
rhe mnemoni~ operation code is
MOVE.

Furthermore, symbolic parameters in the
form &ALn, &AGn, &BLn, &BGn, &CLn, and
&CGn, where n is one to five numeric characters, are not permitted.
rhese symbols
are reserved for internal use.
The following are valid symbolic
parameters:
&REA.DER
&A.23456
&X4#F2

&LOOP2
&N
&S4

&AGH
&BLC
&CG6A.

The following are invalid symbolic parameters for the reasons injic3ted:
IOAREA
&2568
&AREA2456
&BCO&34
&IN AREA
&SYSTEM
&A.G15
&BG28
&CG215

First character is not an
ampersand
First character after ampersand
is not a lett.er
More than seven characters
3fter the 3mpersand
contains a special character
other than initial &
contains an embedded blank
contains &SYS as the first four
char3cters
Is in the form &AGn, where n is
numeric
Is in the form &BGn, where n is
numeric
Is in the form &CGn, where n is
numeric

Name:
The symbolic parameter in the nane
field is normally used to name the
generated statements.
It C3n also be used
in model statements in the same way as symbolic par3meters defined in the operand
field.
QEgf~~iQ~:

The symbol in the operati~n
field is the mnemonic operation code of the
macro definition containing the prototype
statement.
The operation code consists of
one to five alphabetic and/or numeric
characters, the first of which must be

...,r

1'0

r--------T---------T----------------------,
I
I :JperI
I
I Name

lation

I

Operand

I

t--------t---------+----------------------~

IL________
&N~ME
IM:JVE
I
&T:J,&FRJ~
I
i _________ i ______________________ J

ro allow for the inclusion of up to 49 symbolic parameters in the prototy?e st3tement
of a macro definition, use as n3ny ~~n­
tinuation cards as needed.
The name field,
if used, must begin in colunn 1.
rhe
operation field, preceded and followed by
at least one blank, must appear ~n the
first card of the statement.
rhe other
yules are:
•

If the symbolic parameters in the
operand field extend up to the end
column, and if column 72 contains a nonblank character, the symbolic par3neters
may be continued in column 16 of the
next card.
A single symbolic parameter
may be split between two cards.

•

A blank following a synbolic paraneter
signifies the enj of all symboli~
parameters.

•

Comments may appear after the b13nk th3t
injic3tes the enj of ~ll symbolic parameters, up to and in~ludin~ ~olumn 71.

MODEL

ST~TEMENrS

Model statements are represent3tions ~f ~hp.
statements th3t will repl~ce the particular
macro instruction in the source pro~ram.
A. model st3tement that contains no symbolic parameters or variable symbols will
appear in the source program in the S~me

format as it appears in the macro definition.
If a model statement contains symbolic parameters or variable symbols, the
Assembler replaces the symbolic parameters
and variable symbols by the value specified
in the macro instruction before the model
statement is included in the source
program.
~ model statement consists of one to
four fields (from left to right): name
field, operation field, operand field, and
comments field.

The operation field may contain the
operation code of any machine or Assembler
instruction except:
END, ICrL, ISEQ, LTDRG, PRINr, and

sr~Rr.

It may also contain another inner macro
instruction. The operation field must not
contain a symbolic parameter.
If REPRO is
used as a model statement, the following
card is not considered a model statement
and therefore ignored by the Macro maintenance program.
The operand may consist of variable or
non-variable symbols.
For model statenent
fields, the rules· for paired apostrophes,
ampersands, or blanks in macro instruction
operands must be followed.

A model st~tement of a machine or
Assembler instruction must not be continued
on an additional card.
If the nodel st~te­
ment is ~ macro instruction (see Inner
~~~~2_~g~~~~~~!2g~~, it may be contincred on
as many cards as needed.
During generation, each symbolic p~r~­
meter in the name or oper~nd field of a
model statement is replaced by the ch~r~c­
ters of the macro instruction that correspond to the symbolic paraneter in the prototype statement.
I'he operand field of a
generated model statement of a n~chine or
~ssembler instruction can contain 56
characters.
If a symbolic parameter or a system
variable symbol appears in the connent
field of a model statement, it is not
replaced by the corresponding characters of
the macro instruction.
In the following example, the ch~r~cters
HERE, FIELDA, and FIELDS of the macro
instruction MOVE correspond to the synbolic
parameters &NAME, &1'0, and &FRJ~, respectively, of the prototype statement.

r--------T----------T---------------------,
I Name

Symbolic p~r~meters used in a model statement nust be defined in the prototype
statement. Symbols used in a model statement must be defined within the macro definition or within the source pro~ran that
calls the macro definition from the macro
library.
In the following example, the symbol
is defined outside the macro
definition.
8~VE~RE~

The function of this macro definition is
to move the contents of one storage area to
another area in main stora~e.

r-------T------r--------------,

I
lOper-I
1
I N~me
I ationlJperand
1
~-------+------+--------------~

Header
1
1 M~CRO 1
1
Prototypel &N~ME 1 MOVE l&rO,&FROM
1
Model
1 &NAME 1 8TH 112,SAVEAREA
1
Model
I
I LH
112, &FROM
1
Model
1
18TH 112, &I'D
1
Model
I
1 LH
112,SAVEAREA
1
I'railer 1L _______ LI ______
MEND L1______________ JI
Note that each of the symbolic parameters used in the model statements of the
preceding example appears in the prototype
statement.

10peration I

Jperand

I

~--------+----------+---------------------~

1L ________
HERE
MOVE
I _____________________
FIELDA, FIELDS
LI __________
JI
~

If the symbolic paraneter &N~ME ~ppe~rs
in the-name or operand field of a model
statement, it will be replaced by the
characters HERE.
Similarly, the symbolic
parameters &TJ and &FRJM will be re?l~ced
by the char~cters FIELDA ~nd FIELDS, respectively.
If the precedin~ macro instrGction were used in a source pro~ran, the
followin~

Assembler-Ian~uage

st~tements

would be generated.

r--------T---------T----------------------l

I

I Name

IOperlation

I
I

I

I

Dperand

t--------+---------+----------------------~

ISI'H
I
12,S~VE~RE~
I
I LH
I
12, FIELDB
I
12, FIELD~
I
1
I SI'H
I
12,S1\VE~RE1\
I ________ LILH
L
_________ LI ______________________
JI
I HERE

I

You may use the same macro instruction
more th~n once in the s~me pro~ram.
I'he
Assembler uses the same m~cro definition to
interpret several occurrences of a macro
instruction. The following example illustrates this.
~acro

Language

77

r-----T-------T---------------,

I

I

IOperIName lation

I

I Jperand

I

t-----t-------t---------------~

Macro Instr. IHERE

'~OVE

'FIELD~~FIELDB

!

ILH

112,FIELDB

I

18TH

!12~FIELDA

i LH

i 12, SAVEf\REf\

r-----+-------+---------------1
IHERE 15TH
112,SAVEAREA
I

Generated
Generated
Generated
Generated

I

I
i

i

~-----+-------t---------------~

Macro Instr.ILABELIMOVE
IINTO,OOrOF
I
t-----+-------t---------------~
Generated
ILABELISTH
112,SAVEAREA
I
! T U
,.1..'(",
Generated
I
Generated
112,INTO
ISTH
I
Generated
I
I LH
112, SAVEAREA
L _____ _______ _______________ J
,

.,

')

The follo~ing examples illustrate these
two points.
In tne examples, ~ssume that
&PARAM has the value A.

Af"tTiAD

VU.LVl.'

In addition to denoting symbolic parameters, ampersands may appear in a character
value or a self-defining value.
rw~ ampersands must be usej to represent a single
ampersand in a character value or selfdefining value.
The first statement in the
following example is a model statement; the
second statement is the source statement
generated from the model statement.

r----T-----T-----------------T------------,
lNameloper-IOperand
I Comments
I
lationl
I
I
I
t----t-----t-----------------t------------~
I&SYMIDC
IC'&&SYM IS &SYM' I&SYM IS NAME I
t----+-----+-----------------+------------~
IS NAME'
IS N~MEIJ
LINAMEIDC
____ _____ IC'&SYM
_________________
4I&SYM
____________
~

When a symbolic parameter, ~ SEr symbol, or a system vari~ble symb~l is
followej by a single perioj, the period
does not appear in the generatej
output.

&PARAM. (BC)
&PARAYl •• BC

A(BC)
l.\..B2

~

~

I.l..JU

2.

&P~R~M.BC

~BC

&PARAM.2BC
&PARAYl •• 2B
BC&PARAM

l.\.2BC
~.2B

BCA
B::.l.\.
B2A

BC.&P~RAYl

B2&PARAM
&PARAM.&PARAM

~l.\.

&P~RAM&PAR~M

A~

&PARAYl ••

l.\..~

&P~R~Yl

The following macro definitiJn is ~
practical example of the precejing jiscussien. The functi~n of the nacrJ definition
is to move the contents of one area in main
storage to another area in nain stor~ge.

r------T-----T-------------------,

~

I
I Name
Header

I Jper-I

~------+-----t-------------------~

I

I MP-,CRO I

IMOVE
I&NAYlE 18TH
I
ILH
I
I STH
I
ILH
I
I MEND

Prototypel&NA~E

M~del

The characters represented by a symbolic
parameter, SET symbols, system variable
symbols, symbols, self-defining values, or
character values may be concatenated as
desired to produce symbols, self-defining
values~ and character values.
(For a discussion of SET symbols and system variable
symbols see the sections Conditional-

~~~~~Qll_!~~~E~~~!2~~ and-~~~~g~=~~r!~Ql§
~Y~~21~.)

A symbolic parameter, a SEr symbol, or a system variable symbol c~nca­
tenated with a second symbolic parameter
cannot produce a third symbolic parameter.
concatenation can be performed in the
name fielj and in the operand field, but is
not permitted in the operation field.
The
following two points must be considered.
1.

78

When a symbolic parameter: a SEr symbol, or a system variable symb~l is
followed by an open parenthesis, a
perioj, an alphabetic character, ~r a
numeric character, a period must separate i t from the character that follows.

Model
M~del

Model
Trailer
Macro

I
I

lationlJperand

I

I&PRE,&SAV,®,&NDXI
I®,&Sl.\.V.&NJX
I
I®,&PRE+8
I
I ®, &PRE. A
I
I®, &SAV&NDX
I

i

I

~------+-----+-------------------~

IHERE

I~OVE

IFIELD,l.\.RE~,12,

4

I

~------+-----+-------------------~

Gener~tejlHERE

18TH
112,~REA4
I
Generatejl
ILH
112,FIELJ+8
I
Generatejl
18TH I 12,FIELDl.\.
I
GeneratejlL ______ LILH
_____ 4112,~REl.\.4
___________________ JI

Note that the first and fourth model
statements have identical oper~nds, except
for the period between the two symbolic
parameters in the operand field of the
first mojel statement.
The period is
necessary in the third nodel st3tenent to
distinguish between the symbolic parameter
&PRE and the symbol~. The peri~d is unnecessary (but may be used) in the second
model statement to jistin~uish between the
symbolic paraneter &PRE and +8.

Second tv\acro
Definition

First tv\acro
Definition

Th i rd tv\ac ro
Definition

Header

Header

Header

Prototype statement

Prototyp statement

Prototype statement

tv\acro instruction

tv\acro instruction
Trailer

Trailer

Figure 11.

Trailer

Schematic Representation of Nested Macro Instructions
required. A third-level nacr~ definiti~n
cannot c~ntain a macro instruction.

~ macro definition may contain another
macro instruction as a model statenent.
The containing macro instruction is called
an outer macro instruction. rhe c~ntained
macro-InstructIon-Is-called an i~~~~_~~£!Q

i!:!~!!:~£!iQ~·

The outer and inner macro instructions
may be of the same or of different types.
That is, both the inner and the outer macro
instructions may be positional, they may
both be keyword, or one may be positional
and the other keyword.
when a macro definition contains a macro
instruction, the macro instruction is said
to be nested.
The maximum depth 6f nesting
is three. ~ macro definition (first level)
may contain an inner macro instruction
(second level). The definition of this
inner macro instruction (second level) may
again contain a macro instruction (third
level).

Symbolic parameters that are part of the
prototype statement, SEr symbols, and system variable symbols may be used in an
inner macro instruction.
Each symbolic
parameter, SEr symb~l, or systen variable
symbol is replaced by its value bef~re the
inner macro instructi~n is generated.
For example, the following macro definition is contained in the nacr~ library.
r------T----------T-----------------------l
,
,oper-,
,
'Name ,ation
'Operand
,
~------+----------+-----------------------~
,
,MACRO,
,
,
, ADD
, &N1,&N2,&N3,&RE3,&~RE~'
,
, LH
, ®, & Nl
I
,
I AH
I ®,&N2
I
,
, A.H
I ®, &N3
I
,
I STH
I ®, &A.REA.
I
,
I MEND
I
I
L______ L __________ L _______________________ J

Figure 11 shows a schematic representation of nested macro instructions.
The first-level macro definition can
contain as many second-level macro instructions as are required.
~ second-level
level macro definition can contain as many
third-level macro instructions as are

The precedin] A.DD macro definition is
used as an inner macr~ instructiJn in the
COMP macro definition shown below.
rhe
macro instruction causing the generation of
the model statements is given i~ the niddle
box.
The generated statements are in the
third bOK.
~acrJ

Language

79

r----T------T-----------------------------,

I

lOper-I
INamel ation!Operand

I
!

~----+------+-----------------------------~

I MACROI
I
I COMP I&AREA,&Rl,&R2.&Vl,&V2,&V3,&NAI
I SR
I CH

i
I
I &NA
i

I &Rl, &R2
I&Rl,&AREA

i BNE i&NA..
I ADD I&Vl,&V2,&V3,12,&AREA
I AH
I &Rl, &AREA
I MEND I

I

I

I

~----+------+-----------------------------~
1
I COMP ICHECK,lO,ll,X,Y,Z,CHNG
I
~----t------+-----------------------------~
I
1 SR
110,11
I
I CH
110,CHECK
1
I BNE
1CHNG
I
I ADD IX~Y,Z,12,CHECK
I
1 LH
112, X
\
I AH
\12. Y
AH
i12~Z
1
1 STH
112,CHECK
jCHNGI
AH
110,CHECK
L
____ ______
____________________________ _

i

i

~

~

CONDITIONAL-ASSEMBLY INSTRUCTIONS
rhe information given in the preceding sections of this publication is sufficient to
write a relatively simple macro definition.
For each macro definition, the same
sequence of statements is generated each
time the nacro jefinition is callej by a
macro instruction, except that the specific
values and symbols in each statement may be
different.
Frequently, it is 1esirable to vary the
sequence, number, and type of instructions
generated, based on the presence, absence,
or values of the operands given in a particular macro instruction.
Thus, the statements generated for two macro instructions
calling the same macro definition night
differ. while the functions performed by
the statements are basically the same.
~o
permit the writing of a more complex macro
definition capable of producing a tailorej
set of generated statements based on the
content of the macro instruction operands,
two categories of special instructions are
provided, the SET instructions and the conditional instructions.
The conditional-assembly instructions
are:
SETA, SETB, SErc, AGO, AGOB, AIF,
AIFB, ANOP. MEXIT, and MNOTE.

definitions give you a high degree of flexibility in the application of macro
definitions.
For. bv usino the sane svnbol
in the name fielj" of~a SETJinstruction: you
may assign it a new value and thus 31ter
the value of the operand in the nodel
statement.
The results of the operations perfornej
by the SET instructions are contained, Juring the generation of macro definitions, in
a series of specially provided areas in
main storage referred to by SET variable

symbolse

SET variable

syTIb~ls

can be

use~

in model statements, SET instructions, anj
conditional instructions.
The A30 (Assembler GO) and AG~B
(Assembler G~ Back) instructions are SlUllar to an unconditional branch instruction.
They are used to indicate, by neans of a
sequence symbol, the next statement to be
processed bv the ~ssembler.
(Se~uence svmbOls are jescribej in jetail unjer ~~1~~~~~
~Y~2Ql~) •

The ~IF (Assemble IF) anj ~IFB (~ssemble
IF Back) instructions are similar tJ ~ conditional branch instruction.
They are used
to indicate, by means of the lJgical value
obtained from the operand and a seq~ence
symbol, the next state~ent to be prJcessej
by the Assembler if the condition is TRUE.
The ANOP (~ssemble N~ ~peratiJn)
instruction is used with the ~G~,'AG~B,
AIF, and AIFB instructions if a se1uence
symbol cannot be used as the name of the
next statement to be branched tJ.
The MEXIT (Macro EXIT) instructiJn is
used to indicate to the macro 3enerator
that it is to terninate processing of a
macro definition.
The MNOTE (Macro NOTE) instruction is
used to generate nessages in the output
listing.
The functions of the SET instructions
and the AGO, AG~B, ~IF, and AI~B instructions are interrelatej because the
generated output is generally tailJrej by
the use of AGO, AGOB, ~IF, and ~IFB
instructions based on the results obtainej
from the values of SET instructions.
While
numerous examples of SET instructions are
given in the section that expl~in the SET~,
SETB. anj SETC instructions, their use is
sho~n in the sections describing the
remaining conditional-assembly
instructions.

The Set instructions SETA, SETC, and
SETB perform arithmetic calculation,

character manipulation, and set binary
switches on the basis of logical and relational expressions.
The use of SET variable symbols in the
operand field of model statements of macro
80

SET VARIABLE SYMBOLS
The labels or symbols used in the name
field of SET instructions are referred
as SET variable symbols or SEr symbols.

t~

The three types and formats of SET variable symbols are:
~Y!!!Q21

•
•
•

SETA
SETB
SETC

FOf!!}§!;!:
&AGn or &ALn
&BG!! or &BLn
&CG!!

When macro instructions are nested,
local SETA and SETB symbols defined in the
outer macro instruction are reset to zero
immediately before the inner macro instruction is processed. After the inner nac~o
instruction has been processed, the local
variable symbols are reset to the values
that were definej in the outer nacro
instruction.

The n stanjs for an arithmetic value as
described in the subsequent sections.

SET symbols may be usej with the following restrictions:

Three SET instructions are used to
assign arithmetic, character, and logical
values to SET symbols.
The SETA instruction assigns an arithmetic value to a SETA
symbol. The SETC instruction assigns a
character value to a SETe symbol.
A SErB
instruction assigns a binary (or logical)
value, TRUE (1) or FALSE (0), to a SETB
symbol.

•

rhey can only be used in the na~e or
operand field of model statenents or
conditional-assembly instructions.

•

They must not be used to generate a new
sequence symbol, a SET symbol, a symbolic parameter, or a system variable
symbol.

•

The SErc symbOl nay be used in the
operand field of a SETA statement only
if the character strin~ is composed of
from one to five decimal digits.

You should assign each SET symbol a specific value before the variable symbol is
used in the operand field of a macro component. If you do not as~i~n a value~ the
following assumed values are used.
•

SETA symbols (arithmetic values) have an
initial value of zero.

•

SETe symbols  15
Grouping by use of parentheses is not pernitted

The followin~ procedure is used to evaluate the arithmetic expression in the
operand field of a SETA instruction.
82

jecimal numerical

r-------T-----------T---------------------l

Division by zero results in a value of
zero.
In division, only the integer portion of the quotient is retained.
For
example, 97 divided by 25 ~ives the result
of 3.
The fractional portion of the ~uo­
tient is dropped.

27
&A33+4

~iven

LH

I

12,S~VE~REA

I
MEND
I
I
~-------+-----------+---------------------~
,HERE
I MOVE
I FIELD~,FIELDB
,
~-------+-----------+---------------------i
IHERE
I SrH
, 12,SAVEAREA
I
I
I LH
I 12, FIELDB2
I
I
I STH
I 12, FIELDl\.12
I
,l _______ L, ___________
LH
12, SAVEAREA
L, _____________________
JI
If you have assigned an arithmetic v3lue
to a SErA symbol, you may change the
assigned value by using the SErA synbol in
the name field of another SETA instruction.
If a SETA symbol has been used in the n~me
field of more than one SEr~ statenent, 3nj
the SErA symbol is usej in the name or
operand field of another :nodel stateneut,
the value substituted for the SErA symbol
is the last value assigned to it.
The eKample beloN illustrates this rule.
The function of this macro definition is

the same as tha~ of the above example. The
boxes contain again, respectively, the
macro definition, macro instruction, and
generated statements.

r-------T---------T-----------------------,
,
,OperI
I
IName
I ation
I
~perand
I
~-------+---------+-----------------------~
I
I MACRO
,
,
I&N~ME
,MOVE
I
&rO,&FROM
,
I&AL8
'SET~
I
5
I
'&N~ME
,STH
'12,S~VE~RE~
,
'12~&FROM&AL8
,
I
, LH
'&AL8
I SET~
I
&~L8+3
,
1
, STH
'12~&TO&AL8
,
I
, LH
I
12.S~VE~RE~
,
I
I MEND
,
,
~-------t---------+-----------------------i
IHERE
I MOVE
I
FIELDA,FIELDB
,
~-------+---------+-----------------------~
I HERE
I STH
I
12,S~VEAREA
,
I
I LH
I
12, FIELDB5
,
,
, STH
I
12., FIELD~8
,
LH
I _______________________
12,S~VEARE~
l, _______ L, _________
J,
~

The follo~ing statenent assigns the
character value AB%4 to the SET symbol
&CG5:

r-------r---------T-----------------------,
I
,oper-,
,
'Name
I ation
'Operand
,
r-------+---------+-----------------------~
,l _______
&CG5
' AB%1.l '
L,SE'rC
_________ I _______________________
J,
~

More than one character value may be
concatenated into a single character value
by placing a period between the terminating
apostrophe of one character value and the
opening apostrophe of the next character
value.
Either of the following statements may
be used to assign the character value 2 AND
3 to the SErc symbol &CGll.l:

r-------T---------T-----------------------,

,
,Oper-,
,
'Name
,ation
'~perand
,
~-------+---------+-----------------------1
,&CG14
,SETC
,
'2 AND 3'
,
,&CG14
'2'.'
AND 3'
l _______ ,SErC
_________ , ______
________________
JI
~

SETC -- SET

~

~

CH~RACTER

The SETC instruction may be used to assign
a character value to a SETC symbol. Each
global character value can vary from 0 to 8
bytes in size.
Each character value is
initially a null character value of zero
bytes in length. You may change the
character value assigned to a SETC sy~bol
by using another SErc instruction ~ith the
same variable symbol in the name field.
The format of this instruction is:

r-------T---------r-----------------------,
,Oper-,
,

I

I ation
,
Operand
I
,Name
~-------t---------+-----------------------~
IA SETC I SETC
I
Up to8 characters I
,symbol I
,enclosed by a pair ,
of apostrophes
lI _______ I _________ LI _______________________
J,
~

SETC symbols in the name field are
always global. They have the form &CGg,
where Q. = 0-15.
You may use SETC symbols in the operand
field or name field of model statements.
The value of the characters in the
operand field is assigned to the SETC symbol in the name field.
rhe characters in
the operand field may consist of a string
of characters, a SET symbol, symbolic parameters, system variable symbols, or any
concatenation of the preceding values, enclosed ~ithin a pair of apostrophes. Length
attributes cannot be substituted by the
implicit length of the symbol.

Two apostrophes must be used to represent one apostrophe that is part of a
character value enclosed in apostrophes.
The following statement assigns the
character value L'SYMBOL to the SETC synbol
&CGll if &PARAM is substituted by SYMBOL:

r------T-------T--------------------------,
,
I
I
,
~per-

,Name ,ation, Operand
,
t------+-------+--------------------------~
,&CGll
SErc I _________________
'L" &PAR~M'
l ______ I _______
________ J,
~

~

~

Two ampersands must be used to represent
one ampersand that is not part of a variable symbol. Both ampersands becone part
of the character value assigned to the SETC
symbol. rhey are ~~~ replaced by a single
ampersand.
rhe following statement assigns the
character value HALF&& to the SErc symbol
&CG4:

r------T-------T--------------------------,
I Oper- ,
I

,

'Name , ation , Jperand
,
r------+-------+--------------------------~
,&CGI.l
'HALF&&'
,
l ______ L,SErC
_______ L, __________________________
J
SET symbols, symbolic parameters, and
system variable symbols may be concatenated
with other characters in the operand field
of a SErc instruction according to the general rules for concatenation.
~acro

Language

83

If &CG12 is assigned the character value
AB%4, the following statement may be used
to assign the character value AB%4RST to
the SETC symbol &CG13:

operand field of another model statement,
the value substituted for the SETC symbol
is the last value assigned to it.

r-------T---------r-----------------------l
I JperI
I

rhe following example
rule:

I
I Name

lation

I

Jperand

!

~-------+---------~---------~-------~~~-==~

j&CG13
L _______ jSETC
_________
~

i

~

'&CG12.RST'
_______________________
JI

If &C312 has been assigned the character
value AB%4. the following statement may be
used to assign the character value RSrAB%4
to the SErc symbol &CG10:

r-------T---------T-----------------------l
I JperI
I

I

I Name

lation

I

Operand

I

}=====--+---------+-----------------------i
I &CG10 I SETC
I
'RST&CG12'
i
L_______ _________ _______________________ J
~

~

The character value that has been
assigned to a SETC symbol is substituted
for the SErc symbol when it is used in the
name field or' operand field of model statements.
For example, consider the nacro
definition, macro instruction. and
generated statements (shown in the boxes in
this order) below.
The function of this macro definition is
to move the contents of one storage area to
another area in main storage.
The symbol
SAVEAREA is defined outside the macro
definition.

illust~ates

this

r-------T----------T----------------------,
I
IOperI
I

IName
lation
I
Jperand
I
~-------+----------+----------------------i
I
I MACRJ
I
I
I&NAME
I MOVE
I
&TO,&FRO~
I
I &CG8
I SErc
I ' FIELD'
I
I STH
I
12, SAVEAREA
I
I &NAME
I
I LH
I
12, &CG8&FRO~
I
I &CG8
I SErc
I ' AREA'
I
I
ISTH
I
12,&:G8&rJ
I
I
ILH
I
12,SAVEAREA
I
i
I MEND
I
I
~-------+----------+-----~----------------~
IHERE
I MOVE
I
A~B
I
~-------+----------+----------------------~
IHERE
ISTH
I
12,SAVEAREA
I
I
ILH
I
12,FIELDB
I
I
I STH
I
12 , AREAA
I
Il _______ ILH
12,SAVEAREA
__________ LI ______________________
J!
~

If a SETA symbol is used in the operand
field of a SErc instruction, it is replaced
by the value of the SErA symbol converted
to a decimal self-defining value with any
leading zeros jropped.
A SEr: symbol may be usej in the operand
field of SETA, SErB, SErc, AIF, and AIFB
instructions.

r----~-=T=---------T----------------------l

I

I Name

I Jper-

I

I

lation
I
Operand
I
t-------+----------+----------------------~
I
I ~ACR:)
I
I
I&NAME
I MOVE
I
&rO,&FROM
I
I&CG4
ISETC
I
'FIELD'
I
I&NAME
18TH
I
12,SAVEAREA
I
I
I LH
I
12, &CG4&FROM
I
12, &CG4&TO
I
I
I STH
I
I
I LH
I
12, SAVEAREA
l
I
I~END
I
I
t-------+----------+----------------------~
I HERE
I MOVE
I
A,B
I
~-------t----------+----------------------~
IHERE
ISTH
,12,SAVEAREA
I
I
I LH
I
12, FIELDB
I
12,FIELDA
I
I
ISTH
I
LH
12" SAVEAREA
I _______ I ______
L
- ___ I ______________________
JI
~

~

If you have assigned a character value
to a SETC symbol, you may change the value
assigned by using the SErc symbol in the
name field of another SErc instruction.
If
a SETC symbol has been used in the name
field of more than one SErc instruction and
the SETe symbol is used in the name or
84

~~f!ll!gg_~~~~!Eigl~~i£~_~ET£_Ill~£E~£~iQll~·

A substring consists of a character valQe
enclosed in apostrophes, immejiately follo~ed by two arithmetic terns separ2ted by
a comma and enclosed in parentheses.
The character value assigned to a SEr
symbol in a SErc instruction can be a SQbstring. Substrings permit you to assign,
to a SETC symbol, part of the value
assigned to another SEr symbol, a symbolic
parameter, a self-defining char2cte~
string, or any valid combination of the
precejing values.

The arithmetic terms may consist of SETA
symbols and self-defining decimal valQes
with any leading zeros dropped.
The first
term indicates the first character in the
substring~ the second term the number of
characters in the substring.
A character string fron which a substring is extracted may contain up to 16
characters.
The resulting substring that
can be assigned to a SETC symbol n2y contain up to eight ch~racter8.

The following are examples of valid substring definitions in operand fields of
SETC instructions:

r------r-----------T----------------------,
I~ame
I Operation I Operand
I
~------+-----------+----------------------~

&CGO LI SErc
I______________________
' &CG6' .' &CG8' (2,3) JI
lI ______
___________ L

'&CG6' (2,3)
·&CG10.XYZ'(4,&~G8)

·XYZ&CG10'

(&~L4,6)

'&CG1.XYZ&~G2'(4,7)
I

&PA.RA.M' (3,,2)

The following is not permitted in the
operand field of a SETC instruction:
, & CG 2'

(4, 6)

Blank between character
value and arithmetic
terms.
~nly one arithmetic term.
'&CG15' (8)
A.rithmetic terms not
'&CG4' (5 6)
separated by a comma.
~rithmetic terms not enc'CG5' 3.,4
losed in parentheses.
'&CG5' (&C34,2) First term not arithmetic.
The following example illustrates the
use of substrings.
rh~ macro instruction
(HERE
M~VE
FIELDA.,B) assigns the
character value FIELD~ to the symbol &ro.
The SETC instruction assigns the value
FIELD to the symbol &CG6.
rhe &CG6 symbol
is used in the LH ~odel statement and is
replaced in the generated statement by the
value assigned to it.
r-------~----------T----------------------,

IName
IOperation I
Operand
I
~-------+----------+----------------------~
I
IMA.CRO
I
I
\&NAME I MOVE
I
&TO,&FROM
I
I&CG6
ISETC
I
'&ro' (1,5)
I
I&NAME ISTH
I
12,SA.VEA.REA.
I
I
ILH
I
12,&CG6&FROM
I
I
ISTH
I
12,&rO
I
I
ILH
I
12,S~VEA.RE~
I
I
I~END
I
I
~-------+----------+----------------------~
IHERE
I MOVE
I
FIELDA.,B
I
~-------+----------+----------------------~
lHERE
ISTH
I
12,SA.VEAREA.
I
I
ILH
I
12,FIELDB
I
IsrH
I
12,FIELD~
I
I
12, SAVEAREA.
lI _______ LI LH
__________ I ______________________
JI
~

Substrings may be concatenated with
other character values in the operand field
of a SETC statement.
If a substring follows a character value that is not a substring, the tHO may be concatenated by
placing a period between the first character value and the substring.
For example, if &CG6 is assigned the
character value A.B%4, and &CG8 is assigned
the character value ABCDEF# the following
statement assigns &CGO the character value
A.B%4BCD.

If a substring precedes another character value, the tNO may be concatenated by
placing the terminating parentheses of the
substring and the opening apostrophe of the
next character value adjacent to one
another.
If &C32 is assigned the character value
A.B%4, and &CG3 is assigned the character
value 5RS, anyone of the folloNing statements may be used to assign &CG4 the
character value A.B%45RS.

r------r--------r-------------------------,
I
I Oper- I
I
IName

I

ation I operand

I

t------+--------t-------------------------~

I &CG4
I&C34
I &CG4
I&CG4
I&CG4

I
I
I
I
I

SETC
SETC
SETC
SETC
SETC

I '&CG2 &C33'
I '&CG2'.'&CG3'
I '&CG2. &CG3'
I '&CG2'(1,4)'&~33'
t '&CG2'(1,4)'&CG3'(1,3)

l ______ L ________ L ____________

I
I
I

I

I

~------------J

If &C32 contained A.B%4XY and &CG3 contained 5RSTU, only the last instructi~n ~f
the preceding example would produce the
desired result of AB%45RS.
The first f~ur
instructions Nould be in error because the
result exceeds eight characters.
Assume &CGl is assigned the character
value ABCDE, &CG2 has been assigned the
character value FGHIJKPQ" and &CG3 is
assigned the character value LMNO.
The
following SETC instruction can be used to
assign &CG4 the character value DEXYZFG~.
r----T----~T------------------------------l

1

lOper-I

I
I

I~amelationloperand

~----+-----+------------------------------~

'&CG1.XYZ&C32' (4,7)'&C33'(2,1) JI
lI&CG4
____ LISErc
_____ LI ______________________________

The preceding example also illustrates
how a character string fr~n which a substring is extracted can contain up to 16
characters:
r &CG1. XYZ &CG2!
becomes 'A.BCDEXYZFGHIJKPQ' before the substring DEXYZF3
is extracted.

SETB -- SET BINA.RY
The SETB instruction assigns the value one
(rRUE) or zero (FALSE) to a SEra symbol.
The initial value is zero.
Y~u nay change
the value assigned to a SETB symbol by
using another SErB instruction.
rhe format
of this instruction is:
~acro

Language

85

r----------T---------T--------------------l
I Oper- I
I

I

IName

i

atlon

•

A logical express10n may begin Nith the
operator NOT.
It must not b2gin with
the operators ~ND or OR.

•

The logical operators nust be seoaratej
by one blank from the terms they-relate.

•

The entire logical expression nust be
enclosed within parenthesese

i

jOperand

~----------+---------+--------------------1
IA SETB
I SETB
IA logical expression I

I symbol
I

I
I

I

I

lor a relational
I
lexpression enclosed I
lin oarentheses
I

l _____ =====i======= __ i===:==_==== ____ =====j
You may use SETB symbols in the operand
field or name field of model statements.
The SErB symbol can be either local or
global.
For DPS there are 256 different global
and 256 different local SErB symbols.
For TPS there are 256 different global
and 128 different local SETB symbols.
A global SETB symbol has the forn
where n = 0-255.

&B3~,

A local SErB symbol has the forn &BLn,
where ~ = 0-255 for DPS and ~ = 0-127 f;r

rps.

The logical or relational expression in
the operand field is evaluated to deter nine
whether it is true or false, and the value
one or zero, respectively, is assigned to
the SETB symbol in the name field.
~ lQgi£~1_~~2~~§§i2~ may consist of a
single term, or of two terms separated by a
logical operator.
If a logical expression
consists of a single term, the term may be
zero, one, or a SETB symbol.
If a logical
expression consists of two terms. each term
must be a SETB symbol.

The lQgb£~1_Q2~r~iQr~ are AND, OR, and
NOT.
The logical operator NOT may only be
used to negate a SErB symbol.
A two-term logical expression is evaluated according to the following rules of
Boolean logic:
•

X AND Y is equivalent to X * Y, i.e.,
0*0 = O~ 0*1 = 0, 1*0
O~ and 1*1 = 1.

•

X OR Y is equivalent to X + Y, i.e.,
0+0
0, 0+1 = 1, 1+0
1. and 1+1 = 1.

•

Nor X is equivalent to 1 - X, i.e.,
i - O l a n d 1-1 = O.

=

The following rules must be observed:
co~tai~

•

A logical expression must not
two terms in succession.

•

A logical exoression may contain two
operators in~succession~but only in the
combination ~ND Nor and OR NOT.

86

The followinJ are examples of logical
expressions that nay be used as the operanj
of a SETB instruction:
(NOT &B39)
(&BG8)
(1)
(&BG13 AND &BL4)

(&BG8 AND NJr &BL6i
(NOr &BL22 AND &BG22)
(NOr &BL24 AND Nor &BL25)
(&B312 OR &BL10)
(&BG25 OR Nor &BL25)
(NOT &B810 OR &B316)
(NOT &BGO JR NJT &B31)
The following is not pernitted as the
operand field of a SETB instruction, for
the reasons stated:
&B88

Not enclosed in
parentheses.
(&BG6 &BL8)
rwo terms in
succession.
(&BG10 AND JR &BG12)
Two operators in
succession; seconj
one is OR.
(&BL10 NOr Nor &BL18) rwo operators in
succession; first one
is Nor.
(NOr 1)
Negated tern is not a
SErB symbol.
(AND &BG2 OR &BG3)
Expression begins
with an operator
other than Nor.
(&AGl AND &AG3)
Not SETB variable
symbols.

~ relational expression is eithpr nn
arithmetic-relatio~-or-a-character
relation.

An arithmetic relation consists of tHO
arithmetIc-expressI;ns-connected by a relational operator.
~n arithmetic expression
can be a SETA symbol, a SETe symbol, Or any
valid operand of a SET~ instruction.
If a
SETe symbol is used in an arithmetic relation, the SET2 symbol nust represent an
arithmetic value.
rhe arithmetic relation
is enclosed within oarentheses.

A character relation consists of two

charact~r-valu~s-connected by a relational

operator. In a character relation. each
character value must be enclosed by apostrophes.
~ character value can be a SErA
syrrbol. a SETC symbol~ or any valid operand
of a SEre instruction, except substrings.
If a SETA symbol is used in a character
relation. the SETA symbol is treated as a
character value. The maximum length of any
character value used in a character relation is eight.
If two character values in
a character relation are of unequal length,
the longer value is always considered
greater, regardless of the content of the
two values.
The character relation is enclosed within parentheses.

EQ
NE
LT
GT
LE
GE

(equal>.
(not equal>,
(less than),
(greater than),
(less than or equal to).
(greater than or equal to).

A relational expression ~ust not contain
two values in succession.
~ relational
expression must not contain two operators
in succession. The ~elational operators
must be separated from the values they relate by one blank.
Relational operators and logical operators must not appear in the same SErB
instruction.
The following are examples of valid
operand fields of SETB instructions with a
relational operator:
('FIELD' NE '&CG4')
(12 EQ &~L4)
(&AL10 GT &A.G6)
('&CG8' Lr '&CG4')
(' &CG5.X9' E~ '&CG2')
(&AL9+&AL4*7 Lr 16*&AG1+4)
(&BG4 EQ 1)
The following is not pernitted in the
operand field of a SErB instruction, for
the reasons stated:
&BG8
(&BG6 &BL8)
(&BG10 GT EQ &B316)
(LE &BL20 EQ &BL21)
(&~G3

EQ '&AG4')

Not enclosed in
parentheses.
Two terms in
succession.
rwo operators in
succession.
Expression begins
with an operator.
Arithmetic value
equated to character
value.

The logical value tnat has been assigned
to a SETB symbol is substituted for the
SETB symbol when it is used in the operand
field of a SETB, AIF~ or AIFB instruction.
(A. detailed description of the ~IF and ~IFB
instructions is given in the sections AIF
-- Conditional Branch and AIFB-- Condr=~!on~!~ranch_Ba£kwar~.)
If the-SETB-symbol is used in any other ~ssembler-Ianguage
statement, the logical value is converted
to an integer.
The logical value TRUE is
converted to the integer one, and the logical value FALSE is converted t~ the integer zero.
If you have assigned a logical value to
a SETB symbol, you may change the value
assigned by using the SETB synb~l in the
name field of another SETB statement.
If a
SETB symbol has been used in the name field
of more than one SETB statenent, and the
SETBsymbol is used in the name or operand
field of another nodel statement, the value
substituted for the SETB symbol is the last
value assigned to it.
The following example illustrates this
rule.
'&T~' 3T '~AAAA~' has the logical
value TRUE because FIELDA has a greater
binary value than A~A~~~.
The function of this macro definition is
to move the contents of one storage area to
another area in main storage.
rhe boxes
contain respectively, the macr~ definition,
macro instruction, and generate5
statements.

r-------T----------T----------------------,
I Name
IOperation I
Operand
I
~-------+----------+--------------------~-~
I
I MACR:>
I
I
I MOVE
I
&TO,,&FR~~
I
I & NAME
I&BG8
\SETB
I
('&T:>' 3T I~~~~~~') I
I&N~ME
ISTH
I
12,SAVEAREA
I
I
I LH
I
12, &FR~M&B38
I
I &B38
I SETB
I
(NOr &BG8)
I
I
I STH
I
12, &TO&B38
I
I LH
I
12 r SA. VE~REA.
I
I
I
JMEND
I
I
~-------+----------+----------------------~
I HERE
\ MOVE
I
FIELD~,FIELDB
I
t-------t----------t--------------~-------~
IHERE
ISTH
I
12,S~VEARE~
I
I
I LH
I
12, FIELDB1
I
I
ISTH
I
12,FIELDA.O
I
12,SAVE~REA
lI _______ \LH
__________ I ______________________
lI
~

~

!g~t!~g_fQf_~~ll_~~ra~gt~f~.

~ null parameter is a symbolic parameter defined in a
positional prototype statement, but undefined in the macro instruction calling the
macro definition.

~acro

Langaage

87

The SErB instruction can be used to test
for the presence of a null parameter.
This
is accomplished by placing the symbJlic
parameter tJ be tested in the operand field
of a SETS instruction and equating it to a
null character string.
~ null character
string is represented by two apostrophes.
If the parameter is present in the calling
macro instruction, the result is F~LSE or
zero.
If the parameter is not present in
the calling macro instruction, the result
is TRUE Jr:- Joe.

r------r---------r-----------i
IName 10perationiOperand
L ______ i ____

__

~

==+= __________

~

I

M~CRO
&

•

• DO;1N

~GO

i1
1
V

•

•

• UP
LOOP

7,FOOR

!
I
14
I

.JUT

V

ANOP
~H

•

i

~

For example, if the prototype statement

~GO

•
•
•
~GO
•
•

is:
&N~ME

~DD

&FROM1,&FROM2,&SUM

.DOWN

and the macro instruction is:
FIRST ADD FIELD1"FIELD3

~hile

the result of the SETB

I

1 •

I ~GOB

I

I. 3P

I

1

I
1
1':1.

I"

I

•

I •

I·OUT
L
______ I~END
_________
~

&B38 SETB ('&FROM2' EQ
is TRUE

II)

V

19,D!\T!\

•

I

the result of the SErB instruction

is F~LSE (0),
instructiJn

12
.!\G~IN"

=~3~IN1LH

I

&B310 SETB (f&FROMl f EQ

I

I
V

I
I ___________ JI

~

If)

To ensure proper generation, all
sequence symbols used in a macrJ definition
must be unique.

(1).

When the same prototype statement and
the same macro instruction are used, the
result of the SETB instruction
&B310 SETB ('&FROMl l

NE

I')

The following are valid sequence
symbols:
• READER
• LOOP2

• A2345 6

.X:4F2

.!\34
.s~srE~

.3L16
is rRUE (1),
instructiJn

~hile

the result of the SETB

&838 SETB (I&FROM2' NE ")
is FALSE (0).

rhe followin~ are invalid sequence symbols, for the reasons stated:
IOARE~

.2468
SEQUENCE SYMBOLS

• ~RE~24S6

Sequence symbols are used in the operand
fields of AGO, ~GOB, ~IF, ~IF8 instructions
and in the name field of model statements
and conditional assembly instructions.
They indicate to the Assembler the sequence
of source statements to be generated.

• IN AREA
.TWO.AS

~ sequence symbol consists of a period
(.)
followed by one to seven alphabetic
and/or nuneric characters.
The first
character must always be alphabetic.

The following example illustrates the
use of sequence symbols as a "branching
address".

First character is not a
period.
First character after period
is nJt a alphabetic •
~ore than seven characters
after periJd.
Contains an enbedded blank •
contains a special character
other than initial periJd.

A sequence symbol may be used in the
name field of any statement within a macro
definition that dJes not requir:-e a synbJl
or:- SEr symbol, except a header Jr a prototype statement.

If a sequence synbol appears in the name
field of an inner macro instruction in a
macro definition and the corres~Jnding prJtJtype statement contains a symbolic parameter in the name field, the se~uence symbJl d~es not replace the symbolic parameter
in the model statement.

A sequence symbol appearing in the name
field of a model statement does not appear
in the generate1 statement.

AIF -- CONDITIONAL BRANCH
The AIF instruction may be used to skip one
or more statements in your macro definition. The format of this instructi~n is:

r-------r-----r---------------------------l
I
lOper-I
I
lName·. lationloperand
I
~-------+-----+---------------------------~
IA seIAIF IA logical or relational ex-I
Iquence I
Ipression enclosed in paren-I
Isymbol I
Itheses, followed by a seI
lor
I
Iquence symbol defined in a I
~blank
statement
l _______ I _____ Ifollowing
___________________________
JI
~

~

Any logical or reiational expression
that may be use1 in the operand field of a
SETB instruction may also be used in the
operand field of an AIF instruction. As in
the SETB instruction, the logical or relational expression must be enclosed in
parentheses. The sequence symbol in the
operand field must immediately follow the
closing parenthesis of the logical or relational expression.
It must also appear in
the name fiel1 of ·a statement iQ~!~!~~g the
AIF instruction.
The follo~ing are examples of valid contents ~f the operand fields of AIF
instructions:
(&B312 AND &BL10).LOOP
(&AL10 EQ &AG6).LAST
The following examples are invalid as
the operand field of an AIF instructi~n,
for the reasons stated:
(&BG8 AND NOT &BG9)
.X4F2
(&BG8 AND NOT &BG9)

~~[~

No sequence
symbol.
No logical or
relational expression.
Blank between
logical expression and sequence symbol.

The logical or relational expression in
the operand field is evaluated to deternine
~hether it is TRUE or FALSE.
If the expression is TRUE, the statement named by the
sequence symbol in the operand field is the
next statement processed by the Assembler.
If the expression is FALSE, the next

sequential statement is processed by the
Assembler.
The following example illustrates the
use of the AIF conditional-assenbly
instruction.
It also illustrates the use
of global SET symbols to carry values
between macro instructions in the same
assembly.
The function of this macro definition is
to move the contents of one st~rage area to
another area in main storage.
The first time the macro instruction
appears in an assembly, a save area is
defined.
The generate1 instructions of all
additional appearances ~f this nacrJ
instruction in an assembly use the save
area and the register specifie1 in the
first appearance of the macro instruction.
The boxes in the example bel~w c~ntain
respectively: the macro 1efinition, the
first macro instruction, the statements
generate1 as a result of the first macro
instruction, the second macro it1structi~n,
and the statements generated because of it.

r-------T-------T-------------------------,
I Oper- I
I

1

I Name
I ation I operand
I
~-------+-------+-------------------------~
I
I MACRO I
I
I
I MOVE
I &TO,&FROM,®,&SAVE
I
I
I AI F
I ( &BG1) • 1\
I
1 &B31
I SETB
I (1)
I
I &CGl
I SET2
1 '&SAVE'
I
I &232
I SET2
I ' ®'
I
I
I B
I &2G1+2
I
It2G1
1 DC
I H'O'
I
I. A
I STH
I &2G2, &231
I
I LH
I &CG2, &FROM
I
I
~
I STH
I &2G2,&TJ
I
I
I LH
I &2G2, &C31
I
I MEND I
I
I
~-------+-------+-------------------------~
I
I MOVE I TAX,DEDU2T,9,wORK1
I
~-------+-------+-------------------------~
I
I B
I wORK1 + 2
I
IWORK1 I DC
I H'O'
I
I
I STH
I 9,wORK1
I
I LH
I 9, DEDUCT
I
I
I
I STH
I 9,TAK
I
I
I LH
I 9, WO RK 1
I
~-------+-------t-------------------------~
I
I MOVE I FICA,DEDU2T,7,WORK6
I
~-------t-------+-------------------------~
I
I STH
I 9,wORK1
I
I
I LH
I 9, DEDUCT
I
I
I STH
I 9,FI2A
I
Il _______ I _______
LH
I _________________________
9, wORK1
JI
~

~

Macro Language

89

The B and DC statements are not
generated for the second macro instruction,
for when the first macro instruction was
assembled, &B31 was set to one.
rhe third
and fourth parameters in the second MOVE
macro instruction are ignored.
&CG1 is
used to assign a name to the DC model
statement.

AIFB -- CONDlrlONAL BRANCH BACKWARD
The AIFB instruction may be used to conditionally alter the sequence in which source
statements are processed by the macro
generator.
The format of this instruction
is:

r-------T-----T---------------------------,
I
loper-I
I
IName
lationlOperand
I
~-------+-----+---------------------------~
lA se- IAlFB IA logical or relational ex-j
Iquence I
Ipression enclosed in paren-I
lsymbol I
I theses, followed by a se- I
lor
I
Iquence symbol defined in a I
Il blank
statement
_______ LI _____ Ipreceding
___________________________
JI
~

j-------r------r--------------------------,

loper- I
I
lation IOperand
i
.-------+------+--------------------------~
I

I Name
i

MACR:)

i

I

MOVE
&NOCHAR~&rO,&FRJM
I
SErA
&~OCHAR
I
I&AL2
AIF
(&AL2 LE 256).LSTMOV
!
I
I.LOOP
MVC
&rO+&AL1. (256).&FRJ~+&ALl I
j&AL1
SErA
&AL1+256
I
I&AL2
SErA
&NOCHAR-&AL1
I
AIFB
(&AL2 Gr 256).LOOP
I
I
I.LSTMOV1MVC
&TO+&AL1. (&AL2),&FRJM+&ALlj
I
I MEND
I
~-------+------+--------------------------~
I
I MOVE I 540 , O[J r , I NPU r
I
.-------+-~----+-------------------------~~
I
IMVC
IOUT+O(256),INPur+o
I
IMVC
IOUT+256(256) ,INPur+256
I
I
I
IMVC
lour+512(28),INP[Jr+512
I
~---~~~~+------+--------------------------1

I

I MOVE 197,oar+540,REsaLT
i
~-------t------t--------------------------~
lI _______ IMVC
______ LIOUT+540+0(97),RESULr+o
__________________________ JI
~

A30 -- UNCONDITIONAL BRANCH
The A30 instruction may be used to ~lter
the sequence in whi8h source statements are
processed by the Assembler.
rhe fJrnat of
this instruction is:

r-------T---------T-----------------------l

The AIFB statement is identical to the
AlF statement, except that the sequence
~ymbol in the operand fielJ ~us~ be in the
name field of a"statement e~~£~~irrl the
AIFB statement.

The follo~ing example illustrates the
use of the AIFB instruction.
rhe function
of the macro definition is to move a specified number of bytes of information from
one location in main storage to another.
The first operand represents the number of
bytes to be moved.
rhe second operand
specifies the first position of the field
to be filled.
The third operand specifies
the location of the first byte to be moved.

rhe boxes in the example belo~ contain
respectively:
the macro definition, the
first macro instruction, the statenents
generated as a result of the first macro
instruction, the second macro instructi~n,
and the statements generated because of it.

The value of the local variable symbol
&AL1 is initially zero.
90

I
I OperI
I
IName
I ation
I Operand
I
~-------t---------+-----------------------~
ih seI AGJ
I A sequence synb~l
i
Iquence I
I defined in a followingl
Isymbol I
I statenent
I
I
I
I
I Jr
Il blank
_______ LI _________ LI ______________________ -JI
rhe sequence symbol in the operand field
may be in the name field Jf a statenent
f~!!Q~!gl the A30 statenent.
rne statenent
named by the sequence symbol in the operand
field is the next statenent prJcessed by
the Assembler.
The followin~ example illustrates the
use of the AGO instruction.
rhe function
of this macro instructiJn is tJ move ~ specified number of bytes from one loc~tion in
main storage to another.
rhe MOVE na8rJ
definition shown in the section AIFB -Conditional Branch Backward is use1-as-an
Inner-macro-instruction-ifi-this example.
The boxes in the exampl e belJw c:::mtain
respectively:
the macro definition, the
first macro instruction, the statenents
generated as a result of the first macro
instruction, the second macro instructiJn,
and the statements 3enerated because of it.

r------T---------T------------------------,
I OperI
I

1

I Name I ation
I Operand
I
~------+---------+------------------------~
I
I MACRO
I
&NOCHAR,&TO,&FROM
I
I
I MOVEN
I
I AIF
('&NOCHAR' EQ ").A.
I
I
I A.IF
(&NOCHAR NE 2).B
I
I.A
I 8TH
12~SAVEA.REA
I
I LH
12,&FROM
I
I
I
I STH
12, &TO
I
1
I LH
12,SAVEAREA
I
I
I AGO
•C
I
I.B
I ~OVE
&NOCHAR,&TO,&FROM
I
I. C
I MEND
I
~------+---------t------------------------~
I
I MOVEN
I , FIELDA, wORK
I
~------+---------t------------------------~
I
18TH
I 12, SAVEAREA
1
I
I LH
I 12, WORK
I
I 12, FIELDA
I
I
I STH
1
I LH
I 12, SAVEAREA
I
~------+---------+------------------------1
I
I ~OVEN
I 97,OUT+540,RESULT
I
~------+---------+------------------------~
MVC
I ________________________
OUT+540+0(97),RESULT+OIJ
lI ______ I _________
~

r-------T------

T --------------------------,

1
IOper- I
I
I Name
lation IOperand
I
.-------t------+--------------------------~
I
I MACRO I
I
I
I MOVE I&NOCHAR,&TO,&FROM
I
I&AL2
\SETA \&NOCHAR
I
I (&AL2 LE 256).LSTMOV
I
I.LOOP IAIF
IMVC
I&TO+&AL1.(256),&FROM+&AL1 I
I
1&AL1
ISETA I&AL1+256
I
I&AL2
ISETA I&NOCHAR-&A.L1
I
I
I
I AGOB I·LOOP
I.LSTMOVIMVC
I&TO+&AL1.(&AL2),&FROM+&A.L11
I
I MEND I
I
~-------t------+--------------------------~
I
I MOVE 1540,OUT,INPUT
I
~-------+------+------------~----~--------~

I
IMVC
IOUT+O(256),INPUT+O
I
IMVC
IOUT+256(256),INPUr+256
I
I
1L _______ IMVC
______ IOUT+512(28),INPUT+512
__________________________ JI
~

~

~

ANOP -- NO OPERATION

AGOB

-~

UNCONDITIONAL BRANCH BACKWA.RD

The AGOB instruction may be used to alter
the sequence in which source statements are
processed by the Assembler.
The format of
this instruction is:

r--------T---------T----------------------,
I
IOperI
I
I Name
lation
I
Operand
I
~-----~--t---------t----------------------~
IA seIA80B
I
A sequence symbol
I
I
jefined in a
I
I quence I
I
preceding statenentl
I symbol I
blankl _________ I ______________________ JI
llor
________
~

~

The AGOB instruction is identical to the
AGO statement except that the sequence symbol in the operand field must be in the
name field of a instruction EEg~g~~~~ the
AGOB instruction.
The following illustrates the use of the
AGOB instruction. The macro definition in
this example is functionally the same as
the macro definition in the section AIFB-~Q~~i~~Q~~l_~E~~~~_~~~~~~EQ·
-----The boxes in the example below contain
respectively:
the macro definition, the
macro instruction, and the statements
generated as a result of the macro
instruction.

The ANOP instruction may be used to facilitate conditional and uncondition~l
branching to statements named by symbols or
SET symbols.
The fornat of this instruction is:

r--------r--------T-----------------------,
I
IOperI
I

i Name

lation
I
Operand
I
.--------t--------t-----------------------~
I A seIANOP
I
Blank
I
1 quence I
I
I
I ________
symbol LI ________ LI _______________________ JI
L

If you ~ant to use an A.GO, A;OB, AIF, or
AIFB instruction to branch to ~ instruction
that has a symbol or SET symbol in the name
field, place an ANOP statement before the
instruction you want to branch to, and
branch to the ANOP instruction.
The following example illustrates the
use of the ANOP statement.
This ex~nple
allows a field of any length to be moved.
The source and destination fields need not
be on a halfword boundary.
The name field
contains the symbolic name of the first
instruction of the macro routine.
The boxes in the example belo~ contain
respectively: the nacro definition, the
macro instruction, and the statements
generated as a result of the n~cro
instruction.
~acro

Language

91

r-------T------T--------------------------l
I :)per- I
I

I

IName
iation IOperand
I
~-------+------+--------------------------~
IlVIlirR;)
,...
,I

I&~OCHAR

The following example illustrates the
use of the MEXIT instruction.
rhe function
of the macro definition is to move a speci-

! '&NA.ME'
1 (&AL2 LE 256).LSTMOV

vue location in main storage to another.

-~-~

&NAME
&AL2
&CGl
"LOOP
&CGl
&ALl
&A.L2
&CGi

I MOVE
ISETA
!SETC
AlF
MVC
SETA
SETA.
SErc
~GOB

must contain a MEND instruction even if the
definition contains one or nore MEXIr
instructions.

I&NOCHAR,&FROM,&rO

I&TO+&AL1.(256),&FROM+&ALl
I&AL1+256
I&NOCHAR-&ALl

Iii
! ; LOOP

• LSTMOV A.NOP
&CGl
MVC

I
I&TO+&AL1. (&A.L2),&FROM+&ALl
~END
I
~-------+------+--------------------------~
IFIRST
I MOVE
1 54 o,INPor,oor
I
~-------t------+--------------------------~
,FIRST jMVC
jOUT+O(256j,INPur+o
I
i
i~VC
jOUT+256(256),INPUT+256
I
J _______ LIMVC
L
______ loor+512(28),INPor+512
__________________________ JI

fied number of bytes of inforTtation fron
The definition is essentially the same as
the macro definition shown in the section
~~Q_===Q~~Q~9!~!Q~~1_~£~~~h.
H~weve~~ the
use of the MEXlr instruction reduces the
time required for assembling the macro
instruction if the first routine is used •
The boxes in the example below contain
respectively:
the nacro definition, the
first macro instruction, the statements
generated as a result of the first macro
instruction, the se~ond macro instructi~n,
and the statements ~enerated because of it.

~

Note that the value of the local variable symbol &A.Ll is initially zero.

r-------T------T--------------------------l
IOper- I
I

I

I~ame

lation I:)perand

I

t-------~------+--------------------------~

MEXIT -- MACRO DEFINITION EXIT

I
I
1

rhe MEXlr instruction can be used to indicate to the A.ssembler to terminate processing of a macro definition.
The format of
this inst~uction is:

I
I.A.
I
I
I

r--------T---------T----------------------l
I
IOperI
I

iation
i
Jperand
,
~--------+---------+----------------------~
I A seIMEXIT
I
Blank
I
J quence I
I
I
I symbol I
I
I
I or
I
I
I
IL________
blank
I _________ LI ______________________ JI

I Name

~

The MEXIT instruction may be used in a
macro definition when you Nish that only a
certain portion of the definition be
generated.
For example, a definition contains two sequences of operations.
The
first sequence is to be generated if a sfecified condition is met and the second
sequence is to be generated if another specified condition is met.
The use of the
MEXIT instruction after the first sequence
will terminate generation, just the same as
the MEND instruction will do when placed
after the second sequence.
The MEXIT instruction should not be confused with the MEND instruction.
The MEND
instruction indicates the end of a macro
definition to the macro generating phase of
the A.ssembler, as well as signifying the
end of generation.
Every macro definition

92

I
,•B

!&Af.2

I ~ LOOP

MACRO
M:)VE
AIF
AIF
STH
LH
8TH
LH
MEXrT
ANOP
,SErA

I

I

&N02H~R,&rO,&FRJM

(' &NOCHAR' EQ " ) . A
(&N:)CH1\R NE 2). B
12,SAVEA.REA.
12,&FR:)M
12,&TO
12,SA.VE!\RE~

I
I
I
,
,

I
I
I
I

&N02Hl\R

I AIF

(&AL2 LE 256). LSTMOV
I
IMVC
&rO+&AL1.(256),&FR:)~+&AL1
I&AL1
,SETA. 1&1\Ll+256
I &A.L2
I SETA. I &N02H1\t{- &l\Ll
I A.GOB I. LOOP
I
I
I.LSTMOVIMVC
I&TO+&A.Ll. (&1\L2),&FRJM+&~Lll
I
I MEND !
I
t-------+------+--------------------------~
I
I~:)VE
12,OOr,INPJr
I
~-------t------+--------------------------~
I
I STH
112, SAVEAREA
,
112, INPor
,
I
I LH
112,OUT
I
I
ISTH
I
I
ILH
I 12,SAVEAREA
t-------t-----~t--------------------------~

I

IMOVE
1540,OUT,INPUT
i
~-------+------+--------------------------~
I
IMVC
loor+O(256) ,INPor+o
I
I~VC
I:)UT+256(256),INPUT+256
I
I
IL _______ LIMVC
______ LIOUT+512(28),INPOT+512
__________________________ JI

MNOTE -- REQUEST FOR A MESSAGE
The MNOTE instruction may be used to request the A.ssembler to generate a nessage.
The form3~ of this instruction is:

r-------~---------T-----------------------,

1Name
IOperationl Operand
I
~-------+---------+-----------------------~
I~ seIMNOTE
I Any combination of
I
Iquence I
I characters enclosed
I
lsymbol I
I in apostrophes. ~
I
lor
I
I severity code, as
I
I blank 1
I used in ~ssembler
I
I
I
I languages for higher I
models, is ignored.
lI _______ LI _________ LI _______________________
JI
When an MNOTE statement is processed by
the Assembler, the characters in the
operand field are printed in the program
listing in the same way error messages are
printed in the program listing. The outside apostrophes are not printed.
If variable symbols are used in the
operand field, they are replaced by the
values they represent.
The following example illustrates the
use of the MNOTE statement. This macro
definition tests for the presence of the
three parameters in the macro instruction.
If any parameter is missing, an appropriate
message is printed and assembly of the
macro instruction is terminated.

r------T-------T--------------------------,
IOperI
I

the comment.
This type is included in a
macro definition.
The Assembler generates
this type of comments statement into any
source program that uses the particular
macro definition.
The second type of comments statement
has a period (.)
in column 1, immediately
followed by an asterisk (*), followed by
the comment. This type of comments statement documents the macro definition and is
not included in the macro definition.

MEND -- TRAILER STATEMENT
The trailer statement indicates to the
Assembler that a macro definition is complete.
It must be the last statement in
every macro definition. The format of this
statement is:

r--------T---------T----------------------,

I
IOperI
I
\ Name
\ation
I
Operand
I
~--------+---------+----------------------~
I A setMEND
I
Blank
I
I quence I
I
I
I symbol I
\
I
I or
I
I
I
blank i
i i
Il ________
l _________ l ______________________
J

I

I Name

lation
I Operand
I
~------+-------+--------------------------~
I
IM/\CRO I
I MOVE
I &NOCHAR,&TO,&FROM
I
I
I AI F
I (' &NOCHAR' NE I I ) . NO
I
IMNOTE I 'FIRST PAR~MErER OMITrED I
I&BLl
ISETB
1(1)
I.NO
I~IF
I('&TO' NE ").Nl
I
IMNOTE I 'SECOND PARAMErER OMIrTED'
&BLl I SETB
I (1)
• Nl
I AIF
I (' &FROM' NE "). N2
IMNOTE I 'THIRD PARAMETER OMIrrED'
.N3
IMNOTE I 'GENERATION TERMIN/\TED'
IMEXIT I
I AIFB
1 (&BL1) • N3
• N2
&AL2
ISET/\
I&NOCHAR
.LOOP IAIF
I (&AL2 LE 256).LSTMO
IMVC
I&TO+&AL1.(256),&FROM+&ALl
&ALl
ISErA
I&AL1+256
&AL2
ISETA
I&NOCHAR-&ALl
IAGOB
I.LOOP
I.LSTMOIMVC
I&TO+&AL1. (&AL2) ,&FROM+&ALll
lI ______ lI MEND
_______ lI __________________________ JI

Comments statements may be interspersed in
the model statements of a macro definition.
Two types of comments statements are
permitted.
The first type of comments statement has
an asterisk (*) in column 1, followed by

A sequence symbol consists of a ~eriod
followed by one to seven alphabetic and/or
numeric characters, the first of which must
be alphabetic. Sequence symbols are discussed in detail under seJu~~~~_~y~Q~l~.

Keyword Macro Definitions
This section describes the differences
between a keyword macro definition and a
positional macro definition.
A keyword macro definition is used in
cases where the number or type of o~erands
is such that a positional macro instruction
becomes confusing or cumbersome.
It allows
the values specified by each parameter to
be used with a predefined keyword.
A keyword macro definition allowS the operands
to be specified in any desired order.
The keyword format has two additional
advantages:
(1) it is possible to limit
the number of operands in a given card and
(2) it allows the specification of a standard value in the prototYre statement. If
an operand is missing in the macro instruction, the standard value from the prototype
statement replaces any occurrences of that
symbolic parameter in the model statements.
Macro LangQage

93

Each keyword macro definition must
include: a header statement, a prototype
statement, model statements, and a trailer
statement.

=CARDAREA.
&rYPE
&IN 256B
&THO =123

No symbolic paraneter.
No equal si~n.
Standard value used, but
no equal si~n.
t;'If"T1'~'

UI.fUt...l...L.

C"".;
...........
v...L,=,I..I.

~,.......(""'\C'"
\....olv~-.J

..... """' ......
l~J

imme1iately folloN
parameter.

'-

sy~bolic

Like a positional macro definition, a
keyword m3cro definition mRV contain comment and conditional-assembi y statements,
all of which are described in preceding
sections. Keyword macro definitions may
include the &SYSNDX and &SYSEC~ system
variable symbols, but no &SYSLIST system
variable svmbols.
(Sep Svstpm Variahlp

symbols that are assigned values by the

The general format of a keyword prototype stat~ment is:

Assembler. rhey nay be used in the n3me,or
operand field of macro definition statements. rhey are not permitted in the n3me
field of conditional-assembly instructions.

§Ym~Ql~)·

----

~

System Variable Symbols
System variable symools are local variable

-.~-~~-~~~~~~-~

r--------T----------T---------------------,
i Operi
i

i

IName

iation

i

iOperand

~--------+----------+---------------------~

IA syrr- IA symbol IUp to 49 operands w
I
Ibolic
I
Iseparated by commas, I
Iparam- I
lof the form describedl
I eter or I
I belo~
I
I blank
I __________ I _____________________ JI
L
________ L

If a system vari3ble symbol is use1 in
the name or operand field of a state~ent
that is part of a macro definition, the
value substituted for the variable symbol
is the value the Assembler has assigned to
the variable symbol.

~

A keyword prototype statement differs
from a positional prototype statement only
in the operand field.
Each operand must consist of a symbolic
parameter follo~ed by an equal sign. Symbolic parameters are described under Posi-

tiQ~~l_f~Q~Q~Ye~_§~~~~m~g~·

-----

The equal sign may be followed by a
standard value to be substituted for the
symbolic-parameter in case the paraneter is
not contained as a keyword in the operand
field of a macro instruction.
If a standard value is either not
desired or unnecessary, the equal sign is
followed by the comma that separates the
parameter from the next parameter. In the
case of the last parameter, the equal sign
may be followed by a blank.
Apything that can be used as an operand
in a macro instruction may be used as a
standard value in a key~ord prototvpe statement, including null-values.
-The following are valid keyword prototype statement operands:
&TO=234
&LOOP2=SYMBOL
&S4=H'4096'
&FROM=
The following are invalid keyword prototype statement operands, for the reasons
stated;
94

&SYSNDX -- MACRO INSrR[JCrION INDEX
The system vari3ble symbol &SYSNDX ~ay be
concatenated to other characters tJ cre3te
unique symbols for ~enerated statenents.
&SYSNDX is assigned the decimal value 0001
for the first macro instruction th3t is
assembled. The value 3ssigned to &SYSNDX
for any other macro instruction is one plus
the value assigned to &SYSNDX f3r the ~re­
vious macro instruction. High-order zeros
are not suppressed.
Throu~hout one use of a nacr3 definition, the value of &SYSNDK may be considered a constant, independent of 3ny
inner macro instruction in that definition.
If &SYSNDX is used in the name or operan1
fie11 of a st3tement th3t is part of a
macro definition, the value substituted for
&SYSNDX is the value assi~ned to it for the
macro instruction teing interpreted.
~ne use of the &SYSNDX systen v3ri3ble
symbol is shown in the followin~ macro
definition. rhe function of this n3cro
definition is to move the contents of one
storage area to another area in ~3in
storage.

In the example, ~&SYSNDX pro~ides a
unique symbol in the name field for branching to a particul3r instruction within the
macro definition. The content of 3 field
is not moved if the first byte Jf the field
is a binary zero.
The function of this macro definitiJn is
to move the contents of one storage area to
another area in main storage.

r-----------T-----------T-----------------,
I Name
I Operation I )perand
I
~-----------+-----------+-----------------~

I

I MACRO

I
I

I
I
I
I
I

I
I
MOVE
I &rO#&FROM
I
CLI
I &FROM,X'OO'
I
I
BE
I A&SYSNDX
I
I
STH
I 12,S~VE~RE~
I
I
LH
I 12,&FROM
I
I
I STH
I 12, &TO
I
I
I LH
I 12, SAIJEAREA
I
IA&SYSNDX
I EQU
I *
I
Il ___________ I ___________
MEND
I _________________ JI
~

~

If the following macro instructions were
the 106th and the 107th macro instructi~ns
interpreted by the macro generator, the
following statements would be generated.

r--------T----------T---------------------,
I Name
IOperation I
)perand
I
~--------+----------+---------------------~

I

I MOVE

I

FIELDA#FIELDB

I

~--------+----------+---------------------~

I

ICLI

I BE

I

I

I
I

I
I

~0106

I STH
I LH
I STH
I LH
!EQU

I
I
I
I
I

I
I

FIELDB,X'OO'
A0106
12, SAIJEAREA
12, FIELDS
12., FIELDA
12, SAVEAREp...

*

I
I
I
I
I

i

I

~--------t----------+---------------------~

I

..

I MOVE

I

FIELDC,FIELDD

I

~-- -----t----------+---------------------~

I
I CLI
I
FIELDD, X' 00'
I
I
IBE
I
A0107
I
I
I STH
I
12, SAVEAREA
I
I
I LH
I
12" FIELDD
I
I
I STH
I
12, FIELDC
I
I
I LH
I
12., SAVEARE~
I
ll ________
AO 10 7 I EQU
*
__________ I _____________________
JI
~

~

CSEcr or OSECT statements processed in a
definition 3ffect tne value for &SYSECT for any subsequent inner n3cr~
instructions in that definiti~n, and f~r
any other following macro instructi~ns.
m3cr~

rhroughout the use ~f a macro definition, the value of &SYSECr may be considered a constant, independent ~f any 2SE2T
or DSE2r statements or inner macro instructions in that definition.
The example below illustrates these
rules.
(In the example, nodel statements
not required for explanation have been
omitted. )

r---------T-----------T----------------,
I Operation IOper3nd
I

I Name

~---------t-----------t----------------~

I
I
1 I&INCSECT
2 I
I

I
I &IN:Se-:2T
I
I Y( &SYSECT)
I

I
I
I
I
I

~---------+-----------+----------------~

I
I
3 Icsour1

i
I
5 I
6 I
I

4

I MACRO
IO[JTR1
ICSECT
iDS

I INNER
I INNER
IDC
I MEND

I

I

I
110ac
I INA
IINB
IY(&SYSE:r>
I

I
I
I

I
I
I
I
I

~---------+~-~--------+----------------i

I
I
7 I

I
8

I MACRO
I )[JTR2
I DC

I :-.1E~D

~---------+-------.
IM~INPR03

I
9 I
10 I
-- CURRENT CONTROL SECTION

I MACRO
I INNER
ICSECT
I DC
I MEND

ICSECT
IDS
I :)[JrR1
IOUTR2

I

I

I
I

I Y( &SYSECr)
I

I
I

1200C
I
I

I
I
I

--+----------------i
I
I

t---------+-----------+----------------~

The syste~ vari3ble symbol &SYSECr may be
used to represent the name of the contr~l
section in which 3 m3cro instructi~n
appears. For each macro instruction processed by the Assembler, &SYSECT is
assigned 3 value that is the name of the
control section in ~hich the macr~ instruction appe3rs.

IMAINPROG ICSECT
I
I
I
IDS
1200C
I
ICS)Ur1
ICSEcr
I
I
I
IDS
1100:
I
I I NA
I cs ECr
I
I
I
I DC
I Y( CS)[JT1)
I
I I NB
1CS ECT
I
I
I
IDC
IY(INA)
I
I
I DC
I Y(M~It-lPRJ3)1
lI _________ IDC
___________ IY(INB)
________________ JI

~hen &SYSECr is used in a macr~ definition, the value substitute1 for &SYSE:T is
the name of the last CSECT, OSECT, or START
statement that occurs before the macr~
instructi~n.
If no named CSECr, OSECT, or
srART statement occurs before a macr~
instructi~n, &SYSECT is assigned a nullcharacter value for that macro instruction.

Statement 8 is the last CSECr, DSECT, or
START instruction processed before st3tement 9 is processed.
Therefore, &SYSECT is
assigned the value MAINPR)3 for macro
instruction )UTR1 in statement g.
M~INPR03
is substituted for &SYSECr ~hen it 3ppe3rs
in sta tement 6.

~0y0ECT

~

~

Macro Language

95

statement 3 is the last CSECr, OSECr, or
instruction processed before statement 4 is processed.
rherefore &SYSE2T is
assigned the value csour1 for macro
instruction INNER in statement 4.
csoar1
is substituted for &SYSECr when it a~~ears
in statement 2.
ST~RT

r------T-----r----------------------------,
I

I~dwe

t------t-----t----------------------------f
!:v1ACRJ!

&NAME IADD
&NAME ISrH
ILH
&?\Ll

statement 1 is used to generate a CSEcr
instructi~n f~r statement 4.
This is the
last CSECT, DSECT, or sr~Rr statement that
appears before statement 5.
Theref8ce,
&SYSECT is assiqned the value IN~ for macro
instruction INNER in statement 5.
IN~ is
substituted for &SYSECT when it ap~ears in
statement 2.
statement 1 is used to 3enerate a CSECT
statement for statement 5.
rhis is the
last CSECT, DSECT, or START statement that
appears bef~re statement 10.
Therefore,
&CSECT is assigned the value INB for macro
instruction OUTR2 in statement 10.
INB is
substituted for &SYSECr when it ap~ears in
statement 1.

I
i

I Jper-I
lationjOperand

I&Fl,&F2,&F3,&F4,&~5

112,3AVEAREA
112,&F1

!SETA

2

I AH

12,&SYSLIST(&~L1)

ISErA
I SETA

&AL1+1
&AL1+1
(;&SYSLIsr{&AL2)i
12 t &SYSLISr (&AL1)

I

IsrH
I LH
I MEND

I

IADD

• ADD
&AL1
&AL2

i !UFB

NE ii).ADD

12,SAVE~REA

t------t-----t----------------------------f
IFTAX,FIC~,SrAX,BJNDS,DEDU:r

I

~------t-----t----------------------------~

I

ISTH

I LH

I

112,3AVEAREA
112, FT~X

I

T"1"'T"""~

I

I 1\ rT
~[l

I

I AH
I AH
ISrH
ILH

112,3 r1\X
112, BJNDS
112,DEuUcr

I

112,SAVE~RE~

I

I 1

.L

""

~

,

r

.L .... H-

~------t-----t----------------------------~

IDEUTOrlADD

IREGHR3,OrHR3,rOrHRS

I

t------t-----t----------------------------~

&SYSLIST(n) -- MACRO INSrRUCrION OPERAND
FIELD
The system variable symbol &SYSLISrCn) ~r~­
vides you with an alternate way to refer to
the nth operand of a positional macro
instruction.
n may be a decimal selfdefining value or a SETA symbol.
rhe
&SYSLIST(n) system variable symbol is not
permitted in a keyword macro definition.

IDEUTJTlsrH 112,SAVE1\RE~
I
ILH
112,REGHR3
I
I
I
I AH
112, orHRS
1
I
I srH 112., 'rJrHRS
I
lI ______ l ILH
_____ l112,SAVEAREA
____________________________ JI

r------T-----r----------------------------,
I

I ::>per-I

IName

lationlJperand

t------t-----t----------------------------~

I MACRO

&LABELI~JVE

&SYSLIST(n) and symbolic parameters may
be used in the same macro definition.
The self-defining value following
&SYSLISr(n) may be any value between 1 and
49, regardless of the number of symbolic
parameters in the prototype statement.
If
the corresponding symbolic parameter is not
contained in the prototype statement, it is
treated as a null parameter.
The following example illustrates the
use of the &SYSLIST(n) system variable
symbol.
The function of this macro definition is
to add the contents of the fields specified
in the operand field of the macro instruction and store the sum in the field specified by the last operand of the macro
instruction.
Depending on the number of
operands included in the macro instruction,
2, 3, or 4 fields are added together.
The
result is stored in the last field speci-

fied in the macro instruction operand.
96

I
i

&LABEL
&AL3
&AL4
.LO
&AL3
&AL4

srH
SETA
SETA
LH
SrH
SETA
SETA
AIFB
LH
~OO

&A,&T1,&F1,&T2,&F2,&r3,&F3
12,&A
2
3
12,&SYSLIST(&~L4)

12,&SYSLISrC&AL3)
&AL3+2
&~L4+2

('&SYSLISr(&AL3)'
12,&A

I
I
I

I
I

I
I
I
I

NE tI).LO I
I

I

~------+-----t----------------------------~
IMULMOVIMOVE IAREA,A,B,X,Y
!
~------t-----t----------------------------t
IMULMJVISTH 112,AREA
I
I
I LH
112, B
I
IS'TH 112,A
I
I
I
I LH
112, Y
I
I
ISTH 112,X
I
Il--- ___ LILH
__ __ l112,AREA
__ = _________________________ Ji
~

The preceding example fUrther illustrates the use of the &SYSLIST(n) systen
variable symtol.
In this macro definition,
a multiple move is acconplished.
rhe numb-

er of fields to be moved depends upon the
number of symbolic parameters included in
the prototype statement and the number of
entries in the operand field of the macro
instruction.

e.

If several source fields are usea,
punch two additional operand3 for
each additional source field up to
a maximum of ten source fields.
Each pair of operands consists of
the symbol of the source field followed by the length of the source
field.

Sample Macro Definition
This section contains a sample macro definition hamed GMOVE. Figure 12 is a flowchart th~t describes the logic of the macro
definition. The flowchart is an example of
one which you might draw in preparing to
code a macro aefinition.
Figure 13 is the
actual coding of the macro aefinition.
The section further contains a set of
instructions for using the macro definition
in a source program.
rhe set of instructions illustrates the rules for writing
macro instructions in a source program.
The GMJVE macro instruction causes the
Assembler to generate instructions to move
a source field to a destination field
regardless of the length of the field.
It
can also move up to ten source fields of
any length to con~ecutive locations in a
destination field.
A typical use of this
multi-source or gather-move function is to
build an output recora.
If the same move is to be used in several places within the same control section,
a facility is provided to generate the move
instructions as a closed subroutine and
link to the subroutine rather then generate
them repeatedly in-line. Use of the subroutine facility saves main storage.

The GMOVE macro instruction generate3 one
or more MVC instructions each time it
appears, as illustrated by the three
examples belmlT.

r------T----------------------------------,
IOper- I
I
I ation 10peran:i
I
t------+------------------------------~---~
IGMOVE IFIELDA,FIELDB,17
I
~------+----------------------------------~
IMVC
IFIELDA+O(11),FIELDB+O
I
t------+----------------------------------~
IGMOVE IFIELDY,FIELDX,540
I
~------+----------------------------------~
IMVC
IFIELDY+O(256),FIELDX+O
I
IMVC
IFIELDY+256(256),FIELDX+256
I
IMVC
IFIELDY+S12(28),FIELDX+S12
I
t------+----------------------------------~
!GMOVE IJUTPUr,NAME,20,~D)RESS,15,M~NNUM,51
~------+----------------------------------~
IMVC
IOUTPUr+O(20) ,NAME+O
I
IMVC
IJUTPUr+20(75),~DDRESS+O
I
IMVC
L ______ LIOUTPUr+9S(S),MANNUM+O
__________________________________ JI

IN-LINE-QSE OF THE GMOVE MACRO INSTRUCTION

An oper,and within the nacro instruction
containing the symbolic name of a source or
destination field may be address-adjustea
provided that the total length of the
operand does not exceed eight characters.
For example:

To generate the approp~iate move instructions without est~blishing a subroutine:

r------T----------------------------------,
10per- I
I

1.

Leave

2.

Punch the operation field as GMOVE.

3.

State in the operand field:

th~

name field blank.

a.

The first operand as the name of
the destination field.

b.

The second operand as the name of
the first source field.

c.

The third operand as the length of
the first source field.

d.

If only one source field is used,
enter no more operands.

I ation I Jperand
I
t------+----------------------------------~
IGMJVE I JUT+100,CITY~35,Sr~TE,20,JJB+12,41
~------+----------------------------------~
IMVC
I OUr+100+0(35) ,CIrY+O
I
IMVC
I JUT+100+35(20),Sr~rE+O
I
oUr+100+SS(4) ,J08+12+0
lIMVC
______ LI __________________________________
JI
The aaaress of the destination field in
the second MVC instruction is higher than
that of the first destination field by the
length of the first source field.
Likewise, the adaress of the aestination field
of the third MVC instruction statenent is
higher than that of the secona ~VC instruction by the length of the secona source
field.
~acro

Language

97

RESERVING SPACE IN THE DESTINATION FIELD
occasionally it is impossible to enter ~ne
or more fields in an output record at the

time the rest of the record is being built.
with the 3MOVE macro instruction,
a facility is provided to leave a space
between the fields being moved.
This is
accomplished by entering a zero as the symbol for a source field with the length
given as the number of bytes to be skipped
before the next source fielj to be moved.

For

rhe entrv in the name field ~f a G~JVE
macro instr~ction ~hich generates a subroutine is usej as the name of the entry point
of the routine.
The nane preceded by an E
is equated to the next sequential instruction following the nacro instructiJn.
Register 9 is used to link a generated subroutine.
The previous contents of register
9 are lost.
If you wish to save the contents of register 9, it is your res?onsibility to save and restore it.

example~

r---------T--------------------------T----l
I
I
ICol. 1
I Operation 1Operand
172
1
~---------+--------------------------+----~
IGMOVE
IOUr,NAME,20,ADDRESS,30,0, 11
I
154,SERNO,5,JOB,16
1
1
~---------+~-----~-------------------+----~
!MVC
!OUT+0(20)~NAME+0
!!
IMVC
IOUr+20(30),ADDRESS+0
1
1
IMVC
lour+104(5),SERNO+0
I
I
IMVC
L
_________ 4IOUT+l09(16),JOB+0
__________________________ 4I ____ J1
In the example above, the operand field
of the GMOVE macro instruction contains the
addresses of five source fields:
NAME,
ADDRESS.O,SERNO and JOB.
The symbol 0 for
the source field together with the len~th
specification of 54 cause the bytes to be
skipped from address JUT+50 to address OUT+
103 inclusively.

The operands of a GMOVE macro in3truction that link to an established subroutine
are ignored and may be omitted.
It nay be
desirable to include all operands in each
usage to ensure that the Jperands are present in the first occurrence during an
assembly.
The following example shows the 3ubroutine facility of the GMOV~ nacrJ.
The first and the third box show nacro
instructions as they mi~ht be coded in a
source program. The second and fourth box
show the source statenents generated In
account of the macro instructions.

r----T-----T-------------------------T----l
lOper-I
I col. I

I

INamel ationl Jperand

\72

I

t----+-----+-------------------------+----~

ICOL

USE OF THE SUBROUrINE FACILIry OF rHE GMOVE
MACRO DEFINITIO~
To obtain a generated subroutine with the
GMOVE macro instruction, write the nacro
instructi~n in the same manner as if a subroutine were not desired and write a unique
name in the name field of the macro
instructi~n.
The length of the name must
not exceed seven characters.
The symbolic
name preceded by an E must also be unique.
An entry in the name field will cause
the generation of the subroutine.
rhe subroutine, once established, can be used by:
•

Coding the unique symbolic name in the

name field.
•

Coding GMOVE in the operation field.

Up to five closed subroutines can be
generated within each control section.
~ subroutine thus generated can only be
used in the control section in which it is
generated.
Generation of a subroutine in
one control section will cause the nacro
generator to "forget" all subroutines
generated in previous control sections.

98

IG~JVEIJUTRE2,SERNJ,4,N~MEr20,~DIiDRESS,30,ClrY,25,Sr~rE,151-

I

I

1

I

1,0,25,INPurl,540,INPUT2,21-

I

1

i60

1

i

I
i

.----+-----+-------------------------~----f
I
ILH
9,ECJL
1*
I
START OF GMOVE SUBRJUTINE
oorREC+0(4),SERNO+0
ICOL IMVC
IMVC
OUTREC+4(20),N~ME+O
IMVC
OOTREC+24 (30) ,AD~RESS+O
OUTRE2+54(2S),:IT¥+O
1~1VC
OUTREC+79(15},STArE+0
IMVC
JorRE2+119(256),INPJrl+Q
IMVC
OUTREC+375(256),INPUT1+256
IMVC
OUTREC+631(28),INPur1+512
IMVC
OUTREC+659(256),INPUr2+0
IMVC
OUTREC+915(4),INPur2+256
I MVC
9
IBR
END OF GMOVE SUBROOrINE
1
*ECOLjDC
Y(*+2)
t----+-----+------------------------------~
120L 1GMOVE 1
1

.----+-----t------------------------------f
1
I BAS
1 9, CJ L
1
L ____ 4 _____ 4 ______________________________ J

Note that subroutines can hp. est~blishe1
without usin~ the subroutine facility as
shown in the example. This can be acconp=
lished by using the macro instruction togenerate in-line c~ding within ~ clJse1
subroutine.

M~IN-STOR~GE

CONSIDER~rIONS

FOR GMOVE

SUBROUTINES
In the preceding example, 72 bytes ~f main
storage were used for the two macro
instructions.
If the subroutine had not
been used, 120 bytes of main storage would
have been required. Eight additional bytes
of main storage are used when a subroutine
is established and each request for the
subroutine requires four bytes.
The amount of main storage that is saved
is a function of how many MVC instructions
are generated in the subroutine.
rhe use
of a GMOVE subroutine containing only one
MVC instruction does not save main storage
unless it is used six times (including the
initial time).
It would actually take
extra main storage if used less than five
times, even if no additional instructions
were required to save the contents of
register 9.

ERROR

the GMOVE macro. This can be accomplished
by using the GMOVE macro instruction to
generate in-line coding within a cl~sed
subroutine.

USE OF GLOBAL SET SYMBOLS WITHIN THE 3MOVE
M~CRO DEFINITION
To ensure a correct assembly of a macro
instruction, you must avoid any c~nflict in
the use of SET symbols.
The GMOVE macro
instruction makes use of global SET symbols
as described below.
1.

The SETC symbol &~Gl is used in the
GMOVE macro definition, and must not be
used to communicate a value past the
occurrence of the GMOVE macro instruction. In addition, if one ~r n~re subroutines are generated, the SET: symbols &CG10 to &CG15 are u~ed.

2.

If no subroutines are generated, the
GMOVE macro instruction is properly
generated regardless ~f the setting of
any global SET symbols, either before
or between occurrences ~f the GMOVE
macro instruction.

3.

If one or more subroutines are
generated in one c~ntrol section, the
SETC symbols &CG11 to &eG15 are used by
the ~ssembler to store subr~utine
names.
They must not be used between
the generation of the GMOvE subroutine
routine and the last use of the 3MOVE
macro definition to link to a subroutine routine. rhe SErc synbol &CG10 is
used to store the name of the control
section, and therefore:

~HE~KIN3

Error checking is performed on the operands
in a GMOVE macro instruction.
Generation is always terminated if either the destination field or the first
source field and its length are not specified. ~n appropriate error message is
generated.
If an invalid source field length (zer~
or non-numeric) is specified or if the
length of any other source field is
omitted, generation is terminated. ~n
appropriate error message is generated.
If an attempt is made to generate the
sixth subroutine in the same control section~ the 3MOVE routine is generated inline. An appropriate error message is
generated.
Note that subroutines can be established
without using the subroutine facility of

a.

&CG10 must not contain the nane of
the control section before the
first subroutine is created.

b.

&CG10 must not be changed until all
subroutines and linkage"s t::> subroutines in a control section have
been generated.

Macro Language

99

~

. A

~AME~

I

'

.L1NK

i

I
I

(

MEXIT

)

I

~

Put Out MVC
for Remaining
Bytes

No

Variable

i

t

.SETCGl
Put &NAME
&CGl and
Put Out
LH 9, *+8

.END
Yes

Figure 12.
100

FlOwchart of the GMOVE

~acr~

Instructi~n

~

IBM SyatuI!360

IBM

Codiag F_

X28-6S09-4 WM02S
Pri",MinU.S.".

1-"O_GlAM
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _. -_ _ _ _ _--I

I

~~~~;~~~NS

QIIAPHIC

I

1

1 PlNCH

I

I

1

1

I

1

I

CAltD ELfCTIO NUMIER

Operation

I'

HAC RiO

&NAHle

IGMOVE

16 !&F7 iLF7 'Fe ilF"8 'F"9 'LFI9 &Fll. ISlF1G

I I
~

I

l

'

·*

ArF

EQ

I I)

EQ

'&SYSeCT').TE5T

'I'

SeTe

113 1

SETle
.SlETC,

I

l'

I
. NON'AHe

AIGiOI
I

~

I

i

I

I !
I:

I

I

I

,

I I
II

!

I

I I

I

r:-OIR ISlliB!RioILlTlrINE
lIi'&iNAHIE'lEla '&ckiit:1 I '! .lIINK

,

1

t

.-

I I

I

I

1

I... ·ilt;ENIER!ATeD

I

I
I

'

I

Ail

-t

:

tr~

-

-1--

!

I

: iii
· L I NIIITie
HiNLOJT!E
HIEIXII T

!
'C 'Gi1 :
I
!
I • I
· *1

.'r

WM025

"intad in USA

..oGIAM

r: i

I
i ' i

l

,

;

!

I

T- -.

i
,

!

"'-'W~
"'·_ .. u.s .....

I

I

I

I

!'ll
fy

i

I:i :

i~
!

I

!,

•
1

IfllCiG:!;S!

r~li;"," ~·lsET~lt;it ~
A \

I 1:'1

I I~' ,-,

i
I ' '- r II! f c: 'I
I I II, IM,-FI·'-' i

.. ~

I.... rl I

I ISiEITtC' I 1'!&:""A1HEI'! !!

.* I I ' ilL

I i
[!

JO

, I, I \

t

r III" I
I

II" I

A' i.

Ie.

iii

'"

..
.; rl;o, I
I! os If "I
T
T
!
j ITT T ' T ! ! I ' ! ! ! ! I ! ! ! ! I ! ! ! ! ! ' ! !!
I I I I I I I I 1I I I I I I 1I 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 I I i 1 i II Iii I I iii I I I i 1·1
I

GEiNlsRIATIEI iL I NIKAIGIE IFIOIQ F liRST oiciclulAlRElNlclE1 I
• SEiTiCiG 1
LiUi i!
9 'Ei,~iAIHfE
! i I
I I Iii
III I i I III
'.iLc Giti i I I iSiE1Tic i i 1'I&iNiAiHlei' i i i i i i i i i I' i i i i i ! i i i I i I ! Iii i i i I i i i i
&8Li2!
5e17[8111)' i
11 i
I
I
! ' i i I i i
11:

Of

i

I

I

II

j

1

5

.1

FDfU:CTlO~.

U./Q\ ,

l"I"i~1 'l~1

_I:

"~I

IMGf 3

II
I T1 J.

r.

I

-,.::--

=i

!! f TIT T1
I

I I I

I I

III I

11

j , -[

I ,

I

]

Ii! I Iii i i ! ,_., i i i i rTn

II

II

I

I

.. Ii 'fWFtIiIIIrd cord form, 11M "feefr'o 6509, is ovoitahle for punching tiOuI'ce starements from ril" form .
•.,.tructMw\i tor uling ""is fonr1 ore- in any 1t,M :.ytt..../360 A~. Kefew-enc. MDnuItI.
comments concerning ~t-i, form to 11M Corporation, PrOfil"O'Mlinu Publicotiom, Deportment 732, Son Jose, C.lifornia 95"".

AdcW_

X21-65OP-4 WM025
PtintecftnU.S,A .

• A standofd cord form, IBM electT¢ 6509, is Qv"(Iilabl. for punching IOUrce ItQtett"enh rrom ~i, form.
instructions for U'\ing thil form orf' in ., ... y IDM '5,-srem/360 AUet.tbl., bfrr~nee ManUD'.
Addr. . commenn concer"il\g this 'orm t¢ IBM Corporvliotl, Programming Publicotions., OeportrHnt 232, SQ" ~., CalHof"'ljo 9511 ...

Figure 13.
1()?

Coding of the 3MOVE Macro-Instruction, Part 2 of 3

..--

••

•

II

~

1.ll [&fi.!T

••
,. .. 1.&

-.croG

DAft

,

...

- .-

"'~ ....... c.-.'"

0f000tI00

IIr:

.. ..

$lA_NT

•

a..os

:r:il Nil Sl ...

SR

I

~C

IJII *+ ~I}

ENn

I..-

·iI III

N~ ~D

•

:IS

ALL 510 UIQ ,cEls pIA OC
lIN loT 1&1& 112 II • END
II

•

I_

•
- IEINID

......
--OIl'
..... .. u.LA.

I

.-

t
11

I

I

I

I

I

I

c-

11

I

1- 5
I

.

1'1

In

......
-

•

•

HE

0

.

_,_lor .

• A ~ COfd form, 11M electro 6509, d CMI,labl. for punchi,. lOUtCestot..-nb from this form.
I", "'k"""' ... In any IIIMS,....;360~ ..
_I.
AcIdr-. ~b eonc.ming this form to IIM:Corpon:Ition, ~i. PublicatioN, o.,.tment 232, Son .toM, Califomkl95114.

Figure 13.

I.,..onc:.

Coding of the GMOVE Macro-Instruction, Part 3 of 3

Macro Language

103

Assemhly of a Program (DPR/TPS)

Assembler source programs can be either
assembled and executed in one job
(assemble-and-execute function) or
assembled and executed in separate jobs.
In an assemble-and-execute job. the object
program (in addition to being executed
immediately) may be punched into cards or
written onto magnetic tape.
when the assemble-and-execute function
is to be used, the followin;J conditions
must be fulfilled:
•

The program must not require linking
and/or relocation.
The Core-Image Maintenance program must
be contained in the core-image library
of the disk-resident system.
A relocatable area must be available in
the disk-resident system.

•
•

object programs that do not
require linking and/or relocatiJn can be
executed directly under control of the
disk-resident (tape-resident) systen. Use
the execute-loade~ function for this purpose. They can also be included in the
core-image library of the disk-resident
(tape-resident) system, fron where they can
then be loaded and executed.

~ssembler

The files and correspondin;J input/output
devices used for a progran assenbly are as
shown in Figures 14 and 15.
Note that for rps the literal wJrkfile
and Text Output file may be assigned to the
same tape unit.

Object programs that require linking
and/or relocation must be processed by the
Linkage Editor program before they can be
executed and/or included in the core-image
library.

S2 e p

Job Control Statements

~embler

Control
Statements and
Source Program

",

System Tape

Work Tope

I

Work Tape

Job Control Statements

~

System Disk
(Object Program in
Relocatable Area)

Assembler Control
Statements and
Source Program

Second
Work
Disk
~---_\ (optional)

Logging
Listing
literals
Crossreference listing

* The same unit may be used for both reading control cards and the
sOurce program.

** The same tape drive may be used for both object-program output,

Listing
Logging

Object Program

* The same unit may be used for reading control cards and the source program.
** The same disk drive may be IM8cI for SYSRES and SYSOOO or SYSRES and
SYSOOl but not for SYSOO and SYSOOl .

literals, and Crossreference Listing.

Figure 14.

_1(\1.
'WI"..LV"'"

Input/Output Devices Used for a
Program Assembly ~ith the TPS
Assembler

Figure 15.

Input/Output Devices Used for a
Pro;Jram Assembly with the DPS
~ssembler

r-----------------------------------------,
SYS001, ••• Required.
I

Job Control Statements

III

Device assignments are normally given at
system generation time. If, however. these
assignments were not given at that time or
if you wish to alter any of the assignments, ASSGN job-control statements as
shown below may be used to make the desired
assignments.
r------------------------------------~----l

1// JOB

~SSEMB

lor

1// JOB ASSEMB.p.I
name
I
I
I

Required if the
source program is to
be assembled only.
Required if the
assemble-and-execute
function is to be
used. (OPS only).

I
I
I
I
I
I
I

~-----------------------------------------1

1// DATE •••

I
I
I

Required if the
I
assembly is the first I
job in the system
I
run.
I

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

1//
I
I
I
I
I
I

~SSGN SYSLOG,.~.

Optiona~.

Ref ers to the
printer J which lists
job control statements if you include
a LOG ~ontrol
statement.

I
I
!
!
I
I
I

ASSG~

I
I

rps: Required.
I
DPS: Required if two I
I
workfiles are used
1
I
see (AwORK). Refers I
I
to the disk (tape)
I
I
drive containing
I
I
\\lorkfil e2.
I
~-----------------------------------------~
I
rps
I
III ASSGN SYS002, ••. Optional. ~or
I
literals. ~aybe same i
I
I
as for SYSOPT.
I
~-----------------------------------------~
~-----------------------------------------~
I
OPS
I
If I VOL SYSOOO,wORK1 Required fJr
I
1// DLAB •••
workfile 1.
I
11/ XTENr •••
I

I
1// VOL

I

Required if two
I
IIIDLAB •••
workfiles are used.
I
III XTENr ....
(See AWORK).
I
.-----------------------------------------~
SYS001~WORK2

.------------------------~----------------~
III
EXEC
Required.
L _________________________________________
JI

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

1// ASSGN SYSLST, •••
I
.
I
I
I
I

Required.
I
Refers to the
I
printer J which printsl
the program listing
I
and_ other
I
information.
I

~-------~------------------~--------------~
III ASSGN SYSIPT, ••• Required.
I

Refers to the
card reading device
(or magnetic tape
dri ve) (OPS only)
J
on which the program
I
control statements
I
il
(if any):, the
Assembler source
I
program, and (if card
I
input) an end-of-file
I
card are read.
~-----------------~-----------------------1
1// ASSGN SYSOPT~ ••• Required if an objectl
I
pro3'ram is to be
I
I
produced in cards or I
I
on ma3'netic tape.
I
I
Refers to the card
I
I
punchin3' device or
I
I
magnetic tape drive I
I
on which the object I
I
program is to be
I
I
produced.
I
~-----------------------------------------~
1// ASSGN SYSOOO, ••• Required. Refers to
I
I
the disk (tape) drivel
IL_________________________________________
containing workfile1. JI

I
I

,

Prog ram Con tro 1 Sta temen ts
Program control statements are supplied for
use by the Assembler program.
rhese statements indicate which of the Assembler processing options the Assembler ~rogram is to
perform or provide~ The Assembler control
statements are:
•
•
•
•

AWORK - Assembler Work File statement,
AOPTN - Assembler Option statement,
ICTL - Input Format Control statement,
ISEQ - Input Sequence Checking statement

The AWORK statement is used for the diskresident Assembler only. All four control
statements have the same format as Assembler
language instructions. AOPTN, AWORK, ICTL,
and ISEQ appear in the operation field,
while the various options are specified as
operands.
~WORK

-

ASSEMBLER WORKFILE srArEMENr

An AWORK statement indicates the nunber of
work areas the OPS Assembler is tJ use in
processing source-program statements.
rhe
Assembler can use either one or two \\lork
areas. Two work areas are provided only if
two disk drives are available. In this
case, one work area can be assigned tJ each
disk drive.
Usin3' two \\lork areas on separate disk drives shortens the proces3ing
time required by the Assenbler.

Assembly of a Program (OPs/'rps) .105

The format of the AWORK statement is:

r----T---------T--------------------------,
jNamej Operationj Operand
i
~----+---------+--------------------------~

IL____ I _________
Ai-10RK
I __________________________
n
JI
~

~

The ~WORK statement requires one
operand(n} ~hich must
either the digit 1
or the digit 2. If the digit 1 appears as
the operand, the Assembler assumes one work
area. If the digit 2 is used, the Assembler assumes two work areas. If no ~WORK
statement is provided~ thp- ~ssp-mbler
assumes one work area~

be

~ work area must always be assigned to a
disk area consisting of contiguous storage
positions. This is accomplished by using
the proper job-control (XTENT) statements.
For details concerhing XTENT statenents,
refer to the SRL publication !!!~_§t.~~~/3§'Q

~~g~!_~Q,_Qi§~_~EQgE~~~ing_§y§~~~L_~2~~E2!
~~Evi~E29~m§,

Form GC24-9006.

The AWORK statement must precede any
~OPTN ~tatements used and the source
statements.
AOPTN (ASSEMBLER OPTION) STATEMENTS
AOPTN statement(s) may be used if the normal ~ssembler output is to be altered.
AOPTN statement(s). must be written preceding any other source-program statements,
even an ICTL statement. Figure 16 shows
the option indicators that can be used.
The normal Assembler output consists of
two major files: the object program and
program listing. The object progran consists of three types of information: the
External Symbol Dictionary (ESD), rext
(rXT). and the Relocation Dictionaty (RLD).
The program listing consists of five lists
of information: ESO listing, source and
object program listing, RLD listing, error
listing~ and symbol table.
The format of the AOPTN statement is:

r----T---------T--------------------------,
INamelOperationlOperand
I
~----+---------+--------------------------~
~ymbol(s)
___ ~AOPTN
_________ Lloption
__________________________
JI

I

~-

~

The option(s) that may be supplied in
the AOPTN statement are shawn in Figure 16;
each option is identified by a symbol which
is used in the AOPTN ~tatement. Each
option of the AOPT~ statement may be specified in a different AoprN statement, or
they may appear as mUltiple operands
(separated by commas) in a single
statement.
106

r---------T-------------------------------,
jOPTION
i
MEANING
i
I SYMBOL

I

I

t---------t-------------------------------i
IObject program (ESD, TXr, and I
I~ODECK

"t',L,....,,,,,\A.VC'-A
.... '"'~",..Q.;!

; '"

,...:::o
.... ~'" II
__

I•

IDT.n
I ""~LJ'

.

lor tape.
(Their appearance in I
Ithe program listing is not
I
! affected. )
!

.:1:::0+-:::0'
'-&'""'-"""'""",

n ..... +-

I..I.\J'-

.£.L.l

.L,\,A..,J

~--=======+=================~----~========1

I NOESD

INa ESD data will appear in the I
lobject program or the pr~gran I
I
Ilisting.
I
~---------t-------------------------------1
'NORLD
INO RLD data will appear in the I
I
lobject program or the pr~gran I
I
I listing. Tnus, the object pro-I
I
Igram will be absolute.
I
~-~-------+-------------------------------~
I NOLIST
IThe program listing Nill not
I
I
I appear. (A statement indicat- I
j
jing the number of errors in thei
i
jprogram willJ however, be
i
I
I printed.)
I

I

.---------t-------------------------------~

I NOERR
I
I
I
I

IThe error listing will n~t
I
lappear in the program listing. I
leA statenent indicating the
I
Inumber of errors will, ho~ever,!
I be printed.)
I

~---------+-------------------------------i

jNOSYM

I
I
I

INeither a rable of Defined Sym-I

I boIs nor a Crossreference List I
Iwill appear in the program
I iisting.

I

I

~---------+~------------------------------i

write ~perations I
Ion disk are not verified.
t
.---------+-------------------------------~
I CROSSREF*I A cross-reference lis,ting will I
,
lappear instead of the symbol
I
I
Itable listing. The cr~ssI
I
Ireference listing contains all I
f
Ithe symbols used in the pr~graml
I
land the number of the statementl
1
I in which th.ey were used (see
I
I
I Appendix G). f'!Q!:~E- The total I
Inumb~r of symbol definitions
I
I
I
land references must not exceed I
INOVERIFY*IIntermed~ate

I

I

112,288.

I

~-------~ ·t-------------------------------~

ILITERAL**ILiterals will be processed. Ifl
I
ILITERAL is onitted, literals
I
I
Iwill not be processe1.
1
I
I~Q!:~:
The user must be sure hel
!
Ihas enouqh tape units for lit- I
~
leral processing.
I
.---------t------------~------------------~
I ENTRY
IAn ENTRY car1 ~ill be produced I
IL _________ lat
the end of the ~utput text. J~
_______________________________
~

* For the disk-resident Assembler only.

**

For the tape-resident Asseffible~ only.
(Not required for DPS.)

Figure 16.

AOPTN Car:'! Option Indicators

Note:

NG object deck will be produced in
of the LI~IT EXCEEDED error regardless
of the option specified.
(See ~EE§~Qi!_~~

case

~~~~~~!~E_Qi~~~Q~£i£ __ ~~~~eg~~).

Non-standard operand specificati~ns
other than the two above are not alloNed.

H~~ever,

a listing will appear.

The AOPTN statements must precede the
statements and follow the A~ORK statement., if any.

ISEQ -- INPUT SEQUENCE CHECKING

s~urce

ICTL -- INPUT

F~RMAT

CONrROL

The I~TL instruction allows you to alter
the normal format of your program statements.
An ICTL instruction statement, if
any, must precede all other statements in
the source program except the AWORK and
AOPTN' statements., if any, and must not. be
used more than once. Only the following
two formats of the IcrL instruction are
allowed:
either:

r-----T-----------r-----------------------,
IName I
I
~perationl

The ISEQ instruction is used t~ che=k the
sequence of input cards.
The format of the
ISEQ instruction statenent is as f~llows:

r-----T----------T------------------------l

IName IOperation IOperand
I
~-----+----------+------------------------~
IBlanklISEQ
ITNO decimal values ~f
I
form l,r; or blank JI
lI _____ LI __________ LIthe
________________________

The operands I and r, respectively, specify the leftmost and rightmost columns of
the field in the input cards to be checked.
Operand r must be e1ual t~, or greater
than~ operand 1.
Operand I must be greater
than 72.
The field specified by ~perands I
and r must not be greater than seven bytes.

~perand

~-----+-----------+-----------------------~
IBlankl
I~TL
25
l _____ L ___________
LI _______________________
JI

or:

r------T-----------T----------------------,

IName I Operation I Jperand
I
~------+-----------+----------------------~
IBlank I ICTL
I 25,71,38
I
l ______ L ___________ L ______

----------------J

In the first case, the operand specifies
that the begin column of the coding format
is 25. Since the end column is not specified, it is assuwed to be column 71.
No
continuation lines are permitted.
In the second case, the begin c~lunn is
~olumn 25, the end column is column 71, and
the continue column for macro instructions
is column 38.

Sequence checking begins with the first
card following the ISE2 statement.
2omparison of adjacent cards makes use of the
eight-bit internal collating se1uen=e (see
Appendix J).
The input cards are said to
be in sequence if the value in the columns
checked in the second card is greater than
or equal to that of the first card. If a
statement is found to be out of se1uence a
warning is given but no error message
appears in the 1iagnostics- listing.
An ISEQ statement with a blank operand
terminates the checking operation.
The
next ISEQ statement initiates a neN che=k.
Sequence checking is only performed on
statements containe1 in the s~urce ?r~gran.
Statements generated by a macro instruction
are not checked for se1uence (see A??enjix
J) •

Assembly of a Progran (DPS/rpS)

107

Cataloging a Macro Definition

The macro library is maintained by the
Macro Maintenance Program (MMAINT).- Use
this proqram to add or delete ~nv number of
macro-deiinitions to or from the~macro
library.

Job Contro I Statements (DPS)

Program Control Statements
'THe program control statenents re:]:uir-e:i t:>
catalog a macro definition in source format
are:

r-----------------------------------------1

I / / CATA.L

The job control statements required for a
MMAINT run are:

I

t-----------------------------------------~

I //

I

END
L _________________________________________
J

r-----------------------------------------,
Required.
I

1// JOB MMA.INT

~---------------=-=-----------------------i
III DArE ...
Required if first
;

I
job after IPL.
I
~-----------------------------------------~
1// ASSGN SYSLOG, ••• Optional.
1
~-----------------------------------------~
1// ASSGN SYSLST, ••• Optional.
1
~-----------------------------------------~
1// A.SS3N SYSIPT, ••• Required.
I
~-------~---------------------------------~

1// VOL SYSIPT,SYSIF Required

only if
I
I
SYSIPT
1
I//DLA.B •••
Required refers
I
to a
I
I
1// XTENT •••
Required disk drive. I
~-----------------------------------------~
~//
EXEC
Required.
L _________________________________________
JI

Job Control Statements (TPS)
The job control statements requirej
MMA.INT run are:

f~r

an

r-----------------------------------------,
j / / JOB MMA.INT
Required.
I
~-----------------------------------------~
DATE •••
Required if first
1
1
job after IPL.
1
~--~--------------------------------------f
1// ASSGN SYSLOG, ••• Optional.
I
~-----------------------------------------~
1// A.SS3N SYSLST, ••• optional.
I
~-----------------------------------------~
1// ASSGN SYSIPT, ••. Required.
I
~-----------------------------------------~
1// A.SS3N SYSOOO
Work tape.
1
~-----------------------------------------~
1//
EXEC
Required.
L_________________________________________
JI

1//

.108

You may use any number of macro Jefinitions in a MMAINT run, but each macro definition must be preceded by a // 2A.T~L statement and the last definition must be followed by the // END statement.
For other (optional) progran cJntrJl
statements see the SRL publicatiJns IBM

§y§~~~~~~Q_~Qi~!_~QL_Qi~~_~~Q3~~~~i~~=~~~=

~~~L_~2~~E2!_~~9_~§~~i£~_E~Qg~~~~, FJrn
3224-9006, or I~~_~y~~~~~l~~_~Q~~!_~~L_r~Q~
~rQgr~~~!Qg_§i~~~~L_£QQ~~Q!_~Qg_§~~~!£~
~E2gE~~'

Form 3C24-9000.

Output Listings

If listing is specified, a list is prin~ed
during the assembly run.
rhe form of the
lists and the t~pe of infor~ation c8ntained
therein are shown in ~ppendix G.

STATEMENT INCOMPLErELY ASSEMELED (SIA)
If the statement is a machine i~stru~tion,
the stor~ge area required for the instr~c­
tion is reserved and filled with zeros.

~Q~£~_~IQ~E~~_~gg_Q~~~_~h~~~!gg
(~ssembler)
-----------

srArE~ENr

Diagnostic messages are printed if incorrectly coded instructions are detected by
the Assembler program during an asse~bly
run.
Both the number of the related
source-program statement and the acti8n
taken by the ~ssembler program are printed
together with each message.
If more than
one error is detected within a sourceprogram statement, the diagnostic messages
for all errors detected are listed. rhe
~ssembler program then takes the action for
the severest error detected, and the appropriate action is printed with the diagnostic messages.
Notification of the types of ~ssembler
actions that may occur during an assembly
run are listed below in the order of their
severity with the severest t~pe first:
~SSEMBLY

IN ERROR

(~IE)

The userfs program cannot be executed.
The
assembly run is completed, but only diagnostic messages preceding the AlE message
may be considered valid.
ST~TEMENT

TRE~TFD

AS COMMENT (STC)

ASSEMBLED

(S~)

rhe individual di~gnostic
listed in Appendix H.

mess~ges

~re

A diagnostic message is added to an incorrect statement.
Only one error can be
detected within a statement.
If an error bas been detected within a
macro definition, sequence synbols are not
processed and the m~cro definition is not
catalogued. If an error bas been detected
within a prototype statement, the macro
definition is not checked for further
errors.
The TPS macro maintenance progr~m performs
a check to determine whetner the c~ntents
of columns 73 through 80 of a statement are
out of sequence.
In case 8f a sequence
error, the statement is flagged with the
letter S. If no other errors are contained
in the macro definition, it is ~~talogued.
The individual ji~gnostic
listed in Appendix I.

mess~ges

~re

Output Listing3

109

Language Compatibility

rhe IBM System/360 ~odel 20 DPs/rps
~ssembler and macro Languages are closely
patterned after the Basic Proarammina Suoport (BPS) and Disk anj Tape operati~g Systems (DOS/TOS) ~ssembler and macro languages except where differences in machine
design require specific instructions for
Model 20. These differences are as
follows:
•

instruction may be avoijed by using
102S.

•

rhe number anj length of Mojel 20 registers differ from higher System/360
rnodel::; •

a.

rhere are seven ~ojel 20 machine
instructions that are not contained in
the instructions sets of higher System/
360 mojel s:
CIO, KIO, rIJB, SPSW, Ol\C 07\CD unoL'.
.l..Jrl,U,

.l..Jr'1 ...... L\.'

J.~1.

Model 20 has only eight registers
(8-15).
In addition, it has eight
pseujo base registers (J-7) Nith
fixed contents.
rhe pseudo base
registers contain 0, 4096, 8192,
12288, 16384, 20480, 2lJ.576, anj
28672, respectively, thus permitting direct addressing.

If programs that were written for the
Model 20 are to be executed on higher
System/360 models, the use of these
instructions can be avoided as follows:
a.

210,

b.

B~S and B~SR instructions nust be
replaced by B~L and B~LR, respectively, with consideration given to
the functional differences between
Model 20 and higher System/360
models.

~

XIO, TIOB, anj SPSW instructions may be avoided by using Ioes
macro instructions for input/output
operations.

HPR instructions must be replace5
by branch instructions.

•

The Mojel 20 Program status Worj (PSW)
has a length of only four bytes.

•

The Mojel 20 Channel Command worj has a
length of only 6 bytes and must be
aligned at a half-word boundary.
The
Model 20 Assembler instruction is DCCw
insteaj of CCW.
The use of the DCCW

110

b.

~odel 20 registers have a length of
::>nly 2 bytes.

~Q~g:

y-type address constants two bytes
in length must not be specifiej for Systen/
360 models having a storage capacity of
more than 65535 bytes.
No y-type constants
must be usej in prograns to be executej
under control of the Operating System/360.
Programs written in the Model 20 Basic
Assembler language can be assembled by the
Model 20 DPs/rps ~ssembler program unless
blank operanjs are usej in Assembler or
machine instructions.
rhe instructions L2L~, L2LB, 3BL~, 3BLB,
and 3BLC which are jiscussej in the Jisk
and Tape Operating Systens, Assenbler Specifications are ignored. The use of L2L2
is illegal be~ause local SEre sy~bols are
not alloNed.
The relationships between the injivijual
Assembler languages are as shOwn in ~ppen­
dix F.

Glossary

Absolute Address:

l~--~n-address-that

2.

is permanently assigned
by the machine designer to a storage
location.
A pattern of characters that identifies
a unilue storage location without
further modification.

Any of the prefix
and -) or the infix operators
(+, -,*, /, anj **).
divide
+ = plus
/
raise to a pOwer
minus
**
* = mult:.iply

~;:.ithmetic~2~rator~:

operators

(+

~~£~~Q!~g_Q!Q~f:

Access Method: Any of the data management
techniques available·to the user for
transferring data between main sTorage and
an input/output device.
~ccess

Time:

~--The-fime

2.

interval between the instant
at which data is called for from a
storage device and the instant delivery
is completed# i.e.~ the read time.
The time interval between the instant
at which data is requested to be stored
and the instant at which storage is
completed, i.e., the write time.

A sequence of records
such that the control fields of each successiVe recori collate equal to or higher
than those of the preceding record.

ASCI!:

See USASCII.

To prepare a machine-Ian~uage
program from a symbolic-language program by
substituting absolute operat iOrl codes f:,r
symbolic operation codes anj absolute or
relocatable addresses for symbolic
addresses.
~~~ble:

~§§~m~!~~~9=§~~£~1~:

~ddress:

1.--An-identification (name, label, or
number). for a register~ location in
main storage, or any other data source.
2. ~ny part of an instruction that specifies the location of an operand for the
instruction.
3.
(v.t.) In BSC~ IOCS a technique by
which the CPU prepares a remote station
to receive a message.
~~9;:'~~2._£Qns!:.~!!~:

A value. ,or an expresS10n representing a value, interpreted as a
main storage address.

A job setup which
provides. for an assembly of a source program followed immediately by the execution
of the assembled program.
Assemble-and-Go:
Assembler:

See

Assenble-3.nd-~xecute.

A program that assenbles.

~~~~mQ!~;:'_~~!!~~~~~:

~ symbolic language
(used to write source programs) which
enables the programner to use. all nachine
functions as if he were cod'ing in machine
language.

~~~fi2ut~:

To assign storage locations or
areaS-of storage for a specific job.
~llocate:

Variable: A variable with which
storage has been-associated.
~llocated

~lEb~~~~i£_~E~!~£~~!:
ters #. $, @, and the

Any of the characcharacters of the
alphabet (A through Z).

When two drives are given
file, the first drive
is the primary drive anj the second drive
is the alternate drive. rape reels or disk
packs are mount~d such that the first is on
the primary drive, the second on the
alternate drive, the third on the primary
drive, etc.
Al~ernate

Drive:

for-one-multi~volume

Arithmetic Data: Numeric values used in
arithmetic-operations (add, subtract. multiply, and divide).

A characteristic; for example,
attributes of data include record length,
record format, data file nane, associated
device type and volume ijentification, use,
creation date, etc.
~~£~~2_~n9_B~~!:.Q!~_~fQ9~~]_1~~£~~~~:

service program that can be used to
1.
2.
3.
4.

A DPS

create a backup tape from one or more
disk files ani one or more card files,
create a backup disk from one or more
disk files, and
restore each backup file to its original medium.
Chan~e the volume and file serial
numbers.

Base:

l~--A

2.

reference. value.
A number that is multiplied by itself
as many times as indicatej by an
exponent.

Glossary

111

3.

the number system in terms of which a
value is represented. Examples: tne
decimal base (ten), the binary base
(twoi, the hexa~ecimal base (sixteen).

~~~~_~~g£~~~:

Character:

l~--One-of

A given address fron which

an effective address is derived by combination with a relative address.
(See
Dis(?lacement).

2.

a set of elenentary signals
which may incluje jecimal jigit3 0
through 9, the letters A through Z~
punctuation marks and any ~ther symbols
acceptable to a computer for readin~,
writing~ or storing.
An 8-bit (l-byte) code that can be
manipulatej in main stora;e=

Bi~EY:

1.
2.

~ characteristic or property involving
a selection, choice, or condition in
which there are two possibilities.
The numeration system with a r~dix of
two.

Character s~t: ~n ordered set ~f unique
representatIon called characters.
~~~I~!:

See

Core-Ima~e

Maintenance

Program.
~!na£y_~~~ed_~~£!~~l:

~ jecimal notation
in which the individual jecimal di~its are
each represented by a group of binary
digits, e.g., in the 8-4-2-1 binary coded
decimal notation, the number twenty-three
is represented as 0010 0011 whereas" in
binary notation, twenty-three is represented a's 10111.

BinarY_Digit: The smallest unit of information. It can have either of the two
binary values zero or one.
A search in ~hich a set of
items is divided into two parts, where one
part is rejected, and the process is
repeated on the accepted part until the
item with the desired property is found.

Code:
i:---ev.t.) To represent jata ~rnachine
instructions in a symbolic form that
can be accepted by an appr~?riate processor program.
2. Machine instructions produced on the
bases of cojej instructions (see object
program).
£Qll~tig~_seg~~g£~:

The relative ~rder of
characters on which a sort or merge is
based.

~i~~£Y_§~~f£~:

Bit:

See Binary Digit.

Buffer: ~n area in main storage used as
Intermediate storage in I/O operations.
Durinq input. data is read into a buffp.r,
during output, data is written fron a
buffer.
rhe smallest addressable unit of
inf6rmatibn in System/360. Every byte consists of eight bits, each having a value of
zero or one.
gy~~:

£~!~-R~~!~~g!_§~§!~~:

Consists of the card
control programs: Initial Program Loader~
(Basic) Monitor, and Job Control. Used for
the execution of object programs contained
in punched cards.
Cv.t_1 The ~ction of including
an object program or program phase in the
core-image library as a temporary or a permanent entry.
~alog:

gh~!~!gg:

~ record retrieval technique.
The control irifozmation contained in
records of one (the chaining) file is used
to access a record in another (the chained)
file. The chained file must be organized
indexed-sequentially.

112

A string of characters used for
documentation.

~2~~~n~:

£Qmm~g!£~~iQg_Eg~!Q~:

~n area of the
(Basic) Monitor. Contains date, st~rage­
capacity specification, UPSI byte, user
areas 1 and 2r program-nane area, anj
various control bits used by the system.
Provides for intra-program and inter ..
program communication.

COmE!l~~~gQ~§~~~~t~:

A j~b setup which
provides for a compilation ~f a source pr~­
gram followed immediately by the execution
of the compiled program.

A program which translates a
program Nritten in a problen-orientej eRP;,
PL/I~ etc.)
language into object coje.
ComRil~:

~Q~e!lg£_~Q~~£Ql_~~~!g~~g~:

Anyone of the
control statements in the input strean that
defines the requirenents and options of a
job to the compiler.

Concatenation: The operation that connects
two-character strings in the orjer injicated to form one string whose length is
equal to the sum of the len~ths of the two
strings.
~QQ~~Ql_~£Q~£~~~:

~ set of pro~rams which
provide the management functions necessary
for continuous operation of a c~nputing
system.

CO~iEQ1_§~£iiQu:
The smallest unit of a
program that can be separately assembled or
compiled. All elements of a control sectiqn are in constant relationship to each
other.

Data File:
treated-as
of several
scribed by
system has

control Statement: Any of the statements
in the inpur-to a specific job that define
the re~uirements of the job or its options.

Q~~~~Q!mat

A collection of related records
a unit consisting of data in one
prescribed arrangenents and decontrol information to which the
access.

Item: Specifications in the
program that ~escribe ~ata items in the
stream. Such data items may be characters
or arithmetic values in character form.

Conversion: The process of changing from
one-form-;f representation to another.
£Q~Y~l~~~!~~~EQgEe~_l£Q~~!~~:
A DPS
service program"used to copy the system
file stored on the syst~m disk pack onto
another disk pack.
CO~l~~~~~2~ PrQgE~~:

Data Transmission: The sending of ~ata
from an external storage device to nain
storage and vice~versa.

~ TPS service
program contained in punched cards. Copies
user·s tape-resident system from one tape
onto another.

Decimal:
The number system based on the
value-io.

£Q!~=!~~9.~_Q!E~£~2El:. ~ A table on the system disk pack used as directory to the program (core-image) library. Each directory
entry contains ~nformation about a program
phase and its location in the library.

Q~ci~~1-Digit:
~ne of the characters a
through 9 in a ~ecimal nunber.
For
example, in the number 567, each of the
numeric characters 5, 6, and 7 is a decimal
digit.

~QE~=!~eg~_fQE~e:!::

Q~£!~~±_EQ!~~:

The radix pOint in decimal

A data ,format identical
to that used in main storage. Programs or
program phases stored in the core-image
library constitute data in core-image format. Such programs or program phases are
ready for direct loading from the coreimage library into main storage.

Delimiter:
Any valid special character or
combination of special characters used to
separate items of data, such as identifiers, constants l and statements.

~QE~=!~~g~_~i£E~EY:

Q~sc~~g!gg-2!Q~E:

An external-storage
area containing the Job Control program,
other IBM-supplied programs (except the
[~asic] Monitor and the IPL). and user 1 s
problem programs. Permits retrieval of
programs or program phase by the Monitor.
Cu~-I~~g~_~~!~i~~e~£~_E!QgEe~:
A system
service program. Updates the core-image
library and directory.
Is used to add and/
or replace and/or delete phases and the
(Basic) Monitor.

representation.

A sequence of records
such that the control fields of each successive record collate e~ual to or lower
than those of the preceding record.

Device Address:

See Physical Device

AddresS-an~S~mbolic Device Address.

Core-Ima~rogra~:

Device Independence: The ability to
request input/output operations without
regard to the characteristics of the inputl
output devices.

CPS!§:

See Copy system Tape Program.

Direct Access:
Retrieval or storage of
data-by-a-reference to its location on a
volume rather than relative to the previously retrieved or stored data.

£§.§g~:

See Core-Image Service Program.

A system service program that permits the printing l writing
and/or punching of one or more entries of
the core-image library.

Data:

~A representation of facts,

2.

concepts, or
instructions in a formalized manner
suitable for communication, interpretation l or processing by humans or by
automatic means.
Any representations such as characters
to which meaning is, or might bel
assigned.

Direct Address:
An address that specifies
the-location-of an operand ~ithout need of
modification such as adding a base ad~ress
value.
Dire£~QEl:

See Core-Image Directory or
Macro Directory

Q!rec~QE~En~El:
A unit of information in
the core-image or macro directory.
(Phase
header or macro identifier.)

Glossary

113

QiE~£!2Ey_§gEYi£~_~EQgf~~;
A system service program. Causes printing of the c~re­
i~age and/or macro directory and/or system
directory.
Di~~=!!~ide!!1_~st~!!!:

contains the Monitor, the disk-resident portion of the IPL,
and the Job Control proqram. Mav contain
anyone or a combination of the following:
IBM-supplied or user-written programs,
macro definitions~ and a relocatable area.

~~Q:

ESID:

See External Symbol DictiJnary.
See External Symbol Identification.

~~cep~12!!~!_£2!!91:!::1Q!!:

An oce~rrence which
can cause a program interrupt Jr an unexpected situation such as an overflow error:
or an occurrence of an expected situation
such as an enj-of~file conditi~n that
Occurs at an unpredictable time.

Di2Elace!!!~:!::

A. value., or an expression
representing a value, ~hichis added to a
base address to obtain the effective
address ..
Q~§_£2!!!!2!_Ef29!~ru~:

A collective term
used to refer to the Initial Program Loader. the Monitor, and the Job Control
progra~.

DS~g~:

See Directory Service Program.

Q~[!!Q:

1.

2~

3.

(v.t.) To copy the contents of all or
part of main storage or an external
storage onto an output device, so that
it can be examined.
Cn.) The data resulting from 1.
(n.) A routine that will accomplish 1.

EBCDIC:
(Extended Binary Coded Decimal
Interchange Code) A specific set of eightbit codes standard throughout System/360.

~~~£~~~Q!e ObjecL~ro9:!:am:

The set of
machine instructions produced by a language
trans later and prepared for loading into
main storage either by link-editing or by a
a CMAINT run if an installation uses a
disK-resi3ent system; the set of machine
instructions produced by a language translator without further preparation if an
installation uses a card-resident systen.
Execute:
(v.t.) To carry out an instructIon-or perform a routine.
Execute-Loader Function: rhe function of
eieCUfIng-an-ob)ect-program that is not
cataloged in the core-image library. The
object program may be read from either a
card-reading jevice or a tape drive or from
the relocatable area.
~~~£~~~_§:!::~:!::~~~Q:!:::

Edit: To modify the form or format of
data. e.g., to insert characters such as
page numbers or decimal pOints or to delete
characters such as leading zeros.
Edit Pattern: A field composed of characters-of-a-special significance. rhese
characters control such editing functions
as' zero suppression, insertion of a floating dollar sign, etc.

A Job ContrJI statenent
that designates a job by identifying the
load module to be fetched and executed.

Explicit addressing~ ~n addressing technique which requires the specification of all
elements of on address Cbase and di3placement) by means of absolute values.
~~l2.Q!!'~!!!::

In a floating-point constant a
decimal integer that specifies the po~er to
~hich the base of the floating-?oint constant is to be raised.

Effective Address: The absolute address
that-Is-derIved-by applying any specified
indexing (base address value) or indirect
addressing rules to the specified address.
The derived effective address is actually
used ~o identify the current operand.

~~QE~~siQg:
An operand entry that consists
of a single term or an arithmetic combination of terms, normally representing an
address value.

~!!!fY_~~!!!~:

~~i~!g~!_§iQ!§g~:

The symbolic address of an

entry point .•
~!!!:fY_E21!!:!:::
In a routine" any place to
which control can be passed.

A storage device Qut3ije
the computer capable of storing information
in a form acceptable to the con?uter; for
example~ cards or ma~netic tapes.
~~:!::~f!!~!_~i!!!~2!:

EOF Card: End-of-file card which signals
the-end-of a logi'cal set of input cards
(/*b in columns 1-3, where b = blank).
EOF Record: End-of-file record which signaI"s-the-end of a logical set of input
records (/*b in columns 1-3, where b =
blank) •
114

A control secti~n name J
entry point name, or external reference; a
symbol contained in the external synbol
dictionary.
~~~~!~~!_§i~~Q!_Q!£t1Q!!.~EY_l~~Q2:

Control
information associated with an object or
load module which identifies the external
symbols in th~ mojule.

~~~~Eg~~_~ymbQ!_~~~g~!f!£~!iQ~_!~~~Q~:

ESID numbers are assembler-assigned pointers that are used by the Linkage Editor
program to correctly recompute the address
constants referred to in RLD entries.
Feature: A function of a program, or a
partIcular circuitry in a system device,
that can be used to perform specific
operations.
Fetch:
r:---(v.t.)
To read into main storage and
pass control to phases or subphases.
2.
(n.)
The name of a control routine of
the (Basic) Monitor that accomplishes
1.
Field: In a record or in a data stream, a
specIfied area used for a particular category of data~ for example, a number of
character positions used to represent a
wage rate or a number of bytes in main
storage used to express the address of data
in main storage.

1gen~!fier:

~ symbol ~hose pur?ose is to
identify, indicata, or nane a body of d~t~.

~~£~~£!~_~~1Eg~~igl:

An ~ddressing technique that allONS the specification of synbol
addresses.
IDde~_R~l!~!::.~E:

~ register whose content
is added to the operand address prior to or
during the execution of an instruction.

Indirect Address:
~n ~ddress that specifies-a-storage-Iocation which cont~ins
either a direct address or another indirect
address.
I~f~~_Qp~f~!::.Q!:
An operator th~t
an operation bet~een t~o operands.

defines

Initi~lize: . ro set counters, switches, and
addresses-to zero, blank, or other starting
values at the beginning of, or ~t prescribed points in, a computer routine.

Ig!!!~!_~EQ1E~~_~Q~deE:

~i!~:

See Data File.

Fixed-Point:
pertaining to a number system
In-whIch-the location of the (decimal)
point is fixed with respect to one end of
the numerals according to some convention.
~!~9:
Any of various types of indicators
used for identification, normally a bit.
FIQ9.:!:ig:!_~oi~!:
Pertaining to a numeration
system in which the position of the point
does not remain fixed with respect to one
end of the numerals.
~Qf~~:!::

The general makeup of data, a centrol statement, or ~ re~ord.

~ system control
Loads (Basic) Monitor into main
stor~ge.
Is used to assign physical I/J
device addresses to synbolic addresses SYSRDR and/or SYSRES.
Places name of Job Control program into communication region of
(Basic) Monitor.
The program must be
executed at the beginning of a systen run.

program.

I~it~9.1-yalu~:

A value placed into a
register or a storage area at the beginning
of an operation and used during the oper~­
tion for count purposes or control ?urposes
or both.
Inner Ma~ro Instruction:
A macro instr~ction-contained-in-a-macro definition.
Ig£~!:

~E~pbi£:

The visual representation of a
character or symbol.

!!~!f-By!::.~:

The leftmost or rightmost four
bits of an eight-bit byte.
Can contain
representation of ~ digit or the sign of a
number ..
Halfword:

Two adjacent bytes where the

left~yte is on a half~ord boundary.
Ha!!~Qrd_~QE~99.EY:

Any even-numbered
addressable byte position in main storage.

rhe transfer of data from an
external storage device to nain stor~ge.

Ig£~!_Jo£_~!Eg~~:
~ sequence of JobControl statements entering the system,
which mar also in~lude input data.
Input~Ju!::.put_~on!:Eol

~~§.te~:
~ group of
macro definitions which are contained in
the macro library of the progr~nning system.
rhese m~~ro definitions c~n be retrieved from the library and tailored to
the input/output re~uirenents of the user.

Ig1~iEY_~EQ1E~~:

Hexadecimal:
A number system using the
equivalent-of the decimal number 16 as a
base. The values 0-15 ~re represented by
the digits 0-9 and the aphabetic characters
A-F.
~i:!Q=QE~~E_Q~:!!!::':

decimal number.

Leftmost digit of a

A program whose execution
inquiry request on the
printer-keybo~rd attached to the Model 20
system. When such a request is made, routines of the ~onitor cause the current ~on­
tents of main storage to be rolled out, the
inquiry program to be loaded and executed
and, on execution of that progran, the origin~l contents to be rolled in ~gain.
is

initi~ted

by

~n

:;lossary

115

!~2~~11~~iQ~:

~ particular computing system in the context of the overall functicn
it serves and the individuals who nanage
it, operate it, apply it to problens, service it, and use the results it pro5uces.

~gy:

One or more characters within an item
of data used to identify that data or to
control its use.
~§y~~~~~

A mnemonic in a keyword macro
instruction.

!~~gggr_Qigi~:

A digit to the left of the

decimal point.
In.!:g!:=Pr23.!:am_Co!£!!)uni£~!:i2!!:

rhe exchange
of data between two or more programs.

Interrnot. :
(IT: t • )
'Io stop a process '
such~~~~~y that it can be resumed.

n

!~!:r~=~rQIr~~_~2~~~!!i£~!:i2!!:

rhe exchange
of data between two or more phases of a
multi-phase program.
Facilitated by the
c~mnunication region.

Keyworj ~acro Instruction:
A nacr~
instructIofi-whose-operands must each consist of a mnenonic (keyword), an e~ual
sign, and a specification.
The ope~an5s
need not be in a pre5etermined order.
b~~g~~g§_~E~~§1~!2E;

A program or a routine that accepts statements in one language and produces equivalent statenents in
another language such as an assembler or a
compiler.
LDSYS:

See Load Systen Progran.

bi~ra!:~:

I/O:

Input or output or both.

I/O Area:
~n area (portion) of main
storage-into which data is read or fron
which data is written.

A collection of objects (e.g.,
files, volumes, carj decks) associated with
a particular use, and the location of Nhich
is identified in a direct8ry 8f sone type.
1!~!:~f~_~1!2~9~i2~_QE99~!~~~i~~_E~~g~~~:

A system feature that permits
an input/output operation to be performed
simultaneously with other I/O operations or
with processing or both.

system service program.
Used tJ rejefine
the limits of one or a combination of the
following:
core-image library, core-image
directory, macro library, nacrJ directory,
and relocatable area.

!~Q_~i~~:

1iQf~E~_~~~~g~~§g£_~EQgr~~:

!~Q_Q~grl~E:

the time interval between the
instant at which data is called for fron an
external storage device and the instant
delivery is completed (read time); the time
interval between the instant at which data
is requested to be stored in an external
storage device and the instant at which
storage is completed (write time).
!Q~~:

IPL:

See Input/Output Control System.

A

systen service
programs such as Core-ImaJe Maintenance,
Macro Maintenance, DirectJry Se~vice, and
Library Allocation Jrganization programs.

~iQ~~~Y~~QE~_~r~~:
~n ar9a on the system
disk pack usej by tne :M~INr program for
updating the Monitor or the IPL.
In
assemble-and-go or compile-and-go runs, the
C~AI~T program uses this area fJr the storing of tape label information.

See Initial Program Loader.

~2Q:

An externally specified unit of work
for the computing system from the standpoint of installation accounting and
operating system control.

Linkaae:
Machine instructions that connect
separ;tely assemblej control sections.
b!~~9g~_§~!~2E:

A systen service r~Jgran.
Relocates programs or phases and links
separately assembled programs or phases.

~Q~_~Q~~rQl_~r2gE~~:

A system control program. Resides in main storage between jobs
and provides for automatic job-to-job transition.
Processps Job control statements
in the input stream.
Job Control Statement:
Anyone of the controI-statements-1In-the input stream) that
identify a job or define its requirements
and options.

1i!!~~§9ii!~g:

rhe function of combininJ a
program control section with one Jr nore
ather, separately assemb12d program contLol
sections into one eKecutable object
program.
12~Q:

1.

2.
~-~y!:g§.:

1024 bytes.
bytes.
116

To read a program or a prJg~an rhase
into main storaje.
To initially Nrite a data file Jnto
:1i sk.

~~~~_~y§.t~~_Qi~~_~rQ~r~~:

For example:

nK

n x 1024

~ systen service
program that creates a ta~e- or diskresident system from card input.

~2~!2~1_Q~!~_~122~:

An entry in the LQgic~

al Unit Table.
~Q9i2~b_Q~i~_~~~1§:

Part of the (Basic)
Monitor. It has logical unit blocks, each
of which refers to one specific synbQlic
1/0 address and contains the address Qf a
physical unit block.
These symbolic
addresses are related to physical 1/0
device addresses by means of ASSGN control
statements.
L02E: A sequence of instructions that is
executed repeatedly a specified nunber Qf
time~-or until a condition is brought abcut
that ends this repeated execution.
!:Q~:.Q!:i§f_Q!Si!~:

~~£fQ_~~!~~~~~~~~_~fQ~f~~:
A system service program. Updates the macro library
and directory.
Is used tJ add andlJr
delete macro definitions.

~~£fQ_~~~~:
An entry in the nacrJ directQry that identifies and points tJ the
corresponding macro definition in the macro
library.

The rightmost digit Qf a
~~£f~_~~fYi£~_~fQlf~~:

decimal number.
LU~_Ta~l§:

tains the macro jefinitions for the macro
instructions in user programs. contains
source statements needed to generate frequently used routines.

See Logical Unit rable.

Machine Instruction:

A systen service
program that permits the printing, punching, andlor writing of Jne Jr mJre macrJ
definitiQns from the macrJ library.

An Assembler-language

statement~-or-Its-functional equivalent in

machine language, that instructs the computing system to perform one specific
operation, such as add, subtract, com~are,
etc.

~~i~_~!2!:~9~:
All addressable internal
storage of the CPU (central prJcessing
unit).
It holds the program(s) under whose
control internal manipulatiQn Jf data is
performed.

Macro Definition: A set of statements in
the-macro-library used by the,DPS/rPS
Assembler program to expand a ffiacro
instruction specified in the source program
into a series of machine instructions.

~~~!~~:

~~2fQ_Qif§£!QfY:

Model Statement:
Anyone of the statements
in-a-macro-defInition that may be selected
andlor altered (usually accQrding tJ the
operands specified in the macro instruction) and become part of the cJde generated
into the source program.

An area of the macro
litrary section of a tape-resident systerr,
a table on the system disk pack of a diskresident system.
Is used with programs
written in the Assembler language.
The TPS version has four priority sectiQns,
each of which contains the identifiers for
the macro definitions contained in the
corresponding section of the macrQ library.
The DPS version lists the names, begin
addresses, and lengths of macro definitions
contained in the macro library. Is used
with prQgrams written in the Assembler
language.
The Macro directory can be listed on a
printer by means of the Directory Service
program.
Macro Instruction: A statement used in a
source-program-and replaced by a specific
sequence of machine instructions in the
associated object program.
~~£E2_!:i~f~fY_iQ~~~:

A disk area cQntaining the macro definitions fQr the nacrQ
instructions issued in user-written prograns. CJntains source statements needed
tQ generate fre1uently used routines.

See Macro Maintenance Program.

Mnemonic:
A contraction Jr abbreviatiQn
whose-characters are suggestive Jf the full
expression.

MQnitor:
The main control program in DPS.
ResIdent in main storage throughout a system run.
Loads programs into main stJrage
and causes their execution.
Monitor 1/0 Area:
An area Qf main stJrage
wIthIn-the-MonItor used as a buffer by
various ~onitor routines when they read
data into main storage Qr transfer data tJ
an output device.
MSERV:

See Macro Service Program.

Name:
A set of one or nore characters that
Identifies a statement, file, mJdule, etc.,
and that is usually associated with the
location of that which it identifies.
~~~~i~g:

The occurrence Jf a macrJ
instruction in a macro definition.

QQi§£!_~fQ~f~~:

~~2fQ_!:i~~~fY_i~~~~:

An area of the macro
library section of the system tape.
Has
four priority sections, each of which CQn-

The output of a single
execution of an assembler Qr cJTI9iler.

Glossary

117

QQ~!:§!!!~:

1.

2.

~

value or a unit of data that is
operated on.
The information needed to define and/or
locate 1.

E~~!~Y_~h~~~:
A ~heck that tests whether
the number of ones (or zeros) in an array
of binary digits is 033 or even.

~~~~~:

Operation:
I:--A-program step un3ertaken by a co~puter
in execution of a machine instruction
such as add, multiply, compare, etc.
2.
The execution of a series of instructions for the purpose of having one
specific function performed, e.g., the
transfer of data between main storage
an1 an IIO 1evice.
QQ~E§!~!£g_~££~:

~

~ program or a portion ~f a pr:>~ran
executed as one main-storage 10a3 if it is
n:>t devided up into subphases.
Loading a

phase, which is stored in the cJre=inage
library# is initiated by a set of Job Control statements, a FEr2H or a LOAD in a
preceding phase.
May be output :>f ~ssenbl­
er, RPG, PL/I, or Linka3e Editor program.
Physical Devi=e Ajjress;
A cole used by
the-CPu-to-select-an-iIJ 3evice.

mnemonic that represents
~hy~!~~~_~gi_~£~i~~~_Q~i~_r~Ql~~_~~~Yi~~

an operation.

~!:2g!§!~:

QQ~!:§!~iQg~!_~!E!:~~~i2!!:

~n expression con-

taining operators.
QE~!:~~2!::

1.
2.

~ person who operates a machine.
A symbol specifyin~ an operation to be
performed (see Arithmetic Operator and
Comparison Operator).

A system service pr:>gran.
rhis
program (PSERV) is use3 to 3isplay and/or
change the permanent 3evi~e assignnents
and/or to change the configuration byte of
the (Basic) Monitor on the systen disk
pack.
~hY~!£~l~IQ~~:

Qe~!Qg:

~ specification in a program or a
control statement that may be used by the
proqrammer to influence the execution of
the program or any of its statements.

A set :>f routines cJntained
in the Monitor program. rhese r:>utines
control the transfer of data from the 2PU
to attached tape and/or disk drives ~nd to
the printer-keyboard, if present.
rhe routines also control all data tr~:1sfcr- fr:Hl
the aforementione3 I/O 3evices to the CPU.

Q~~e~~:

rhe transfer of 3ata from nain
storage to an external storage device.

~~Y~!~~l_Qgi~_~lQ~~:

Overfl:>w:
l:--That portion of the result which
exceeds the capacity of the particular
unit :>f storage
2.
Page end on a printer.

Ehy~i£§!l_Qgi~_r§!~~~:
~ table c~ntained in
the (Basic) Monitor.
It has a :1unbe~ :>f
physical unit blo~ks, each of Nhich con~ains an actual device address.
PJinte~s
t:> these blocks are inserted into the logical unit table by means of ASS3N control
statements.

OV~E!§!E:
(v.t.)
ro do something at the
same time something else is being done; f:>r
example, to perform an I/O operation while
instructions of a program are being
executed by the cpu.

QY~E!§!Y:
To place a phase or subphase into
main storage locations occupied by an:>ther
phase or subphase that has already been
processed.

Pack:
(v.t.)
A storage technique where by
two-digits or one digit and sign are st:>red
per byte~
Packed Decimal:
~ data format in which twa
digits-or-one-digit and sign are st:>red per
byte.
Parameter:
A variable that is given a constant-value for a specific purpose :>r
process.
~§!Ei~Y_~!~:

A binary digit appended to an
array of bits to make the sum of all the
bits always 03d or always even.
118

An entry in the Phys-

ical Unit Table.

~2int_~li9n~~~~:

Alignnent of arithnetic
data in a variable depending :>n the location of the assumed or actual decimal
point.

p:>sition Macro Instruction:
~ nacr:>
InstructIon-whose-operands consist of only
the values specified by the prJgranner.
They must be specified in a pre3etermine3
order.
~r~f~~_Q~ra~~~:
An o~erator that precedes, and is associate3 with, a single
operand.
The prefix operat:>rs are + and EEi2!:!tY_~~Y~~:
Classifies macr:> definitions by frequency usage in TPS.
F~lIr
levels are used in the ma~ro library section of the tape resident system.

Priority section:
~n area of the rps macro
directory-or-library.
Eac~ ~rior~ty.sec­

tion is
level.

~ssignej

to a spec1flc

?rl~~lty

Problem Data: ~rithmetic or logical
(character>data that is processed under
control of the problem program in main
storage.
Problem Progr~!:
Any program t~at is not
part of the programming system or of the
card programming support.
~~2£g~~iu~_prosra~:
Any program that is
not a control program.

REQgra!: A series of machine instructions
that, when executed, cause the necessary
processing to achieve the desired
result (s).'

Relocatable A1dress:
~n address that can
be modified by adding a relocation factor,
i~e., abas~ address value.
Relocatable Area:
An area on the system
disk-packused-to temporarily h::>ldan
object program (or phase) thus ?ernitting a
program or program phase to be assembled
and executed in one job.
Relocation:
The m01ificatibn of address
constantS-required to compensate for a
change or origin of a phase or subphase.

Program Library:
A collective term used to
refer to core-image directory and library.

A program ~hich
generates report-writing prograns in accordance with specifications describing the
characteristics of the files involved, the
processing to be performed" and the desired
output.

ff29f~~_~i£f~fl-§~£tiog:
The section of
the system tape that contains the program
library.

Restart:
To re-establish the status of a
job usIng the information recorded at a
checkpoint.

~29.g~§ectiQg:

g~~:

See Control section.

PrototY2~ sta!~g!:

The first instruction
the macro header) in a macro
deftnition. It defines the format of the
macro instruction ahd contains varioussymbolic parameters for ~hich values are substituted when the macro routine is used by
a specific program.
(follo~ing

PSERV:

See Physical and Logical unit

T~bles Service Program.
~~:

See Physical Unit Block.

Read: Tu acquire data from an external
storage device.
S~~9!~~m~g~~L_~!e/~2mpute overlae Fea!~~~:
A feature of the IBM System/360
Model 20. Submodel 5, that permits data
transfer from or to magnetic~tape and disk
1/0 device to be overlapped with
processing.

g~~9_!i!~:

See 1/0 Time.

Receiving Fi~19: Any field to which a
value may be moved or assigned.
Relative ~ddress: The number that specifies the difference between the abs~lute
(effective) address and the base address
(see Displacement).
Relation~LQE~~~tof~:

The following ~pera­
tors used in the macro language of the DPSI
TPS Assembler: EQ (equal to) GE (greater
than or equal to) G'r (greater than) LE
(less than or equal to) LT (less than) NE
(not equal).

g~EQ!:!2f29!:~[!L~~!}~f~!'Qf :

See Report Program 3enerator.

RwCFeature: See Read/~onpute, write/
c~mpute Overlap Feature.
Second-Level Macro Definition: A macro
definition that is called by-an inner
(second-level or nesting) macro
instruction.
Sense ~te(s): One or.more bytes in main
storage. The individual bits of a sense
byte (or bytes) are used to indicate the
status of 1/0 devites.
Se!:Y!£~_E!:29!:~m:
Any of the system programs that assist in the use of a computing
system and in the successful eKecution ~f
problem programs, without contributing
directly to the control of the system or
production of results.

§i~gifi£!gE-Qi~i!:

A digit that contributes to the accuracy or precision of a
numeral. The number of significant digits
is counted beginning with the digit contributing the most value. called the mbst ~ig­
nificant digit, and ending with the one
c~ntributing the least value, called the
least significant digit.

SO~£~_Ef2~~~:
~ series of statements in
the symbolic language ~f an assembler or
c~mpiler, which constitutes the entire
input to a single eKecuti~n of the assenbIer or compiler.
S~urce Statement:
~ statement written in a
source-language-(e.g. Assenbler language).

Gl~ssary

119

§2!£/M~f~~:

~ descriptive term meaning
"sort or merge".
This term is frequently
used in connection with a generalized program from which types of sort or merge programs may be defined.

~e~£i~l_£h~f~££g!:
Any character that is
neither alphabetic nor numeric.

§!~!~!!!§:!!!:

?

meanin~ful.expression

or

generalized lnstractlon In a source
language.
St2£~~~_~llo£~ti2!!:
The assignment of
blocks of storage to blocks of data.

Stream:
l:--The flow of data from an external
storage medium to main storage; the
flow of data from main storage to an
external storage medium.
2.
See also Input Job stream.

System Disk Pack: rhe jisk pac~ which contains-the-userts disk-resident systen.
System Input Device:
An I/O device 30ecified-as-i-source-of an input job stre~m,
excluding Job Control statenents.
§Y§~~!!!_Q~~2~!_Q~yi£~:

An 1/0 device used
as output device for system prJgrans or
problem programs or both (symbolic device
address is SYSOPT).

§~~t~~=QRtE~t~~E!~£~E:

A printer used to
list the output of system progr~ms (symbolic device address is SYSLST) or to log control statements (symbolic device address is
SYSLOcr) or both (same printer is assigned
to both symbolic device addresses>.
~n I/O device uSed by the
programs to rea~ the Job
Control statenents.

§yst~~ R~~deE:
c!'7c~om
-1'.--'......

""1"'\1"\~ ......... 1

"-'....,.L ............. '-"' ......

§.yste!!!_g~~!9~g~_Q~Y!£~:

Subfield:

The subdivision of a field.

subphase:
A portion of a program executed
as one main-storage load.
Loading a subphase fro~ tHe core-image library, in which
i t is stored, is initiated by appropriate
instructions either within the phase of
which the subphase is a part or within the
preceding sUbphase.
~YIDQQ1!£ .... ~~£!~2.~:

An address represented
by one or more symbols convenient to the
programmer.

For DPS the disk
drive that contains the system disk pack if
a disk-resident system is used; the disk
drive on whose pack the Job Control program
writes label information if a card-resident
system is used.
For rps the tape drive
that contains the magnetic-tape volume with
the system programs.
§.yst~ID_~~rvi£S~E2~raID~:
A collective term
used to refer to the Library Managenent
programs# the PSERV pro3r~rn, the Linkage
Editor, and the Load System program.
2Y~~~~~~~:

symbol!.£_Q.~!£g_~ggE~~~:

A. symbol usea ~(l
IBM-supplied and user-~ritten programs to
refer to an 1/0 device (e.g., SYSRES. SYSIPT, SYSOOS). This address is related to
an actual address by means of the logical
unit table.

§.!:§!E±::

See System Input Device.

~~2~Q~:

See System Output Printer.

SY2!!ST:

See System Output Printer.

§'~§'QE!:

See System output Device.

SYSgOR:

See System Reader.

§.!§g~§:

See System Residence Device.

rhe reel of nagnetic tape on
which the user's tape-resident systen is
located.

!~P~_~!!Q!_g~£QY~Ey_gQ~£!~~:
A syste~ routine that controls the executiJn of errJr
recovery procedures in the case of magnetic
tape 1/0 errors.

!~Qg_~EEQE_~~~~!~£!£§_gQ~~~!!~:
A system
routine that analyzes magnetic-tape readl
write errors and noise records that may
occur during the execution of a program.
In addition, the routine records the nunber
of erase gap commands that are issued during the execution of the program.
!~Eg::R~ident §.¥.st~ID:

§.yst~_~2gtr21_Pr2gE~!!!:

A collective term
used to refer to the Monitor, the Job Control program, and the Initial Program
Loadel.. •
§y§!§!!!_~iE~£!2!Y:

A table on the system
disk pack listing the addresses and sizes
of the core-image library and directory,
the macro library and directory, and the
relocatable area.

120

(1-\.lso referred tJ as
tape-resident system.") :ontains
the Basic Monitor pro3ram, the Job Control
program, and may contain any IB~-supplied
andlor user-written prJ3rams and/or m~cro
definitions.
consists of three sections:
Monitor section, program library section,
and macro library section.
Is created and
updated by means of maintenance programs.
~user's

!§g:

See Tape Error Recovery RJutine.

TES:

See Tape Error Statistics Routine.

Third-Level Macro Definition: A macro
definition that is*called-by an inner macro
instruction of the thirj level.

initializing a disk
netic tape, etc.

!h!Q~he~i:

Volu~~:

A measure of system efficiency: the rate a~ which work can be handled
by a computing system.

Transient ~rea: An area in main storage
into which the Monitor loads transient routines for execution.
Truncation:
data~entity

The process of cutting short a
either on the right or on the

left.
(v.t.) To convert IlULUer~c data
stored in the packed format to unpacked
decimal format.

~ack

or a reel

~f

mag-

That portion of a single unit of
storage media that is accessible to a
single read/~rite mechanism.
F~r example,
a reel of magnetic tape for a 2~15 magnetic
tape drive, or one 1316 Disk Pack f~r a
2311 Disk storage Drive.
YQ~~1~g~!.

~ record which uni~uely
identifies a volu~e of magnetic tape or a
disk pack by its volume serial number and
other information.

!!!!~ck:

Q§~_gQE~~n~:

~ routine written and supplied by the user and incorporated into a
system program as a modification. Each
user-written routine is accessed through a
program exit.

User's T~E~=g~side~Y§~~:
Resident system.

See Tape-

Volume Table of Contents (VTO:): ~ table
stored on disk pack.
The table contains
the labels of all files contained on the
same disk pack.
Y!OC:

See Volume Table of Contents.

~rit~:

To record data on either disk or on
magnetic tape.

Utilit~fogr~~§:
Programs that perform
frequently recurring jobs subh as copying
files from one data carrier to another,

:nossary

121

Appendix Ail Machine-Instruction

Mnemonic Codes

The following list is an alphabetical listing of the mnemonic operation codes of all the
machine instructions that can be represented in the Model 20 OPS/TPS ~ssenbler Language.
The column headings in the list and the information each column provi~es are as f0110NS:
Mnemonic Code: This column gives tne mnemonic operation co:ie for the macnine
-----Instruction.
!~~t!~ct!Qnl
This column contains the name of the instruction associated with the
mnemonic.
QE~fati2~ Cod~l This column contains the hexadecimal equivalent of the actual macnine
operation code.
Basic Machine Format: rhis column gives the basic machine format of the instruction:
RR, RX II SI or SS.
QE~f~n2_E!eld_E2f~~1
This column shows the symbolic format of the operand field for the
particular mnemonic.

Mnemonic

opera- Basic
Machine
tion

Operan:i
Field

cog~

!!!§'~!:!!£~!2!!

~~g~

~Q;:!!!~:!:

EQ!:!!!~:!:

AH

Add Half~ord
A.dd Decimal
Add
Branch an:! Store
Branch and store Register
Branch on Condition
Branch on Conjition
Compare Half~ord
Control 1/0
Compare Logical
Compare Logical Immediate
Compare Decimal
Divide Decimal
Edit
Halt and Proceej
Load fIalfword
Multiply Decimal
Move CharactE!rs
Move Immediate
Move riumerics
Move ~ith Offset
Move Zones
A.ND Logical Immediate
OR Logical Immediate
Pack
Subtract Halfword
Subtract Decimal
Set Program Status Word
Subtract
Store Halfword
Test 1/0 and Branch
Test Under Mask
Translate
Unpack
Execute 1/0
Zero and Add Decinal

4A
FA
4D
OD
47
07
49
9B
05
95
F9
PD
OE
99
48
FC
D2
92
01
Fl
D3
94
96
F2
4B
FB
81
lB
40
9A.
91
DC
F3
DO

RX
SS
RR
RX
RR
RX
RR
RX
SI
SS
SI
SS
SS
SS
SI
RX
SS
S8
SI
SS
SS
SS
SI
SI
SS
RX
SS
SI
RR
RX
SI
SI
SS
SS
SS

R1 "Oa(0,B a )
D1(L1,B1),Da(La,Ba)
R.. ,Ra
R1 ,Oa(0,B a )
R1 "Ra
M1 ,D a (0,B a )
M1 ,R a
R1 1, Oa (0, B'a)
D1 (B 1 ),(JF
D1 (L,8 1 ) ,Oa (Ba)
D1 (8 1 ),I a
D1(L1,B1),Da(La,Ba)
D1(L1,B1),Da(LarBa)
D1 (L,B 1 ),D a (B a )
°1(B 1 )"I 2
R1 ,Oa(0,B a )
D1(L1,B1),Da(La,Ba)
D1 (L,B 1 ),02(B a )
D1 (B 1 ), , Ia
D1 (L,B 1 ),Oa(B a ,
D1(L1,B1),Da(La,Ba)
D1 (L,B 1 ) ,Da (Ba)
D1 (8 1 ),I a
01(8 1 )"I a
D1(L1,B1),Oa(La,Ba)
R1 ,D a (0,B a )

F8

88

A.P

AR
BA.S
BASR
BC
BCR
CH
CIO
CLC
CLI
CP
DP
ED
HPR
LH
MP
M\TC
MVI
MV'N

MVO
MVZ

NI
01

PA.CK
SH
SP
SPSW
SR
STH
TIOB
TM
TR
UNPK
XIO
ZAP

122

1~

D1(L1,B1),Da(La~Ba)

01-(B1-)
R1i Ra
F1 ,Oa(O,B a )
D1 (B 1 ) I, UF
01(B 1 ),I a
D1 (L,B 1 ) ,Da (B 2 )
D1(L1,B1),Da(L2"Ba)
D1 (OF,B 1 >,D a (B a )
f"'\.
r
T")' 'U2
n
I
.....,
LJ1 ,\U1,D1'
\.LI2,02'
~

r-------------T---------T-------------------------------------T-------------------,
CODE I OPERAND ,I
MEANING
1
INsrR(JCTION I

1EXTENDED

M~CHINE

~-------------+-------~-+--------------------------------------+-------------------~

I
I
I

1

B
BR
NOP
NOPR

ID 2 (0,B 2 )
IR2
102(0,B 2 )
IR2

I
I

1

1

Branch crnconditional
Branch Unconditional (RR Format)
No Operation
No Operation (RR Format)

IBC 15,02(0,B2 )
I
BCR 15,R 2
I
BC O,02(O,B 2 )
I
BCR 0,R 2

t
I

I
1

~-------------+---------+---~-----------~----------------------+-------------------~

I
I

I
I
I

I

1

BlI
BL
BE
BNH
BNL
BNE

1
102(0,B 2 )
102(0!,B 2 )
102(0,B2 )
10 2(0,B 2 )
102(0,B 2 )
10 2 (0" B 2 )

I USED AFTER COMPARE INSTRUCTIONS
I
Branch on High
I
Branch on Low
I
Branch on Equal
I
Branch on Not High
1
Branch on Not Low
I
Branch on Not Equal

I
I
I
I
I
'I
I

I

BC
BC
Be
BC
BC
BC

2 1,0 2 (0,B 2 )

4/1D 2 (OI,B 2

)

8.0 2 (0,B 2 )

13.D2(0~B2)

11,02 (0,B 2 )
7. O2 (0, B 2 )

I

I
I
I
I
I

~-------------+---------+---------------------~----------------+~---------------~--~

I
BO
I
'BP
1
BM
1 BZ

I

IOSED AFTER ARITHMETIC INSTRUCrI~NS
Branch on Overflow
I
Branch on Plus
1
Branch on Minus
I
Branch on Zero

10 2(0,B 2 ) 1
102(0,B2 )
102(0,B 2 )
ID 2 (0,B 2 )

I
I
I
I
I

BC
BC
Be
BC

1.0 2 (0,B 2 )
2;,02(0,B 2 )
4.0 2 (0,B 2 )
8 1,02(0,B 2 )

I
I
I
I
I

~-------------+---------+--------------------------------------+-----------~-------~

,
1,
I USED AFTER TEST UNDER MASK INSTRucrIONI
I
1
BO
ID 2 (0,B 2 ) I
Branch i f ones
1 Be 1 I1 0 2 (0,B 2 )
I
I
1
BM
102(0,B 2 ) I
Branch i f Mixed
I
BC 4 I,D 2 (0,B 2 )
I _______________________________
BZ
Branch i f Zeros
Be 8 11 0 2 (0,B 2 )
1_____________
L
LID
_________
--_____ LI ___________________
JI
2 (0,B 2 ) L

Appendix A

123

Appendix B. Machine-Instruction Format

r--T---------------------------T--------------------------T---------------------------j
!
Operand
i

!
I

I~ssembler

I~pplicable

I Ba2i£_Machin~EQf!!!~!:

I Ei§;1f!_Eor!!!~!=.

1I!!~tr!!ct!Q!!~

I

I

1
IA.R,BA.SRr,SR

I

I

I

•

I

~--t---------r--T--T-----------t--------------------------t-----------------=---------~

I
i
!

8
14 14
jOperationj
i

I

~ode

I
i

IR1./R 2

! (see note

!R1.'R~!

1)

I

IRR~---------t--t--t-----------f--------------------------t---------------------------~
1

I
I
I

1
8
14 14 I
IOperationl
1 1
I Code
I M1. I R21
I
I
1 I

1
IM1 ,M a
I
I (See notes 1 and 4)

1
IBCR
I
I

I
I
I
I

~--t---------t--+--+--r--r-----+--------------------------+---------------------------~
I
8
14 i 4 i 4 i 12i
i I
1
IOperationi i i i i
jR1.. 0 2(D,B 2 )
ISTH.LH,CH~A.H,SH, BA.S
I

I
I

J
I

1
1

~ode

IR11x21 Bal D21
1 I
1 1 1

IR1r,Sa
1 (See notes 1" 2r, 3, and 7)

I

I

1

I
IRX~---------t--+--+--t--t-----t--------------------------+---------------------------~
I i
,8
14 14 14 112 I
I
I
I
1Operation]
I
I
1 1
IM1 "[)2(O,B 2 )
IBC
I
I
I
I
~ode
IM1.IX2IB2ID21
IM11,S2
I
!
I I
I I I I I
I (See notes 2,3 r, 4 r, and 7)
I
1
~--+---------+--~--+--f--f-----i--------------------------+---------------------------~
I
I
8
18
14 1121
I
1
I
I
I Operation,
'"
101(B1 ).I 2
'CLI~MVI,NI,oI,rM,ffPR'
I
I Code
I 12
, B11 D1.1
I S1.I, 12
I
I
1 I
1
I I 1
1 (See notes 2,3.6, and 7)
I
I

ISI.---------+-----f--f--+-----f--------------------------+---------------------·------1
I I
8
18
14 1121
1
I
I

I

I

IOperationl
:ode
1--

1

I

1

I
1

I

1
1

1

I

I'

IB11D11
I 1 I

101 (B 1 )
15 1
I (See notes 2,3 .. 7, and 8)

I

! SPSi and the I
Imodification code (2 cols.>, or blank; for
I
I
I
I
I
I TPS: blank.
l
~-----------~------+-----------+----------------------------_._---------------~
I MEND
~A sequence symbol or
I Blank
I
1
I blank
I
I
~------------------t----------------------t---------------------------------------------~
tMEXIT
IA sequence symbol or IBlank
I
t
I blank
I
I
.------------------t----------------------t---------------------------------------------~
IMNOTE
IA sequence symbol or IA comtination of characters encl~sed by
I
I
I blank
I apostrophes
I
.------------------t----------------------t------------------------------~------------~-1
I SE'TA
I &AGg or &ALg., where !! I ~n arithmetic expression wi ttl i:t maximum
I
I
I is 0-15
lof three terms
I
~------------------+----------------------+---------------------------------------------~
ISETB
I&BGn where g is 0-255 I~ logical expression or a relational exI
I
Ifor both DPS and TPS • • pressio~ enclosed by parentheses
I
~
I&BLg where!! is 0-255 I
I
I
I
I for DPS and 0-127 for I
I~GO

-------_.

I

ITPS

I

I

~------------------t----------------------t---------------------------------------------~
ISETC
I&CGg. where!! is 0-15 IUp to eight characters enclosed by a pair
I
I
I
lof apostrophes --substrings and
I
I
I
Iconcatenation permitted.
I
.------------------+----------------~-----t--------------------------------------------~~
IModel Statement
IA symbol, a variable IAny valid combination of characters (includingl
I (any Assembler
I symboL. a sequence
I variable symbols)
I
Ilanguage mnemonic I symbol,. a symbolic
I
I
loperatton code~
I parameter. or a conI
I
lexcept END, ICTRL, I catenation repI
I
I ISEQ, LTORG.
Iresenting a synbol
I
I
IPRINT, and START~ I
I
I
~------------------+----------------------+---------------------------------------------~
IPrototype State- IA symbolic parameter
IUp to 49 symbolic·parameters separated by
I
I ment
lor blank
I commas
I
t------------------t----------------------t---------------------------------------------~
IMacro
Instruction IValid
symbol or blank IUp
to 49 operands, separated by conmas
L
__________________
______________________
_____________________________________________
JI
~

~

*~hen

the IOCS is used~ the following symbols must not be used:
&BGO - &8319, &BG21, &BG27, &BG28~ &BG69, and &BG80 - &BG88~

Appendix E

129

Symbolic Parameters and Variable Symbols in Expressions
r-------------r-~-----------T-----------------T----------------T-----------------------,

I

Symbol

\Defined By

I

Initialized or IValue Changed Byl

:an be Used In

I

J
I
I Set to
I
I
I
~~~==~=======-+-----~==-----+-----------------+----------------+-----------------------~

Isymbolic
I parameter

I

I Prototype
I statement
I
;

ICorresponding
I Constant
Imacro instructionlthroughout
!operand
!definition

t

1

I
1
I

I

I
I
I
I

I

I A.ritbnetic

ex:?ressi~ns

lif operand is an un!signed decimal selfI defining t ern

I
I Character
I

ex?ressi~ns

1 Model statenents

I
I

!
I
I
I
I

I

t-------------+-------------t-----------------+----------~-~~==+====~~~~==~====~---~===.

,
I
1
l

t SETA

I Predefined
I
I
I
,I

I

I

I

I

I

I

~

~

10 (at assembly
I
I
I
Istart for global, I SETA. instructionl A.r ithnetic ex?ressions I
I at macro call
I
I Character ex?ressions I
I for local)
I
I
I
I
I
I Model stat enents
I
~-------------+-------------+-----------------+----------------+-----------------------~
j SETB
i Predefined
i 0 (at assembly
i
I
I
i
i
istart for global, i SETB instructionl hrithnetic ex?ressions I
I
I
I at macro call
I
I Character expressions I
i
i
Ifor local)
I
I
I
I
I
I
I
I Logical expressions
I
I
I
I
I
I
I
1
I
I
I
I Model statenen ts
I
~-------------+------. ------~-----------------+----------------~-----------------------~
ISETC
I Predefined'
INul1 character
ISETC instructionlArithmetic expressions I
I
I
Ivalue (at assem- I
lif operand is an unI
I
Ibly start)
I
Isigned jecimal selfI
I
I
I
I
I
I defining tern
I
I

I

I

I
I
1
I

I

I

I

I

I Character ex;>ressi:ms

I

,
,
I
I Model stat ements
I
~-------------+-------------+-----------------+-.--------------+-----------------------~
I&SYSNDX
IThe hssemblerlMacro instructionlConstant
Ihrithmetic ex:;>ressions I
I
I
I index
I throughout defi-,
!
jnition; unique !Character ex?ressions
1
I
I for each macro I
I
I
I
I
I instruction
I Model statenents
I
~-------------+-------------+-----------------+----------------t-----------------------~
ItSYSE:T
IThe A.ssemblerlControl section I Constant
ICharacter ex:pressi~ns I
I
I
I in which :nacro
I throughout jefi-I
I
I
I
linstruction
I nition; set by I Model statenents
I
I
I
I appear's
ICSECT, DSECT,
I
I
I
I
I
land SThRT
I
I
~-------------+-------------t-----------------+----------------+-----------------------~
I&SYSLIST(n)
IThe hssemblerlCorresponding
I Constant
lA.rithmetic expressions I
IWhere n is a I
Ipositional macro-Ithroughout defi-lif operand is an unI
I SETl\, symbol 1
linstruction
I nition for a
I signed decinal selfI
lor a decimal I
I operand
19iven value of nldefining term
I
1self-defining I
I
I
ICharacter ex;>ressions I
Ivalue!
!
I
!
I
I _____________ I _____________ I _________________ I ________________ I Model
stat enen ts
L
__ ____________________
JI

130

~

~

~

IBM-Supplied Macro Definitions

r---------------------------------------------------------------------------------------1
~i~!_Q~_l§~=§~QQ!!gg_~~£fQ_~~!g!!!Q~~l~E~~
ASSGN ATENT
COIPL CLOSE CNTRL CNVRT COMRG CROPR CREAO
DCCB
DTFCG
DTFIV
DTFNB
OTFPO
DTFSN

OCNT
OTFDA
OTFLC
DTFNC
OTFPQ
OTFSR

OCSCT
OTFDC
DTFLO
DTFND
OTFPR
OTFST

DSENG
DTFDF
OTFM3
DTFNE
OTFRG
DTFSU

OSKA
DTFDO
OTFMM
DrFNF
DTFSC
DrFSV

OrFBG
DTFDR
DTFMT
DrFP
DTFSD
DrFS;"

OTFBN
DrFEN
DTFMU
DrFPA
DTFSE
OTFSX

OTFB"T
DTFIA
OTFMV
D'TFPC
DTFSF
DTFSY

OTFBU
DTFID
DTFMW
DTFPD
DTFSG
DTFSZ

DTFBV
DTFIN
DTFMX
DTFPE
DTFSH
DTFTC

OTFBw
DTFIQ
DrFMY
DTFPK
DTFSI
DrFTL

DrFBK:
DTFIR
DrFM1
OTFPL
DrFSJ
orFrJ

DTFB~

DTr:~

DTFIS DTFIT
DTFM2 DrF~A
DTFPM DT~PN
DTFSK DTFSL
DTF~R

DT~~~

ENDFL ENDMT EOJ EOM ESErL EXlrB
FEOV FETCfi
GET
I$BGO I$BG1 I$BG3 IB249 IE001 IICMA INTRD 10001 IPIQJ IQIPT
LBRET LOAD LO:v1 LXITB
MACRO MAINT MCIPL MDERP MFET MINQ MJOB1 MJOB2 MJOB3 MJOB4 MJOB5 MJOB6 MONrR MPPK
MRIN MRJUT MSCEO MSCOO MSC10 MSC11 MTRAN MVCOM
NOINQ
OPEN
PREQ PRTOV PUT

I

RJEMM
I READ RELSE RETRN RJBGN RJCHK RJCMP RJCON RJCRD RJCTR RJDRD RJDRH RJDwE RJE
IRJEND RJECT RJERR RJEUT RJEXP RJHOR RJLER RJMSG RJOUT RJPCH RJPRD RJPTR RJREQ RJRQM
IRJRQP RJTRA RJTRC RJTRD RJTWC RJTWE RJWNQ RPGEQ SORTB RAPQP TRArB

I

\SETFL SErL

I

I TRUNC

l

WAIT WAlrB WAITC WAITF WRlrE
Lis1-Q~_lBM-§~QE!!g9_~~£fQ_Q§±ig!!!Q~2_1I~~1

Ef!Qf!:!:Y_±'

CNTRL CO~RG CRDPR DSE~G EJJ
EOM
EXITB FEOV FETCfi GET
LBREr LOM
PRTOV PUT
READ RELSE RJCMP RJEXP rRUNC NAITB wAITC WRITE

LXlrB MiJCJ:v1

~riQ.E.i!y_~

CLOSE DTFBG DTFBT DTFBO DrFBV DrFB~ OTFBX DTFBY OTFCF DTFCG DTFM:v1 DTFMT DTF:v1U DT~MV
DTFMW DTFMX DTFMY DTFNA DTF~B DTFNC OTFNO DTFNE OTFNF DTFPA DrFPC DrFPD DTFPF DrFSR
DTFST DTFSU DTFSV DTFSW DrFSX OrFSY DTFSZ OPEN
f£ior!!y_~

DTFBN DTFSN
~f.!ori!y_~
L OTFEN
_______________________________________________________________________________________ J

AppendiK E

131

Appendix F. Assembler-Language Features

r-----------------------T--------T--------T--------T--------T--------T--------T--------,
\ Feature
IModel 20lMJdei
IBPS
!BPS/BOS !DOS/TOS !JS/360
!
20!SUPP~K

!
I

!Basic
!DPS/TPS I
IBasic
Il\sse:r.I
I
I Assem- I !issem-,
,AssemI bIer,
,
,
\
Ibler
Ibler'
,bIer,
,
I
I
~-----------------------+--- -----+--------+--------t--------+--------t--------t--------~
fNo. of continuation
i 0
0
i 0
0
.
1
I 1
,2
,
cards/statement (excl. I !
I
I
of macro constructions) ,
,
I '
Input character code
ELEMENrS:
Miximum characters/

"IEBCDIC

EBCDIC

4

8

~.:z'''~~~

EXPRESSIONS:
Opera.tors
Number of terms
Number of parentheses

1 char.
only

1 char.
only
8 bits
max.
X

see

J~

X

I
I
I

max. of
8

I level
I X

,

ASSEMBLER INSTRUCTIONS:
DC and DS
Expressions in
.modifiers
Multiple operands
Multiple constants/
operand

I,

'EB~DIC

8

X

X

X

~

X

X

X

,
,

X

X

X

X
X

X

X
K

,

,

6

X

1 char.
only

,I

,
X
12 2 '+-1

I
I

12:1.6-1

I
I,
+-*/

+-*

16

3

8

,
i

8

+-*
3
1

3

IEBCDI~
"

,

1

+-

22'+-1

2 2 '+-1

22~-1

X

X

X

+- *1
3
1

level

I
I
I,

X

X

+-*/

8
3
i leve Is

+-*/

16
5

1e\7e13

x:

x:

X

x:

X

X
X

,

I,

I,

I,

I
I

,,

I,

,,
,

I

I
Only C, I c,. X. B,
X, H. Y

EBCDIC

,

6

,

Complex relocatability

Bit length
specification
Scale modifier
Exponent mo:iifier
DC types

EBCDIC

,

Qumhnl

Character selfdefining terms
Binary self-defining
terms
Length-attribute
reference
Literals
Extended Mnemonics
Maximum locationcounter value
Multiple control
sections per assembly

'BCD or
'EBCDIC

H, p. Z,
Y

,,

,

,

,
I
I Except

1
I
I Except

IB,v

IB,P,V

Except
a:1jress
cons.

X

,

,

I Z,

,
'X

IY,S
'Except

X
X
X

X

X

X

x:

X

X

Except
x:
S
I
I A
DC duplication factor
,
I -x:
Except
x:
of zero
S
I
I
DC length modifier
Except
see
I X
IExcept
X
x
H,Y
Appx.D
I
IH,E,
IL _______________________ L ________ • ________ Ll
iD
________
L __ ______ L ________ L ________ LI _______ _
DC duplication factor

132

X

r-----------------------T--------T--------T--------T--------T--------T--------r--------,
IModel 20 I Model 20lSUPPAK IBPS
IBPS/BOS IDOS/TOS
I

I Feature
I

I~S/360

I Bas ic
I DPS/rpS I
. Ba sic
I Assem- I
I
I
,
'AssemI AssemI
I As s ern- I bler
I
I
I
,
,bler
, bler
I
, bler
I
I
I
I
~-----------------------+--------t--------t--------+--------t--------t--------t--------~
, os maximum length
I 256
256
: 256
I 256
I 256
165:,535
65,535
I
1 modifier
1
I
I
I
I
, os constant subfield I -I -I X
I x
K
l
, permitted
I
I
I
I
I
I os type
,only
only
only
lonly
I X
I X
X
I
t
IH,,::::
H,C
C,R,
I C, H,
I
I

1

, Dq_length modifier

1

I F "0
lonly
only
ICC

, COpy

I

1-

I

, CSECT

'
I DSECT
'
, ISEQ

I

I LTORG

I

, PRI NT

I

I T LTLE

I

I
I
I

I

I
I

I

I
I
I
I
I
I
I !
I

I

1

ENTRY

EXTRN

CNOP

X

X

X

X

X

I
X

I
I
I

11 opnd. 11 opnd.
lonly
I only

I

t 1 opnd.

I only
I
I

X

1 opnd.
1 or 25
only

I

I

I

I

I

I
I

I
I

I

X

X

I

X

X

I

I

I
I
I
I

2-17
2 opnds. 6opnds.
opnds.
I
ist opnd reloc.
I
reloc.
only
I
only
I

I

5 opnds. I
I
I

K

K

X

K

X

X

X

11 opnd.
lonly

X

X

X

K

X

X

X

opnd.
I
2 reloc. I
only
I

I

I
I

I

I
I

X

lopnd.
only

I
I

X

X

I

I
I

I

I

I

I

I
I

I

X

X

I
I 4 opnds.
I (DCCW)

I
I

X

X

I

I
I

X

X

11opnd. 14 opnds.
lonly
I only

11 opnd.
lonly

X

X

I
I

I

X

I

I

X

I
I

I

K

X

12 opnds.15 opnds.
11st opndl1st opnd
I reloc. I reloc.
lonly
I only

Iblank
lopnd.

K

X

I

ORG

X

X

I

I
I
I No

K

I

X

I

I
I

X

I

I

' 1 1 opnd. 1 opnd.
I
125 only
I
lor 3
I
lopnds.
I
125,71,38

CCW

K

I
I

I

I

DROP

I

X

I::::

' X

I

lOSING

X

7 max.

'COM

i
I
I

IF" D
I only

, 8 max.

I

IICTL

only
C

I
X

No
blank
opnd.

No
blank
opnd.

lopnd.
only

lopnd.
only

1 opnd.
only

max. 14 \1 opn:L
1 opnd. lonly
only
I

2 dec.
digits

2 dec.
digits

I
I

I
I

I
I

I

12 dec.
I digits

I
t
I
I
I
I -X
X
I
I
I
REPRO
I ________
X
X
K
K
L _______________________
4I ________ L
4 ________ 4 ________ 4I ________
4I ________
4I ________
JI
PUNCH

Appendix: F

133

r-----------------------T--------T--------T--------r--------r--------r----====T--------,

I

" I

I

,

I

I

I

1360/20 I
**'
I
X
I X
X
,IOCS",
,
lonly
I
I i i
!
!
,
t-----------------------t--------t--------t--------t--------+--------t--------t----~---~
Operand Sublists
I
I
' I '
X
K

I Macro
I
!

Instructions

I

Attributes of macro=
i
instruction operands
I
inside macro
I
d~finitions and symbols I
used in conditional-!
assembly instructions I
~utside macro
I
definitions
,

,

I
i
I
I
I
I
I
I
I

I
I
I
! ! !
I
j
I
I
,
I
I
I
i
I
I
I
,
t

Subscripted SET symbols
Maximum number of
parameters

49

tJ9

Conditional-assembly
Jinstructions outside
Inacro definitions

X

x:

X

K

200

200

X

X

I

IMaximum number of SET
I symbols
I
Gl::>bal SErA
I
Global SETB
,I
Global SEre
I
Local SET~
,
Local SETB
I
Local SETB
IL__________
Local SETC
____________
~

*

~

16
16
*
*
256 1
128
*
*
16
16
*
*
16
16
*
*
256 2
128
*
*
128 3
0
0
*
* J
________ L ________
L ________ ________ ________
________
________
~

~

~

rhe number of SET symbols pernitted by the Operating System/36J and DOS/TOS
~ssembler

is variable, dependent upon available main storage.

X Implemented as specified in IBM System/360 Assembler
Not implemented.

1 For DPS and TPS
2 For DPS only
3 For N?S only

134

~

Lan~ua~e

SRL.

Appendix G. Output Listings (Assembler and MMAINT)

Assemb ler Program

r--------------r-----------r------------------------------------------------------------1
I PRINT
I
I

I FIELD
I

ME~NING

I POSITIONS I

I

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

I

I

External Symbol Dictioaary (ESD)

~--------------T-----------T------------------------------------------------------------~

I SYMBOL
I TYPE
lID
I~DDR

I LENGTH
ILD ID

I 01-08

I External name.

I 11-12
I 15-16
I 19-22
I 26-29
I 34-35

I Symbol type.
I ESD eatry nunber.
I Address of symbol before relocation.

I
I
I
I
I

I Length attribute of control se~tion.
I ESD entry number of control section Nhere nane a9pears.

I

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

I

I

Instructions

~-~------------T-----------T------------------------------------------------------------~

LOCATN
OBjECT CODE

ADD1
ADD2
STMNT
SOURCE
STATEMENT

WRN
SEQ
ERR
CAT

I Location of assembled instruction (hexadecimal).
or 1 Assembled instruction (heKadecimal).
07-22
I constant generated (hexadecimal).
22-25
1 Effective address of 1st operand (heKadecinal).
27-30
1 Effective address of 2nd operand (hexadecimal).
32-35
I Statement number (decimal).
37-116
I Source statement Ccard image). Column 36 contains
1 a plus sign if a source statement is generated.
118-120
I Number of TXT card (decim3l).
I Note: If NODECK was specified, the number is th3t of
i a-&OESD option.
03-05
I Flag: Possible error in previous st3tement.
08-10
I Flag: Sequence error in previous statement.
13-15
I Flag: Error in previous statement.
I 18-20
I Flag: Catastrophic error in previous statement.
02-05

07-20~

~----_---------~-----------L--------------~-----------

I

__________________________________

Relocation Dictionary (RLD)

I

~

I

l--------------r-----------r------------------------------------------------------------~

IPOS.ID
1 03-04
I ESD ID number of control section containing the constant.
I
IREL.ID
I 10-11
I ESD ID number of control section 60ntaining the 3ddress in I
I
I
I
the constaat.
I
I FLGS
I 16-17
I rype of relocation..
I
IADDR
I 20-23
I Address of constant before relocation.
I
~-----------~--~-----------~------------------------------------------------------------~
'I
Diagnostics
1
~--------------r-----------r----------------------------------------------------~-------~
ISTATEMENT NO. 1 05-08
1 Listing sequence number of statement in error.
1
IERROR MESSAGESI 20-79
I Explanation of error.
I
I ACTION
1 80-120
I Action taken by Assembler.
I
~---~----------~---~-~-----~-----------~------------------------------------------------~
I
Table of Defined Symbols
I
~--------------T-----------T----~-------------------------------------------------------~
1SYMBOL
I 01-08
I Name assigned to source statement.
I
I
I 65-72
I
I
I LEN
I 11-13
I Length attribute (decimal notation).
I
I
I 75-77
I
I
I VALUE
I 17-20
I Value attribute (hexadecimal notation).
I
I
I 81-84
I
I
I TYPE
I 24
I Type attribute.
I
IL______________ I ___________
88
I ____________________________________________________________ JI
~

~

AppendiK:;

135

r---------------------------------------------------------------------------------------1I

I
I

.ISYMBOL
.
,t---------------------------------------------------------------------------------------1
01-08
Source Label
I
i LEN

i~iioE
IDEF
I CROSS-

1REFERENCE
I
1

I
i

Crossreference List* (for DPS Assembler only)

10-13

ij-~6

23-26
31-34
37-40
43-46
49-52
55-58
61-64
61-10
13-16
19-82
85-88
91-94
97-100
103-106

Length attribute (decimal)

Value attribute (hexadedimal)
Listing sequence number of statement which defines label
Listing sequence numbers of statements
which contain the label

I

i

i

I
I
!
1

1nn_11")

.LV7-.L.L"

11C_110

..L.LJ-..L.LU

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

I

I*Replaces
Table of Defined symbols if ~ROSSREF is specifie~ in AJPT~ statement.
L
_______________________________________________________________________________________
J

136

EXTERNAL SYMBOL DICrIONARi
SYMBOL

TYPE ID

AD DR

01

0100

SD

LENGTH LD IF
00118

EXAMPLE
LOCATN

ADDl ADD2 STMT

OBJECT CODE

0100
0000
0008
0009
0100 4890 013E

013E

SOURCE STATEMENT

0002
0003
0004 R8
0005 R9
0006 BE3IN
0007

ERR
0104 D20l 0140 0144 0140 01114 0008
0009
0000
010A 4D80 0000
ERR
0010
0142
010E 9500 0142
0011
011E
0112 4780 011E
0012
0146
0116 4A90 0146
0013
0104
011A 47FO 0104
0014 EXIT
OOCO
011E 4D80 0020
0015 AREA
0122
0016 TABLE
012A
0017 ADDR
013E 0122
0018 LASTAD
0140 012A
0019 SWITCH
0142 00
0020 HO
0144 0000
0021 H2
0146 0002
0022

START
USING
EQU
EQO
LH
MVA

256
*-256,0
8
9
R9,ADDR
SWITCH, 0

LOAD ADDRESS OP TABLE
SET SwITCH OFF

MVC
BAS

LASTAD(2),HO
R8.,SUBR

2LEAR 'TABLE
GO TO SUBROOTI~E

2LI
BE
AH
B
BAS
DS
DS
D2
DC
D2
D2
DC
END

SWITCH,O
EXIT
R9,H2
BE3IN+4
R8.192
4H
10H
Y CAREA)
YCTABLE)
X'OO'
H'O'
H'2'

IF SwITCH OFF
LEAVE ROOrINE
ELSE INCREl\SE l\;»)RESS
AND BRANCH BACK

0002 STATEMENTS FLAGGED
RELOCATION DI2TIONARY
POS.ID REL.ID FLGS ADDR
01
01

04
04

01
01

013E
0140
DIAGNOSTICS

STATEMENT NO.
0007
0009

ACTION
STATEMENT TREATED AS

ERROR MESSAGES
UNDEFINED OPERATION :ODE
UNDEFINED SYMBOL

STATE~ENT

TABLE OF
LEN

VALUE

ADDR
AREA
BEGIN
EXIT
HO
H2
LASTAD
R8
R9
SwITCH
TABLE

2
2
4
4
2
2
2
1
1
1
2

013E
0122
0100
011E
0144
0146
0140
0008
0009
0142
012/\

Figure 17.

Sample Listing of Assenbler Output

SYMBOL

DEFI~ED

COM~ENr

IN:O~PLErELY

ASSEMBLED

SY~BOLS

TYPE
Y
H
I
I
H
H
Y
X
H

Appen:liK G

131

Macro Maintenance Program

r----------------T--------T----------------l
! PRINr
!MEANING
I

I FIELD
i

i P)SITI)N i

I

~----------------+--------+----------------~
ISTMNT NO.
I 1-8
IStatement number I
IMACRO DEFINlrIQNI 12-91 IMacro definit=
i
iSTATEMENT
i
jion statement
I
I DIAGNOSTIC
I 95-120 I Diagnostic nes- I
IL ________________ I ________ Isage
________ - - - - - ___ JI
~

~

MACR~

STMT NO.

MACRO DEFINlrION SrArEMENr
&NA~E

ADD
ADD
ADD
ADD
ADD
ADD
ADD
A.DD
ADD
ADD
ADD

001
002
003
004
005
006
007
008
009
010
011

Figure 18.

138

*&NA~E
&AL1
.ADD
&AL1
&AL2

ADD
STH
LH
SErA
AH
SErA
SETA
AlFB
STH

LH

&F1.&F2~&F3.&F4~&F5

12,SAVE~RE~

12,&F1
2
12,&SYSLIST(&AL1)
&AL1+1
&AL1+1
('&SYSLlSr(&AL2)' filE ' , ) • ADD
12,&SYSLIST(&AL1)
12 , S~~VEAREA

MEND
Sample Listing of Macro Maintenance-program output

DIAGN~srI:

Appendix H.Assembler Diagnostic Messages

The associated actions (see Output Listings) are abbreviatej as:
SA = Statement assemblej
STC= Statement treated as comment
SIA= Statement incompletely assembled
~IE= ~ssembly in Error
r--------------------------------T------------------------------~------T----------T-----l

,
Diagnostic Message
I
Meaning
IAssociatejlNotesl
I
I
I Acti:)n I
I
t--------------------------------+--------------~----------------------+----------+-----1
I~SSEMBLER CONTROL ST~TEMENr Irhe operand of an AW~RK statenent is I sr:
I
I
IAwORK INVALID
In:)t a single operand of
,
I
I
I
I either 1 or 2.
I
I
I
~-------------------------------~+-------------------------------------+----------+-----~
IASSEMBLER CONTROL ~R M~CR~
'~n ~OPTN statement has beenjetectej I
S~
,
I
IST~TEMENT - INVALID N~ME FIELD
Iwith an entry in the name field.
rhel
'I
t
I name field has been ignorej, but the 1
~
I
Iremainder of the statement has been I
I
I
I
I
I processed.
I
I
I
~--------------------------------+-------------------------------------r----------~-----~
IASSEMBLER CONTROL STATEMENT I~n ~OPTN statement has been en count- I
SIA
I
I
IINV~LID OR MISSING OPERAND
lered with no operands or Nith an
I
I
I
I :)perand function tha t is not one of I
1
I
I
,
I the valid options. The valid operandi
I
I
I
I and any other operanjs followin:J are I
,I
I
I
I i:Jnored.
I '
,
~--------------------------------+-------------------------------------+----------+-----i
'B~D D~T~
IErroneous data found in D: or D:CW
'SI~
I
I
I
I
I
I
, statenent.
~-----~--------------------------~-------------------------------------~----------~-----~
ICONST~NT TRUNCATED
'Specified constant length is less
I S~
I
I
I
,than the actual length of a constant.,
"
~--~-----------------------------~-------------------------------------~----------~-----~
IILLEG~L :ONTINUATION LINE
'A statement is continued on the sub- I src
I
I
1
,sequent line (in the subsequent
I
'I
I
,card) •
' I
I
~--------------------------------t-------------------------------------t----------t-----i
IILLEG~L FORM~T
1. Invalid delimiter.
SI~
I
2.
Missing or extra field(s) in sta,
tement operand.
I
3. First operand is a literal.
I
~.
Blank operand in a machine
I
instructi:)n.
I
5. Parentheses are not paired.
I
6. Invalid symbol in L·SY~B~L.
I
7. Illegal d:)uble indexing in RX
I
format.
I
8. Illegal type of self-jefining
,
term.
~--------------------------------+----------------------------~--------+----------+-----~
,ILLEGAL MODIFIER
I Inc:)rrect m:)difier in a D: or DS
I SI~
,
I
I
,statement.
I
I
I
~--------------------------------+-------------------------------------+----------+-----~

IIMPROPER START VALUE
I
I
,

lrhe value in a STARr statement is n:)tl
'an integer nul tiple o,f two.
(rhe
I
I value is increased to the next higherl
I integer mUltiple of two).
I

S~

I

I

I
I

I

I

'I

~--------------------------------~-------------------------------------~----------+-----~

IINV~LID :ONDITION CODE
ICondition code mask specified in Be I SIA
I
I
ISPECIFIC~TION
B:R is other than 0-15.
L
________________________________ LI:)r
_____________________________________
LI __________ LI _____ lI

~ppendix

fI

139

r--------------------------------T-------------------------------------T----------1-----1
Diagnostic Message
I
Meaning

I
!

l~ss~ciatejIN~tesl

I

!

z:-.~cti:)n

I

I

~--------------------------------1-------------------------------------t----------t-----~
INVALID EXPRESSION
11. For all instructions except DC
I SIA/STC I
I
and EQU, the value of the eKpres-1
I
I
sion is negative.
I
I
12. rhe eKpression contains more thanl
I
i
three terms.
I
I
13. rhe expression is compleK relo- I
i
I
eatable, but it is not allowe1
I
I
for this instruction.
I
4.
rhe terns in.a multipli~ation arel
not absolute.
I
5.
An arithmetic operator begins or I
ends an expression.
I
6.
Parentheses are not paired.
I
7. During expression evaluation a
I
value greater than 2 15 -1 or less I
than -2 15 has been reache1.
I
8.
Invalid delimiter sequence.
1
9.
The operand in an JRG st3te~ent !
is not relocatable within the
I
section.
i
10. The operand in an END or XFR sta-I
I
I
tement is not relocatable.
I
I
I
~--------------------------------+-------------------------------------t----------+-----~
IINVALID IMMEDIATE DATA
Irhe immediate data is an invali1
I SI~
I
I
I
Iself-defining term (e.g., more than
i
I
I
lone byte).
I
I
1
t--------------------------------t-------------------------------------t----------t-----~
I INVALID LENGTH VALUE
11.
For SS type instructions.
I
I
I
I
I
a.
Length is greater than 256
I
I
I
I
I
b.
F~r two length instructions, I
I
I
I
I
Ll or L2 is greater than 16. I
I
I
I
12.
Length is specified as a relocat-I
I
I
I
I
able term.
I
I
I
~--------------------------------1-------------------------------------t----------+-----~
I INVALID LITERAL SPECIFICArION
I Literals have been specifie1,
I SII.\
I
I
!
I a1 th:)ugh an AOPT~~ :or TERAL statement.
lis not included.
(rps Assembler
I
I
I
I
I
I only>.
.--------------------------------t-------------------------------------t----------+-----~
INVALID NAME FIELD
1.
For all instructions except
I SA/SrC I
I
rITLE:
The statement name beginsl
I
wi th a non-alphabetic character. I
I
{$, @, and # are consijer2d
i
i
alphabetic characters}.
I
2.
rhe statenent name is longer than
I
eight characters.
I
3.
Non-alphanumeric characters
1
appear within the statement name.
I
4.
A statement name is present in a
I
statenent which must not have a
I
name.
I
5.
~ DSE~T statement has no name.
I
6.
No name or an invalid name in an
I
EQU statenent.
I
t--------------------------------l-------------------------------------t----------+-----~
I INVALID OCCURE~CE JF ASSE~BLER 11. Program has more than one
I src
I
I
I STATEME~I'
I
srARr card.
I
1
I
I
i 2. A START card is improperly pIa ce:i i
I
I
I
I
in the program.
!
I!
I
13. An LTOR3 appears within a jummy I
I
1
I
I
control section.
I
i
I

L ________________________

140

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

_______________

~

__________

~

_____ J

r--------------------------------T-------------------------------------T----~-----T-----'

I

Diagnostic Message

I

I
I

Meaning

l~ss~ciate1IN~tesl

I

Ac t i on

I

I

~--------------------------------t-------------------------------------+----------+-----~
IINV~LID

I
I

RE3ISTER CONrENTS

11.
I

I

I
I

12.
I

Specified register contents are
n~t rel~catable or they excee1
21. 5-1.
specified c~ntents for registers
0 - 7 are not correct.

I
I

SI'/S~

I
I
I

I
I

I
I

I
1

I

I

I
I

~--------------------------------+-------------------------------------f----------+-----~
IINV~LID

RE3ISTER

SPECIFIC~rION

I
I
I

11.
I
12 •
I

Register specifie1 is other than I
0 to 15.
I
Register specifie1 as relocatablel
tern.
I

SI~/sr:

I
I
I
I

I
I
I
I

~--------------------------------+-------------------------------------+----------+-----~
IINV~LID

SELF-DEFINING rERM

I
I
I

Irhe self-defining term:
11. is t~~ large
12. is too long
13. c~ntains an invalid. character.

I
I
I
I

Sl~

I
I

I

I

I
I
I
I

~--------------------------------+-------------------------------------t----------+-----~
IIN~ALID

OPERATION CODE

I
I
I
I
I

11.
I
I
I
I 2.
I

The operation co1e begins with a I
non-alphabetic character.
($, @, I
and # are consid.ere1 a lphabeti c I
characters) .
I
N~n-alphanumeric char3.cters
I
appear within the operati~n code. I

src

I

I
I

I
I

I

I
I
I
I
I
I

~--------------------------------+-------------------------------------f----------+-----~

I St~rage required for a constant
I exceeds 21.5-1.

I LIMIT ERROR
I

I

I

sr:

I

I

I
I

~--------------------------------t-------------------------------------+----------+-----~

LIMIT EX2EEDED

11.
I
12.
I
I
I
13.
I
14.

I

15.
I

rhe value of the location c~unterl
has exceed.ed. 21.5-1.
I
rhe value of the location c~unterl
set by the OR3 st3.tement has gonel
below the initial value of the
I
c~ntr~l secti~n.
I
The total number of CSECr, DSEcr,1
and ExrRN statements exceeds 31. I
The t~tal number of CSEcr and.
I
DSEcr statements exceeds 8.
I
Total number ~f ENTRY statements I
must not exceed 20.
I

~IE

I

I

I
I
I
I
I
I
I
I

I

I

~--------------------------------f-------------------------------------t----------t-----~
IM~CRO

I
l

- 3ENERArION

TERMIN~rED

I Maximum number (999 for TPS; 4999 f~rl
I DPS) ~f executed A.30, A30B, ~IF, an1 I
I AlFB statements exceeded.
I

sr:

I 1, 21
I
I

I
I

~--------------------------------f-------------------------------------t----------t-----~

IMACRO - GENERArION TER~IN~rED
IBY OPERArOR'S INTERVENTION
I
I

Irhe generation is terminated. after
\the operator has assigned the value
I 'FF' to the c~re storage position
III OOCE' via the console.

I
I
I
I

sr:

IMACRO - INNER MACRO NESrIN3
IDEPrH EXCEEDED
I
I

I~n

inner nacr~ instruction h3.S been
given within a third level.
(rhis
Imacro instruction iNill not be
I expanded) •

1 sr:

1

I
I
I

I

I

I

1
1

I

I
1
~--------------------------------f-------------------------------------t----------+-----~

I 1, 21
I
1
1
I

I

I

t--------------------------------t-------------------------------------t----------t-----~

IMACRO INSTRucrlON IOCCURANCE OF DATA

IN~ALID

IThe columns up to the continue colunnl
lof a continuation line are not blank. I

SA

I

I

I

I

r--------------------------------f-------------------------------------t----------t-----~

exanple, ~peran1 longer than 7
I src
I
I
Icharacters, or operand has an equal I
I
I
I
I sign in ~ther than the first
I
I
I
I ________________________________ I position.
L
_____________________________________ LI __________ LI _____ JI

IMACRO INSTRUCrION -

I~~ALID

IF~r

IOPER~ND

~

r--------------------------------T-------------------------------------T----------T-----l
Diagnostic Message
I
Meaning
l~ssJciatejlNJtesl

I

I
I
I A.cti on I
I
~--------------------------------+-------------------------------------t----------t-----~
IMACRO INsrRucrION - KEYWJaD
i~ keyword Jccurs nore than on~e in a i
SA
i
IMULTIPLE SPECIFIED
Imacro instruction operand.
I
I
I
~--------------------------------+-------------------------------------t----------t-----~
IMACRO INSTRUCTION - TJJ ~~~Y
t~ore operands in a macro instruction I
SI~
t
I
iOPER~NDS
Ithan specified in the prototype sta- !
!!
I
I tement. The extra operan::'is are
I
I
I
I
I i:Jnored.
I
I
I
~--------------------------------+-------------------------------------t----------t-----~

IKcy~ord in nacro instruction jOeS not;
3r;
i
I match any keyword defined in the pro-I
I
Itotype.
rhis operand is ignored; alii
I
I other operands are processej.
~Q~~:
I
I
I
IJnly one message appears Nhen more
I
I
I
I than Jne undefined keyworj appe~rs inl
I
I
I the same card of a macro instruction. I
I
I
~--------------------------------t-------------------------------------+----------t-----~
!M~CRO - INVALID DAfA IN
!~on-numeric character encountered in I
STe
I 1, 21
!ARITHMETIC OPERATI~N
Ian ~IF. ~IF8i or SErB statement with I
I
1
I
Ian arithmetic relation or in a SErA I
I
I
I
i statenen t.
I
I
I
~--------------------------------+-------------------------------------t----------t-----~
IM~CRO - INVALID RESULr IN
IFor an A.IF, AIFB, or SErB statenent I sre
1, 21
IARITHMETIC OPERATIJN
I with an arithnetic relation or for a I
I
I
I SETz\ STz\TEMENT:
I
I
1
i 1. Result is negative
I
I
I
I
12. Result is greater than 99999.
I
1
I
IM~CRO INSTRUCTION - UNDEFINED
I KEYwORD
t
I

t--------------------------------t-------------------------------------t----------t-----t
INVALID SUBSTRING
ISpecified substring not wholly conI src
I 1, 21

!MACRO -

I
I

I tained in the character strin:J Jf a
I
I
I
ISErC instruction.
I
I
I
~--------------------------------+-------------------------------------t----------t-----~
IMACRO - INVALID SYSLIST
ISYSLIST reference to a paraneter
I ST:
I 1, 21
I REFERENCE
Inumber is less than 1 or greater thanl
I
I
I
149.
I
I
I
~--------------------------------+-------------------------------------t----------t-----~
I MACRO ~ LONG FINAL RESULT
12haracter string Lesul t lias exceeded. I sr:
I l, 2 i
ICH~R~:rER OPERATION
lei~nt cnaracters in an AIF, ~IFB, Jr I
I
I
,
ISETB statement with a chara~ter rela-I
I
I
I
Ition or a SErC statement.
,
I
I
~--------------------------------+-------------------------------------+----------t-----~
IMACRO - LONG INTERMEDI~TE RESULrlCharacter string has exceeje::'i sixteen,
ST:
I 1, 21
lIN CHARACTER OPERATIJ~
Icharacters for a SET: statement.
I
I'

r--------------------------------t-------------------------------------f----------+-----i
\MACRO - STATEMENT TRUNCATED
\A generated model statement exceeds
I
I
'S~

I

I col unn 71
I
I
I
~--------------------------------+-------------------------------------t----------t-----t
IMACRO - UNDEFINED OPERATION CODEIAn instruction with an operation cJdel
sre
I 2
I
I
Iwhich is not recognized as a valid
I
I
I
I
ISystem/360 Model 20 Jperation code
I
I
I
land is not contained in the macro
i
I
I
;
\
\ library was fJund during ma~ro
I
I
I
i
I generation.
I
I'
~--------------------------------+-------------------------------------t----------t-----~
IMISSING UF IN XIJ
I~issing unit and function specifica- I
SI~
I
I
I
I tion in XIO statement.
I
I
I
~-~------------------------------t-------------------------------------+----------+-----~
IMNOTE
IA message from the macro coder to
I None
I
,
i
i the macrO user, generally ijentifying I
I
I
I ________________________________ Ian
error in the macro
in!;;t-.rllct.jon~!L __________ L
I _____ J1
L
____________________
- ________________
~

142

r--------------------------------T-------------------------------------T----------T-----'

I
Diagn~stic Message
I
Meaning
l~ssJciate11~otesl
I
I
I ~cti on I
I
~--------------------------------+-------------------------------------+----------+-----~
MULTIPLE DEFINITIO~
1. Identical symbols appear in the I SA/STC I
name fields of tHO or more
I
I
statenents.
I
I
For an EXrRN statement:
2.
1
I
a. Operand is identical to the I
I
name field of another
I
I
statenent
I
I
b. Two or more statenents have 1
1
identical operands
I
I
3. The name fields of CSEcr and/or I
I
DSECT statements are identical.
I
1
\
The statenent encountered second I
I
I
is considered unnamed.
I
I
~--------------------------------+~------------------------------------+----------+-----~
\NOr ADDRESSABLE
11. No base register specified.
I SI~
I
I
I
12. An absolute displacement is
I
I
I
I
I
greater than 4095
I
I
I
I
\3. Base register(s) specified in
1
1
1
I
I
USING statement (s) cannot be app-I
I
I
I
1
lied" (no coincidental
I
1
I
I
I
relocatability).
I
I
I
~--------------------------------+-------------------------------------+----------+-----~
IRELOCArION ERROR
11. Base register specified in relo- I S~
I
I
I
I
catable operand.
I
I
I
I
12. RelJcatable expression in YLl ( ). I
I
I
I
13 • Symbol in operand of E~rRY state-\
I
I
\
I
ment is defined in an unnamed
I
I
I
I
I
contr~l secti~n.
I
I
I
~--------=-----------------------+-------------------------------------t----------+---~-~

FORMAT
IBE ANALYZED
\
IST~TEMENr

C~NNor

1.

Erroneous operand in an

src

instructi~n.

2.
3.

Blank operand in an Assembler
instructiJn.
For DC or DS:
a. First character in operand
field is not alphabetic or
nmoeric.
b.
No alphabetic character follows the duplication factor.
c.
N~ terminating apostrophe or
close parenthesis.
d. Terninating apostrophe or
close parenthesis followed by
a non-blank character.
I
e. Length specification is
n~n-numeric.

f.
Invalid constant type.
4.
An operation code and/or an
~perand is not c~ntained in
co~umns 2 through 71.
I 5. OperatiJn c~de has more than 5
characters.
I
16. D2 literal has no fourth
sub-field.
I
17. N~ initial apostrophe in rIrLE
I
statement.
18. More than four registers are spe1
cified in a USIN3 or DROP
I
statement.
~--------------------------------+-------------------------------------+----------+-----~
ISYMBOL NOr PREVIOUSLY DEFI~ED
I~ symbol in the ~perand of an J~G or I
sr:
I
I
I
IEQU statement is not defined in a
I
I
I
encountered statement.
IL ________________________________ LIprevi~usly
_____________________________________
LI __________ LI _____ JI

A.ppendiK

d

143

r--------------------------------T-------------------------------------r----------r-----'

I
Diagnostic Mess~ge
I
Meaning
l~ssJciatedlNotesl
I
I
I ~cti:)O I
I
~--------------------------------1-------------------------------------t----------t-----~
ITOO MANY DIGITS
\TOO many digits in a decimal value orl
SA
I
I

i

I a self-defining term.
I
I
I
~--------------------------------+-------------------------------------t----------t-----~
IUNDEFINED OPERATION CODE
IMnemonic operation code is not reco- I sr:
I
I

i
I

I

i :Jnized as a valid IBlY! SysteItl360
IModel 20 operation code and is not
I contained in the macro libr~ry.

i

i is

i i i
I
I
I
I
I
I

r--------------------------------t-------------------------------------+----------+-----1
IUNDEFINED SYMBOL
IA symbol has been referenced but it ! SIA
!
!

i

~ot defined in the name field of

i any instruction.

I

I

I

I

I

I

~--------------------------------+-------------------------------------t----------t-----~
IUNPAIRED AMPERSAND
IOdd number of ampersands encountered I S~
I
I
I
lin a constant.
(T.vo ampersands must I
I
I
I
I be specified for every ampersand
I
I
I
IL________________________________ LI _____________________________________
wanted in a constant.)
1I __________ LI _____ JI

r---------------------------------------------------------------------------------------1
I~Q~~§:
I
I
11.
I
,

I

12.
I

I

These messages refer to statements in the assembly listing which contai~ addition~ll
information. This additional information is:
the macro-instruction name, and a
I
pointer to the instruction in error within the generated macro routine.
Diagnostic messages for macro instructions may be caused by improper data ~[l the
macro instruction (for example, alphabetic characters supplied for a len~th

Il _______________________________________________________________________________________
specific~tion).
J

Appendix I. Diagnostic Messages of the Macro Maintenance
Program
r----------------------------T----------------------------------------------------------,

I MESSl\GE
I MEANING
\
~----------------------------4---~~-----------------------------------------------------~
ICHARACTER VALUE TOO LONG
IA character value of this statement is too long.
\
~----------------------------+----------------------------------------------------------~
(CHl\Rl\:TER STRING TOO LONG
IA character string of this statement is t00 10~g.
\
~----------------------------+----------------------------------------------------------~
(COLS 1 THRU 15 NOT BLANK
(Colunns 1 thr~ugh 15 must be b13nk.
\
~----------------------------+----------------------------------------------------------~
(FORMAT ERROR I~ NA~E FLD
\The name field of this statement has the wrong format.
I
~----------------------------t----------------------------------------------------------~
(ILLEG~L :ONTIN PUNCH
IColumn 72 must be blank for this statenent.
I

~----------------------------4----------------------------------------------------------~
IILLEGAL OPERAND
Il\n operand is n~t allowed for this statement.
I
~----------------------------+----------------------------------------------------------~

I ILLEGAL OPERATION CODE
\
I
I

IThe operation code of this'statement is not allowed Nithinl
I a macro definiticn, or the operat ion c0de sp ecif ied in 3 I
Iprot0type statement is a machine instruction or an
I
\ assembler statement.
I

~----------------------------+----------------------------------------------------------~

(ILLEGAL
I

STATE~ENT

FORMAT

IThe format of the statement is illegal (has no operation
\ co:1e) .

I
\

r----------------------------+----------------------------------------------------------~

IILLEG~L

:ONTINUATION LINE

\The c0ntinuation line is not permitte:1.

I

r----------------------------f----------------------------------------------------------~

IILLEGAL SUBSrRING

\A substring specification is not permitted for this
I statement.

I

I

I

~----------------------------f----------------------------------------------------------~

IINCORRECT CONT LINE

\The continuation line is incorrect (column 16 of a con\ tinuation line is blank).

1

I

I

~----------------------------+----------------------------------------------------------~

IINV l\RITHM TERM OF SUBSTR

\rhe arithmetic term of a substring is invalid.

\

r----------------------------+----------------------------------------------------------~
TER~INArION

IINV CHAR STR

\The termination of the character string is incorrect.

\

t----------------------------t----------------------------------------------------------~

\INV

FORM~r

OF l\RITHM EXPR

IArithmetic expression has an invalid

f~rmat.

\

r----------------------------+----------------------------------------------------------~

IINV

FORM~r

OF LOGICAL EXP

\The f0rnat 0f the logical eKpression'is invali:1.

\

t----------------------------4-----------------------------------------------~----------~
rERMINATIO~

IINV OPERAND

IThe terninati0n of the operand is incorrect.

I

r----------------------------t----------------------------------------------------------~

!INV PROTOTYPE STATEMENT
Irhe prototype statement is incorrect.
I
r----------------------------f--------------------~-------------------------------------~
IINV RELArIONAL OPERATOR
Il\n invalid relational operator (E2, NE, GT, GE, Lr, LE) is\
1
I specified.
\
r----------------------------t----------------------------------------------------------~

\INV SET

ST~TEMENT

NAME

Irhe name of a SET statement is invalid.

\

t----------------------------f-----------------------------~----------------------------~

\INV SUBSrR

TER~INATION

\The

terminati~n

of a substring is incorrect.

\

t----------------------------t----------------------------------------------------------~

lINV SYMBOL TERMINArION

\rhe termination of a symbol is incorrect.

\

\The operand c0ntains an incorrect symbolic parameter.

I

r----------------------------f----------------------------------------------------------1
IINV SYMB PAR IN

OPERAN~

t----------------------------t----------------------------------------------------------~

!INV SYMB

P~R

I~

NAME FLD

\rhe name field contains an incorrect

synb~lic

?3raneter.

I

~----------------------------4----------------------------------------------------------~

IINV

1

SYSVARSY~

IN NAME

FL~

IThe name field contains 3n
\ symbol.

in~orr2ct

syst2m variable

I

I

t----------------------------+----------------------------------------------------------~

SYSVARSY~ IN OPERAND
operand contains an incorrect system variable 3ymbol. JI
lIINV
______________
--------- _____ L\The
__________________________________________________________

r----------------------------T----------~~----------------------------------------------,

I MESSA.GE

I MEANING

I

~-----------~----------------+----------------------------------------------------------~

IThe statement contains an arithmetic term which is
I
I invalid.
I
~----------------------------t----------------------------------------------------------~
IINVA.LID LOGI2A.L OPERArOR
IAn invalid logical operator is specifiej.
I
~----------------------------t----------------------------------------------------------~
!INVALID OPERATION CJDE
!The operation code for this statement is invali3.
I
IINVALID

ARITH~ETIC

TER~

i

~----------------------------t----------------------------------------------------------1

IINVA.LID

MA.~RO

STArEMENr

Irhe macro statement specified is incorrect.

I

~----------------------------t----------------------------------------------------------~

lINVALID MNOTE OPERi\ND
jIhe JpeL'and of an [VlNOrE statenent is invalid.
I
r----------------------------t----------------------------------------------------------~
1INVALID OPERAND TYPE
IPositional prototype statement with keyword or vice versa.1

t----------------------------t----------------------------------------------------------1
IINVALID

SEQUEN~E

SYMBOL

Irhe sequence symbol of this statenent is invalij.

I

t----------------------------t----------------------------------------------------------~

IINVALID STANDARD VALUE

IThe standard value specifiei for a keyworj is incorrect.

I

t----------------------------t----------------------------------------------------------~

IMORE THA.N 3 ATITHM TERMS

Irhis staterrent contains more than 3 arithnetic terns.

I

~------------------------~---+----------------------------------------------------------~

IMULTI DEFINED

SY~BPARA~

IA parameter is jefinej more than once.

I

r----------------------------t----------------------------------------------------------~

INO END PAREN IN OPERAND

Irhe terminating parenthesis of this operand is nissing.

I

t----------------------------t----------------------------------------------------------~

INO INIT • IN CHAR STRING
IThe initial apostrophe of a character string is nissing.
I
r----------------------------t----------------------------------------------------------~
INO INIr ; IN 21D CHAR VAL
IThe second character value has no initial apostrophe.
I

r----------------------------t----------------------------------------------------------1
INO INIT PAREN IN OPERAND
Irhe initial parenthesis of this operand is nissing.
I

r----------------------------f----------------------------------------------------------~
INO SEQ SYMB IN NAME FLD
Irhe name fielj of an ANJP statement joes not contain a
I
I
I sequence synbol.
I

t----------------------------t----------------------------------------------------------1

IOPERAND MISSIN3
Irhe operand of this statement is missing.
I
r----------------------------f----------------------------------------------------------~
iOPERAND Nor CJ~TINUED
IThe continuation of an operanj is missing.
I
r----------------------------t----------------------------------------------------------~
iOPERAND JVERFLJ~S CJL 71

IThe operand extends beyond column 71.

I

~----------------------------t----------------------------------------------------------1

IS

I

*

Irhe contents of columns 73 through 80 of this st3tenent
I are out of se1:uence.

I
I

r----------------------------t----------------------------------------------------------~

ISequence Symbol
I
IMULTI DEFINED
IA se~uence symbol is jefined more than once.
I
r----------------------------t----------------------------------------------------------~
ISe1:uence Symbol
I
I
INOT ~EFINED
IA se~uence synbol shoulj be jefined.
I
~----------------------------t----------------------------------------------------------~

]TOO
M~NY SYMB PARAMETERS
L
____________________________

* rps

1~6

only

Irhis
staterrent contains too ma~y syncolic paraneters.
__________________________________________________________
JI

~

Appendix J. Character Codes

This appendix lists all System/360 card c:>des t:> which a printer ~raphic is a3si~ned.
(The printer graphic may vary according to the national character set.)

r---------T----------------T--------------T------------T---------------,

IEBCDIC
I C~RD PUNCH
I PRINTER
I
I
I
ICODE
I
CO~BIN~TIJN
1
GR~PHI:
I
DECIM~L
I HEXADECI~AL
I
~---------+----------------t--------------t------------+---------------~

1

I

I

I

100000000 I 12,0,9,8,,1
0
1
00
1
100000001 I 12,9,1
1
I
01
1
100000010 I 12,9,2
2
1
02
I
100000011 I 12,9,3
3
03
I
,00000100 I 12,9,4
4
04
1
100000101 1 12,9,5
5
05
1
100000110 I 12,9,6
6
06
1
100000111 I 12,9,7
7
07
I
100001000 I 12,9,8
8
08
1
100001001 I 12,9,8,1
9
09
I
100001010,
12,9,8,2
10
O~
1
100001011 I 12,9,8,3
11
OB
I
100001100 I 12,9,8,4
12
oc
I
100001101 I 12,9,8,5
13
OD
I
100001110 I 12,9,8,6
I
14
OE
I
100001111 I 12,9,8,7
I
15
OF
I
~---------+----------------+--------------+------------+---------------~
100010000 I 12,11~9,8,1
I
I
16
I
10
100010001 I 11,9,1
I
17
I
11
100010010 I 11,9,2
I
18
I
12
100010011 I 11,9,3
19
I
13
100010100 1 11,9,4
20
1
14
100010101 1 11,9,5
21
I
15
100010110 I 11,9,6
22
I
16
100010111 I 11,9,7
23
I
17
100011000 I 11,9,8
24
I
18
,00011001 \ 11,9.,8,1
25
1
19
100011010 1 11,9,8,2
26
I
1?\.
100011011 I 11,9,8,3
27
1
1B
100011100 I 11,9,8,4
28
I
lC
100011101 \ 11,9,8,5
29
1
1D
100011110 I 11,9,8,6
30
\
1E
100011111 I 11,9,8,7
31
I
lF
~---------+----------------t--------------+------------+---------------~
100100000 \ 11,0,9~8,1
I
I
32
20
,00100001 I
0,9,1
1
1
33
21
\00100010 I 0,9,2
I
1
34
22
\00100011 I 0,9,3
I
I
35
23
100100100 \ 0,9,4
I
I
36
24
100100101 1 0,9,5
I
I
37
25
100100110 I 0,9,6
1
I
38
26
100100111 I 0,9,7
I
1
39
27
100101000 I
0,9,8
I
1
40
28
\00101001 1 0,9,8,1
I
I
41
29
I 00101010 I 0 , 9 ,8 ,2
1
I
42
2?\
100101011 I 0,9,8,3
1
I
43
2B
100101100 1 0,9,8,4
1
1
44
2:
100101101 I 0,9,8,5
I
I
45
2D
100101110 I
0,9,8,6
I
1
46
2E
100101111
0,9,8,7
47
I _______________
2F
L _________ 1________________
LI ______________ LI ____________
J
~

~

I\:??endix: J

147

r---------r----------------T--------------T------------T---------------,
I CARD PUNCH
I PRINrER
I
I
,

i EBCDIC
120DE

I

20MBIN~TION

I

GRAPHIC

I

DECIMAL

I HEXADECIMAL

I

~---------+----------------+--------------+------------+---------------i
100110000
12,11,0,9!1'8,1
!
48
30
I
100110001
9,1
i
49
31
100110010
9,2
I
50
32
90110011
9 .. 3
51
33
00110100
9#4
52
34
00110101
9,5
53
35
00110110
9.,6
54
36
00110111
9,7
55
37
00111000 I 9,8
56
38
00111001 I 9.,8,1
57
39
00111010 I
9,8,2
58
3~
00111011 I
9,,8,3
59
3B
'00111100 I
9,8,4
60
3C
~00111101 I
9.,8,5
61
3Q
100111110 I
9,8,6
62
3E
I
100111111 I
9,8.,7
63
3F
I
~---------+----------------t--------------+------------+---------------~
01000000 I
blank
I
64
40
I
01000001 I 12,0,9,1
I
65
41
I
01000010 I 12,0,9,2
I
66
42
I
01000011 i
12,0,9,3
I
67
43
I
01000100
12,0,9,4
I
68
44
I
01000101
12,0,9,5
I
69
45
I
01000110
12,0,9,6
I
70
46
I
01000111
12,0,9,7
I
71
47
01001000
12,,0,9,8
I
72
48
01001001
12,8,1
I
73
~9
01001010
12,8,2
I
74
4l\
01001011
12,8,3
I
75
4B
01001100
12,8,4
<
I
76
42
01001101
12,8 r 5
(
I
77
4D
01001110
12,8,6
+
I
78
4E
I
01001111
12,8,7
I
I
79
4F
I
t---------+----------------t--------------+------------+---------------~
01010000 1 12
I
&
80
I
50
I
01010001 I 12,,11,Q,1
I
81
I
51
I
01010010 I 12,11,9,2
I
82
I
52
01010011 I 12,11,9,3
I
83
53
01010100 I 12,11,9,4
I
84
54
01010101 I 12,11,9,5
I
85
55
01010110 I 12,11,9,6
I
86
56
01010111 I 12,11,9,7
i
87
57
01011000 1 12,11.,9,8
I
88
58
01011001 I 11,8,1
I
89
59
01011010 I 11,8,2
I
90
5l\
01011011 I 11,8,3
I $
91
5B
01011100 l
11,8,4
I
92
52
01011101 I 11,8,5
I
93
5D
01011110!
11,8,6
I
94
5E
101011111
11,8,7
I ______________
1
95
SF
L_________ I ________________
____________
______________
_

*

~

148

~

~

~

r---------T----------------T--------------T------------T---------------l
1 C1\RD PUN2H
I PRINrER
I
I
I

1EB2DI2
1CODE

I

CO~BINATIJN

I

GR1\PHI2

I

DE2IM1\L

I HEXADECIMAL

I

r---------+----------------t--------------+------------+---------------~
01100000 I 11
I
96
I
60
I
01100001 I 0,1
/
I
97
I
61
I
01100010 I 11,0,9,2
I
98
I
62
I
01100011 I 11,0,9,3
I
99
1
63
I
01100100 I 11,0,9,4
I
100
64
1
01100101 1 11,0,9,5
I
101
65
I
01100110 I 11,0,9,6
I
102
66
I
01100111 I 11.0,9,7
I
103
67
1
01101000 1 11,0,9,8
I
104
68
I
01101001 I
0,8,1
I
105
69
I
01101010 I 12,11
1
106
6A
I
01101011 i
0,8,3
,
I
107
68
I
01101100 I 0,8,4
%
I
108
6C
I
01101101 I
0,8,5
_
I
109
6D
I
01101110 I
0,8,6
>
I
110
6E
I
01101111 I 0,8,7
?
I
111
6F
I
~---------+----------------t--------------+------------+---------------1
101110000 I 12,11,0
I
I
112
I
70
I
101110001 I 12,11,0,9,,1
I
I
113
I
71
I
101110010 1 12,11,0,9,2
I
I
114
I
72
I
101110011 I 12,11,0,9,3
I
I
115
I
73
I
101110100 I 12,11,0,9,4
I
I
116
I
74
I
101110101 I 12,11,0,9,5
I
I
117
I
75
I
I 0111011 0 I 12 , 11 , 0 , 9 .• 6
I
I
118
I
76
I
101110111 I 12,11,0,9,,7
I
I
119
I
77
I
101111000 I
12,11,0,9,8
I
I
120
I
78
I
101111001 I
8,1
I
I
121
I
79
I
101111010 I
8,2
1
I
122
I
7A.
I
101111011 I
8,3
I #
I
123
I
78
I
101111100 I 8,4
I @
1
124
I
7C
I
101111101 1 8,5
I
I
125
I
70
I
10 1 11 111 0 1 8,6
I
I
126
I
7E
1
101111111 I
8,7
I
I
127
I
7F
1
~---------+----------------+--------------+------------+---------------~
110000000 I 12,0,8,1
I
I
128
I
80
I
110000001 I 12,0,1
I
1
129
I
81
I
110000010 I 12,0,2
I
I
130
I
82
I
110000011 I 12,0,3
I
I
131
1
83
1
110000100 I 12,0,4
I
I
132
I
84
1
110000101 I 12,0,5
I
I
133
I
85
I
110000110 I 12,0,6
I
I
134
I
86
I
110000111 I 12,0,7
I
1
135
1
87
1
110001000 I 12,0,8
I
1
136
I
88
I
110001001 1 12,0,9
I
I
137
I
89
I
110001010 I 12,0,8,2
I
1
138
I
8A.
I
110001011 I 12,0,8,3
1
I
139
I
88
I
110001100 I 12,0,8,4
I
1
140
1
82
I
110001101 I 12,0,8,5
I
1
141
I
80
I
110001110 I 12,0,8,6
1
I
142
1
8E
I
110001111
I
12,0,8,7
I
I
143
1
8F
I
l _________ L ________________ ______________ ____________ L _______________ J
~

~

r---------T----------------T--------------T------------T---------------,
I CARD PUNCH
I PRINTER
I
I
I

I EBCDIC

ICODE
! COMBINATION
I GRAPHIC
I
DECIMAL
! HEXADE2I~AL
I
~---------+----------------+--------------+------------+---------------~

10010000 I 12,11,8,1
144
90
I
10010001
12,11,1
145
91
I
10010010
12,11,2
146
92
I
10010011
12,11,3
147
93
I
10010100
12,11,4
148
9~
i
10010101
12,11,5
149
95
10010110
12,11,6
150
96
10010111
12,11,7
151
97
10011000
12f11:o8
152
98
10011001
12,11,9
153
99
10011010
12,11,8,2
lS4
9Ao.
10011011
12,11,8,3
155
9B
10011100
12,11,8,4
156
9C
10011101
12,11,8,5
157
9D
10011110
12,11,8,6
158
9E
10011111
12,11,8,7
I
159
9F
~---------+----------------+--------------+------------+---------------~
110100000
11,0,8,1
160
AD
110100001
11,0,1
161
Al
110 100 0 10
11 , 0 , 2
162
A2
110100011
11,0,3
163
A3
110100100
11,0,4
164
All
110100101
11,0,5
165
A5
110100110
11,0,6
166
A6
110100111
11,0,7
167
A7
110101000
11,0,8
168
A8
110101001
11,0,9
169
A.9
110101010
11,0,8,2
170
AA
110101011
11,0,8,3
171
AB
110101100
11,0,8,4
172
A2
110 10 110 1
11, 0, 8 , 5
173
AD
110101110
11,0,8,6
174
1
AE
I
110 10 1111
11 , 0 , 8 , 7
175
I
AF
I
~-----,---=+-~--------------+--------------+------------+---------------1
110110000 I 12,11,0,8,1
I
1
176
I
BO
I
110110001 I
12,11,0,,1
I
I
177
I
B1
l
10110010
12,11,0,2
178
82
I
10110011
12,11,0,3
179
B3
I
10110100
12,11,0,4
180
B4
I
10110101
12,11,0,5
181
B5
I
10110110
12,11,0,6
182
B6
I
10110111
12,11,0,7
183
B7
1
10111000
12,11,0,8
184
B8
I
10111001
12,11,0,9
185
B9
I
10111010
12,11,0,8,2
186
BA
I
10111011
12,11,0,8,3
187
BB
I
10111100
12,11,0,8,4
188
BC
I
10111101
12,11,0,8,5
189
BD
I
10111110
12,11,0,8,6
190
BE
I
10111111
12,11,0,8,7
191
BF
___ ________________
4 ______________ 4I ____________
4 _______________
JI
~------

15U

~

r---------T----------------T--------------T------------T---------------,

IEBCDI:
I CARD PUNCa
I PRINrER
1
I
I
I CODE
I COMBIN~TIJN
\ GRAPHI:
I
DECIMAL I HEXADECIMAL
\
~--~------+----------------t--------------+------------t---------------~

11000000 \ 12,0
192
CO
I
11000001 \ 12,1
A
193
C1
11000010 I 12,2
B
194
C2
11000011 \ 12,3
C
195
C3
11000100 I 12,4
D
196:4
11000101 1 12,5
E
197:5
11000110 I 12,6
F
198
C6
11000111 I 12,7
G
199
C7
11001000 I 12,8
a
200
C8
11001001 \ 12,9
I
201
C9
11001010 1 12,0,9,8,2
202
CA
11001011 I 12,0.,9,8,3
203
CB
11001100 \ 12,0,9,8,4
204
CC
11001101 1 12,0,9,8,5
205
CO
11001110 1 12,0,9, R, 6
206
CE
11001111 1 12,0,9,8,7
207
CF
~---------+----------------+--------------+------------+---------------~
\11010000
11,0
\
208
I
DO
I
111010001
11,1
I J
209
I
D1
1
111010010
11,2
1 K
210
I
D2
I
1101001'1
11,3
I L
211
\
D3
\
11010100
11,4
I M
21L
I
04
1
11010101
11,5
I N
213
\
D5
\
11010110
11,6
I 0
214
I
D6
I
11010111
11,7
\
P
215
I
D7
\
11011000
11,8
I Q
216
I
D8
I
1101'1001
11,9
I R
217
\
D9
I
11011010
12,11,9,8,2
I
218
I
DA
I
11011011
12 t l1#9:8,3
I
219
I
DB
I
11011100
12,11,9,8,4
1
220
I
DC
1
11011101
12,11,9,8,5
I
221
I
DD
I
11011110 \ 12,11,9,8,6
I
222
I
DE
I
11011111 I 12,11,9,8,7
I
223
I
OF
I
~~--------t----------------+--~-----------+------------+---------------~
\11100000 \
0,8,2
224
I
EO
111100001 I 11,0,9,1
225
\
E1
\11100010 I 0,2
S
226
I
E2
111100011 I 0,3
T
227
I
E3
\11100100 I 0,4
U
228
I
E4
111100101 I 0,5
V
229
I
E5
111100110 \
0,6
W
230
I
E6
\11100111 \ 0,7
X
231
\
E7
111101000 1 0,8
Y
232
I
E8
111101001 I 0,9
Z
233
I
E9
111101010 I 11,0,9,8,2
234
I
EA
11110 10 11 \ 11., 0, 9 , 8" 3
235
rEB
111101100 I 11,0,9,8,4
236
I
EC
\11101101 \ 11,,0,9,8,5
237
I
ED
111101110 \ 11,0,9,8,6
238
I
EE
01111 I ____
11 .,_________
0 " 9 , 8, 7 = _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
239
I _______________
EF
l1111
_________
______ L
J
~

~

~

r---------T----------------y--------------T------------.---------------1

IEBCDIC
I C~RD PUNCH
I PRINTER
I
I
I
ICODE
I COMBIN~TION
I GRAPHIC
1 DECIM~L I HEXADECI~AL
I
~---------+----------------+--------------+------------+---------------~
11110000
0
I 0
240
i
FO
11110001
1
I 1
241
I
F1
11110010
2
I 2
242
I
F2
11110011
3
I 3
243
I
F3
11110100
4
1 ij
244
I
F4
ll11Dl01
5
5
245
F5
11110110
6
6
246
I
F6
11110111
7
7
247
I
F1
11111000
8
8
2~8
I
F8
11111001
9
9
249
I
F9
11111010
12,11,,0,9,,8,2
250
1
FA.
11111011
12,11,0,9.,8,3
251
I
FB
1111111 0 0
12 , 11 • 0 , 9 .. 8 , 4
252
I
FC
111111101
12 , 11, 0 , 9. 8, 5
253
I
FD
111111110
12,11,0,9~8#6
254
I
FE
tllllllll
12,11,0,9,8,1 LI ______________ ____________
255
FF =====JI
l _________ ________________
LI __________

i

~

152

~

Appendix K. Minimum and Maximum System Configuration

Minimum System Configuration

IBM 2501 C~rj Reajer Model Al or A2,
IBM 2520 Card Read-Punch Model Al,
IB~ 2560 ~ulti-Function :ard Machine
Model A1;

The folloNing is the minimum systen configuration required to perform an assembly.

one of the followinl printers:
IBM 1403 Printer Mojel Nl, 2, or 1,
IBM 2203 Printer Model A.l.

An IBM 2020 Central PrOcessing Unit Model
C2 for the TPS (8,192 bytes of main
storage), or BC2 for the DP3 (12,288 bytes
of main storage);
an IBM 2415 Magnetic Tape Unit Model 2 or 5
(with at least one 9-track drive) for the
rps, or
an IBM 2311 Disk storage Drive Model 11 or
12 for the DPS;

Maximum System Configuration
Assembler object programs may be prodaced
for the follo~ing maxi~u~ systen
configur3.tion.

one of the following card reading devices:
IBM 2501 Card Reader Model Al or A2,
IBM 2520 Card Read-Punch Model A.1,
IBM 2560 Multi-Function Card Machine
Model 1\1;
one of the following printers:
IBM 1403 Printer ~odel N1, 2, or 7,
IBM 2203 Printer Mojel Al.

An IBM 2020 Central Processing unit Mojel
D2 (16,384 bytes of main storale); i,lith/Q.r
without IBM Binary Synchronous Commanic~-'
tions Ad~pter, Fe3.ture No. 2074;
two IBM 2311 Disk Storage Drive3 Mojel 11
or 12 (both must be the sane nojel);
an IB~ 2415 Magnetic rape unit
through 6;

~odel

1

an IBM 2501

C~rj

Re3.jer Mojel Al or A.2;

An IBM 2020 Central Processing unit Model
BC4 (12,288 bytes of main storage);

an IBM 1442

C~rj

Punch Mojel 5;

an IBM 2311 Disk storage Drive Model 12;

one of the folloNinl c3.rj units:

an IBM 2560 Multi-Function Card Machine
Model 1\2;

IBM 2520 C3.rj Re~d-Punch Mojel Al,
IB~ 2520 Card Punch Model A.2 or A3,
IB~ 2560 ~ulti-Function :ard Machine
Mojel Al;

an IBM 2203 Printer Mojel A2.

one of the folloNing printers:
An IBM 2020 Centr~l Pro8essin~ Unit Model
C5 for the TPS (8,192 bytes of main
storage), or BC5 for the DPS (12,288 bytes
of main storage);

IBM 1403 Printer Model Nl, 2, or 7,
2203 Printer Model 1\1;

IB~

one of the followinl
readers:

an IBM 2415 Magnetic r~pe Unit Model 2 or 5
(with at least one 9-track drive) for the
TPS, or

IBM 1419
1 or 31,

an IBM 2311 Disk storage Drive Model 11 or
12 for the DPS;

IBM 1259 M~gneti8
1, 31, or 32;

one of the following carj reading devices:

an

IB~

M~gneti8

ma~netic

character

Char3.cter Reajer Model
Ch3.r~cter

Reader Mojel

2152 Printer-Keyboard.
Ap?endix K

153

an IBM 2501
An IBM 2020 Central processing Unit M~del
D4 <16,384 bytes of main storage}; with or
without IBM Binary Synchronous Comnunications Adapter, Fe~ture No. 2074;

C~rj

Re~der

Model

~1

or

~2;

an IBM 1442 Card Punch Model 5;
one of the

follo~ing

card units:

two IBM 2311 Disk storage Drives Model 12;

IBM 2520 Card Read-punch M~del ~1,
IBM 2520 C~rj Punch Mojel A2 or A3,
IB~ 2560 ~ulti-Function 2ard Machine
Mojel Al:

an IBM 2560 Multi-Function Card Machine
Model ~2;
an IBM 2203 Printer Model

~2.

one of the

an IBM 2152 Printer-Keyboard.

printers:

IB~ 1403 Printer Mojel N1, 2, or 7,
IBM 2203 Printer Model A1;

~~2~Qg~b_~

An IBM 2020 Central Processing unit Model
E5 (32,768 bytes of main storage); with or
without IBM Binary Synchronous Comnunications ~dapterr Feature No. 2074;
four IBM 2311 Disk
~r 12:

follo~ing

Stor~ge

Drives

M~del

an IBM 2415 Magnetic rape Unit Modell
through 6;

11

one of the
readers;

follo~ing

magnetic

chara~ter

IB~ 1419 ~agnetic 2haracter Reader
1 or 31,
IB~ 1259 ~agnetic 2haracter Reader
1, 31, or 32;

an IBM 2152 Printer-Keyboarj.

M~jel

~~del

Appendix L. Hexadecimal-Decimal Number Conversion Table

The table in this appendix provides for direct ccnversion of decinal and
bers between 0000 and 4095 (hexadecinal 000 and FFF).
For numbers outside the range of the table, add the following
figures:
Hexadecimal

--1000----

Hexadecimal

Decim~l

t~ble

-3686440960
45056
49152
53248
57344
61440

A..OOO
BOOO
cOOO
0000
EOOO
FOOO

8192
12288
16384
20480
24576
28672
32768

2000
3000
4000
5000
6000
7000
8000

to the

nun-

Decimal

---9000----

-4096-

v~lues

hex~decin~l

0

1

2

3

4

5

6

7

8

9

8

C

D

00
01
02
03

0000
0016
0032
0048

0001
0017
0033
0049

0002
0018
0034
0050

0003
0019
0035
0051

0004
0020
0036
0052

0005
0021
0037
0053

0006
0022
0038
0054

0007
0023
0039
0055

0008
0024
0040
0056

0009
0025
0041
0057

0010
0026
0042
0058

0011
0027
0043
0059

0012
0028
0044
0060

0013
0029
0045
0061

0014
0030
0046
0062

04
05
06
07

0064
0080
0096
0112

0065
0081
0097
0113

0066
0082
0098
0114

0067
0083
0099
0115

0068
0084
0100
0116

0069
0085
0101
0117

0070
0086
0102
0118

0071
0087
0103
0119

0072
0088
0104
0120

0073
0089
0105
0121

0074
0090
0106
0122

0075
0091
0107
0123

0076
0092
0108
0124

0077
0093
0109
0125

0078 0079

08
09
oA..
OB

0128
0144
0160
0176

0129
0145
0161
0177

0130
0146
0162
0178

0131
0147
0163
0179

0132
0148
0164
0180

0133
0149
0165
0181

0134
0150
G166
0182

0135
0151
0167
0183

0136
0152
0168
0184

0137
0153
0169
0185

0138
0154
0170
0186

0139
0155
0171
0187

0140
0156
0172
0188

0141
0157
0173
0189

0174 0175
0190 0191

OC
OD
OE
OF

0192
0208
0224
0240

0193
0209
0225
0241

0194
0210
0226
0242

0195
0211
0227
0243

0196
0212
0228
0244

0197
0213
0229
0245

0198
0214
0230
0246

0199
0215
0231
0247

0200
0216
0232
0248

0201
0217
0233
0249

0202
0218
0234
0250

0203
0219
0235
0251

0204
0220
0236
0252

0205
0221
0237
0253

0206
0222
0238
0254

0207
0223
0239
0255

10
11
12
13

0256
0272
0288
0304

0257
0273
0289
0305

0258
0274
0290
0306

0259
0275
0291
0307

0260
0276
0292
0308

0261
0277
0293
0309

0262
0278
0294
0310

0263
0279
0295
0311

0264
0280
0296
0312

0265
0281
0297
0313

0266
0282
0298
0314

0267
0283
0299
0315

0268
0284
0300
0316

0269
0285
0301
0317

0270
0286
0302
0318

0271
0287
0303
0319

14
15
16
17

0320
0336
0352
0368

0321
0337
0353
0369

0322
0338
0354
0370

0323
0339
0355
0371

0324
0340
0356
0372

0325
0341
0357
0373

0326
0342
0358
0374

0327
0343
0359
0375

0328
0344
0360
0376

0329
0345
0361
0377

0330
0346
0362
0378

0331
0347
0363
0379

0332
0348
0364
0380

0333
0349
0365
0381

18
19
lA
18

0384
0400
0416
0432

0385
0401
0417
0433

0386
0402
0418
0434

0387
0403
0419
0435

0388
0404
0420
0436

0389
0405
0421
0437

0390
0406
0422
0438

0391
0407
0423
0439

0392
0408
0424
0440

0393
0409
0425
0441

0394
0410
0426
0442

0395
0411
0427
0443

0396
0412
0428
0444

0397
0413
0429
0445

0398 0399
0414 0415
3430 0431
0446 0447

lC
lD
lE
lF

0448
0464
0480
0496

0449
0465
0481
0497

0450
0466
0482
0498

0451
0467
0483
0499

0452
0468
0484
0500

0453
0469
0485
0501

0454
0470
0486
0502

0455
0471
0487
0503

0456
0472
0488
0504

0457
0473
0489
0505

0458
0474
0490
0506

0459
0475
0491
0507

0460
0476
0492
0508

0461
0477
0493
0509

3462
0478
0494
0510

0015
0031
0047
0063

0094 0095
0110 0111

0126 0127
0142 0143
0158 0159

0334 0335
0350 0351

0366 0367
0382 0383

0463
0479
0495
0511

. AppendiK L

155

o

1

2

3

4

5

6

7

8

9

20
21
22
23

0512
0528
0544
0560

0513
0529
0545
0561

0514
0530
0546
0562

0515
0531
0547
0563

0516
0532
0548
0564

0517
0533
0549
0565

0518
0534
0550
0566

0519
0535
0551
0567

0520
0536
0552
0568

0521
0537
0553
0569

0522
0538
0554
0570

0523
0539
0555
0571

0524
0540
0556
0572

0525 0526 0527
0541 0542 0543
0557 ~558 0559
0573 ('1'::"71. 0575

24
25
26
27

0576
0592
0608
0624

0577
0593
0609
0625

0578
0594
0610
0626

0579
0595
0611
0627

0580
0596
0612
0628

0581
0597
0613
0629

0582
0598
0614
0630

0583
0599
0615
0631

0584
0600
0616
0632

0585
0601
0617
0633

0586
0602
0618
0634

0587
0603
0619
0635

0588
0604
0620
0636

0589 0590 0591
0605 0606 0607
0621 0622 0623
0637 ~638 0639

28
29
2B

0640
0656
0672
0688

0641 0642 0643 0644 0645
0657 0658 0659 0660 0661
0673 0674 0675 0676 0677
0689 0~90 0691 0692 0693

0646
0662
0678
0694

0647
0663
0679
0695

0648
0664
0680
0696

0649
0665
0681
0697

0650
0666
0682
0698

0651
0667
0683
0699

0652
0668
0684
0700

0653
0669
0685
0701

0654
0670
0686
0702

0655
0671
0687
0703

2C
2D
2E
2F

0704
0720
0736
0752

0705
0721
0737
0753

0706
0722
0738
0754

0107
0723
0739
0755

0708
0724
0740
0756

0709
0725
0741
0757

0710
0726
0742
0758

0711
0727
0743
0759

0712
0728
0744
0760

0713
0729
0745
0761

0714
0730
0746
0762

0715
0731
0747
0763

0716
0732
0748
0764

0717
0733
0749
0765

0718
)734
0750
0766

0719
0735
0751
0767

30
31
32
33

0768
0784
0800
0816

0769
0785
0801
0817

0770
0786
0802
0818

0771
0787
0803
0819

0772
0788
0804
0820

07]3
0789
0805
0821

0774
0790
0806
0822

0775
0791
0807
0823

0776
0792
0808
0824

0777
0793
0809
0825

0778
0794
0810
0826

0779
0795
0811
0827

0780
0796
0812
0828

0781 0782 0783
0797 0798 0799
0813 0814 0815
0829 ~830 0831

34
35
36
37

0832
0848
0864
0880

0833
0849
0865
0881

0834
0850
0866
0882

0835
0851
0867
0883

0836
0852
0868
0884

0837
0853
0869
0885

0838
0854
0870
0886

0839
0855
0871
0887

0840
0856
0872
0888

0841
0857
0873
0889

0842
0858
0874
0890

0843
0859
0875
0891

0844
0860
0876
0892

0845
0861
0877
0893

0846
0862
0878
0894

38
39
3A
38

0896
0912
0928
0944

0897
0913
0929
0945

0898
0914
0930
0946

0899
0915
0931
0947

0900
0916
0912
0948

0901
0917
0933
0949

0902
0918
0934
0950

0903
0919
0935
0951

0904
0920
0936
0952

0905
0921
0937
0953

0906
0922
0938
0954

0907
0923
0939
0955

0908
0924
0940
0956

0909
0925
0941
0957

3910 0911
0926 0927

3C
3D
3E
3F

0960
0976
0992
1008

0961
0977
0993
1009

0962
0978
0994
1010

0963
0979
0995
1011

0964
0980
0996
1012

0965
0981
0997
1013

0966
0982
0998
1014

0967
0983
0999
1015

0968
0984
1000
1016

0969
0985
1001
1017

0970
0986
1002
1018

0971
0987
1003
1019

0972
0988
1004
1020

0973
0989
1005
1021

0974
0990
1006
1022

0975
0991
1007
1023

40
41
42
43

1024
1040
1056
1072

1025
1041
1057
1073

1026
1042
1058
1074

1027
1043
1059
1075

1028
1044
1060
1076

1029
1045
1061
1077

1030
1046
1062
1078

1031
1047
1063
1079

1032
1048
1064
1080

1033
1049
1065
1081

1034
1050
1066
1082

1035
1051
1067
1083

1036
1052
1068
1084

1037
1053
1069
1085

1038
1054
1070
1086

1039
1055
1071
1087

44
45
46
47

1088
1104
1120
1136

1089
1105
1121
1137

1090
1106
1122
1138

1091
1107
1123
1139

1092
1108
1124
1140

1093
1109
1125
1141

1094
1110
1126
1142

1095
1111
1127
1143

1096
1112
1128
1144

1097
1113
1129
1145

1098
1114
1130
1146

1099
1115
1131
1147

1100
1116
1132
1148

1101
1117
1133
1149

1102
1118
1134
1150

1103
1119
1135
1151

48
49
48

1152
1168
1184
1200

1153
1169
1185
1201

1154
1170
1186
1202

1155
1171
1187
1203

1156
1172
1188
1204

1157
1173
1189
1205

1158
1174
1190
1206

1159
1175
1191
1207

1160
1176
1192
1208

1161
1177
1193
1209

1162
1178
1194
1210

1163
1179
1195
1211

1164
1180
1196
1212

1165
1181
1197
1213

1166
1182
1198
1214

1167
1183
1199
1215

42
4D
4E
4F

1216
1232
1248
1264

1217
1233
1249
1265

1218
1234
1250
1266

1219
1235
1251
1267

1220
1236
1252
1268

1221
1237
1253
1269

1222
1238
1254
1270

1223
1239
1255
1271

1224
1240
1256
1272

1225
1241
1257
1273

1226
1242
1258
1274

1227
1243
1259
1275

1228
1244
1260
1276

1229
1245
1261
1277

1230
1246
1262
1278

1231
1247
1263
1279

2~

4~

156

D

8

E

V..JI""'T

0847
0863
0879
0895

0942 0943

0958 0959

o

1

2

3

4

5

6

7

8

9

50
51
52
53

1280
1296
1312
1328

1281
1297
1313
1329

1282
1298
1314
1330

1283
1299
1315
1331

1284
1300
1316
1332

1285
1301
1317
1333

1286
1302
1318
1334

1287
1303
1319
1335

1288
1304
1320
1336

1289
1305
1321
1337

54
55
56
57

1344
1360
1376
1392

1345
1361
1377
1393

1346
1362
1378
1394

1347
1363
1379
1395

1348
1364
1380
1396

1349
1365
1381
1397

1350
1366
1382
1398

1351
1367
1383
1399

1352
1368
1384
1400

58
59
5A
5B

1408
1424
144.0
1456

1409
1425
1441
1457

1410
1426
1442
1458

1411
1427
1443
1459

1412
1428
1444
1460

1413
1429
1445
1461

1414
1430
1446
1462

1415
1431
1447
1463

5C
5D
5E
5F

1472
1488
1504
1520

1473
1489
1505
1521

1474
1490
1506
1522

1475
1491
1507
1523

1476
1492
1508
1524

1477
1493
1509
1525

1478
1494
1510
1526

60
61
62
63

1536
1552
1568
1584

1537
1553
1569
1585

1538
1554
1570
1586

1539
1555
1571
1587

1540
1556
1572
1588

1541
1557
1573
1589

64
65
66
67

1600
1616
1632
1648

1601
1617
1633
1649

1602
1618
1634
1650

1603
1619
1635
1651

1604
1620
1636
1652

68
69
6A.
6B

1664
1680
1696
1712

1665
1681
1697
1713

1666
1682
1698
1714

1667
1683
1699
1715

6C
6D
6E
6F

1728
1744
1760
1776

1729
1745
1761
1777

1730
1746
1762
1778

70
71
72
73

1792
1808
1824
1840

1,793
1809
1825
1841

74
75
76
77

1856
1872
1888
1904

78
79
7A
78
7C
7D
7E
7F

B

c

1290
1306
1322
1338

1291
1307
1323
1339

1292
1308
1324
1340

1293
1309
1325
i341

1294
1310
1326
1342

1295
1311
1327
1343

1353
1369
1385
1401

1354
1370
1386
1402

1355
1371
1387
1403

1356
1372
1388
1404

1357
1373
1389
1405

1358
1374
1390
1406

1359
1375
1391
1407

1416
1432
1448
1464

1417
1433
1449
1465

1418
1434
1450
1466

1419
1435
1451
1467

1420
1436
1452
1468

1421
1437
1453
1469

1422
1438
1454
1470

1423
1439
1455
1471

1479
1495
1511
1527

1480
1496
1512
1528

1481
1497
1513
1529

1482
1498
1514
1530

1483
1499
1515
1531

1484
1500
1516
1532

1485
1501
1517
1533

1486
1502
1518
1534

1487
1503
1519
1535

1542
1558
1574
1590

1543
1559
1575
1591

1544
1560
1576
1592

1545
1561
1577
1593

1546
1562
1578
1594

1547
1563
1579
1595

1548
1564
1580
1596

1549
1565
1581
1597

1550
1566
1582
1598

1551
1567
1583
1599

1605
1621
1637
1653

1606
1622
1638
1654

1607
1623
1639
1655

1608
1624
1640
1656

1609
1625
1641
1657

1610
1626
1642
1658

1611
1627
1643
1659

1612
1628
1644
1660

1613
1629
1645
1661

1614
1630
1646
1662

1615
1631
1647
1663

1668
1684
1700
1716

1669
1685
1701
1717

1670
1686
1702
1718

1671
1687
1703
1719

1672
1688
1704
1720

1673
1689
1705
1721

1674
1690
1706
1722

1675
1691
1707
1723

1676
1692
1708
1724

1677
1693
1709
1725

1678
1694
1710
1726

1679
1695
1711
1727

1731
1747
1763
1779

1732
1748
1764
1780

1733
1749
1765
1781

1734
1750
1766
1782

1735
1751
1767
1783

1736
1752
1768
1784

1737
1753
1769
1785

1738
1754
1770
1786

1739
1755
1771
1787

1740
1756
1772
1788

1741
1757
1773
1789

1742
1758
1774
1790

1743
1759
1775
1791

1794
1810
1826
1842

1795
1811
1827
1843

1796
1812
1828
1844

1797
1813
1829
1845

1798
1814
1830
1846

1799
1815
1831
1847

1800
1816
1832
1848

1801
1817
1833
1849

1802
1818
1834
1850

1803
1819
1835
1851

1804
1820
1836
1852

1805
1821
1837
1853

1806
1822
1838
1854

1807
1823
1839
1855

1857
1873
1889
1905

1858
1874
1890
1906

1859
1875
1891
1907

1860
1876
1892
1908

1861
1877
1893
1909

1862
1878
1894
1910

1863
1879
1895
1911

1864
1880
1896
1912

1865
1881
1897
1913

1866
1882
1898
1914

1867
1883
1899
1915

1868
1884
1900
1916

1869
1885
1901
1917

1870
1886
1902
1918

1871
1887
1903
1919

1920
1936
1952
1968

1921
1937
1953
1969

1922
1938
1954
1970

1923
1939
1955
1971

1924
1940
1956
1972

1925
1941
1957
1973

1926
1942
1958
1974

1927
1943
1959
1975

1928
1944
1960
1976

1929
1945
1961
1977

1930
1946
1962
1978

1931
1947
1963
1979

1932
1948
1964
1980

1933
1949
1965
1981

1934
1950
1966
1982

1935
1951
1967
1983

1984
2000
2016
2032

1985
2001
2017
2033

1986
2002
2018
2034

1987
2003
2019
2035

1988
2004
2020
2036

1989
2005
2021
2037

1990
2006
2022
2038

1991
2007
2023
2039

1992
2008
2024
2040

1993
2009
2025
2041

1994
2010
2026
2042

1995
2011
2027
2043

1996
2012
2028
2044

1997
2013
2029
2045

1998
2014
2030
2046

1999
2015
2031
2047

E

ApP2n:iix: L

157

o

1

2

3

4

5

6

7

8

9

80
81
82
83

20q8
2064
2080
2096

20Q9
2065
2081
2097

2050
2066
2082
2098

2051
2067
2083
2099

2052
2068
2084
2100

2053
2069
2085
2101

2054
2070
2086
2102

2055
2071
2087
2103

2056
2072
2088
2104

2057
2073
2089
2105

2058
2074
2090
2106

2059
2075
2091
2107

84
85
86
87

2112
2128
i144
2160

2113
2129
2145
2161

2114
2130
2146
2162

2115 2116 2117
2131 2132 2133
21~7 2148 2149
2163 2164 2165

2118
2134
2150
2166

2119
2135
2151
2167

2120
2136
2152
2168

2121
2137
2153
2169

2122
2138
2154
2110

2123 2124 2125 2126 2127
2139 21~0 2141 2142 2143
2155 2156 2157 2158 2159
2171 2112 2173 2174 2175

88
89
8A
8B

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

2181
2203
2219
2235

2188
2204
2220
2236

2189
2205
2221
2237

2190
2206
2222
2238

2191
2201
2223
2239

8C
80
8E
8F

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

90
91
92
93

2304
2320
2336
2352

2305
2321
2337
2353

2306
2322
2338
2354

2307
2323
2339
2355

2308
2324
2340
2356

2309
2325
2341
2357

2310
2326
2342
2358

2311
2327
2343
2359

2312
2328
2344
2360

2313
2329
2345
2361

2314
2330
2346
2362

2315
2331
2347
2363

2316
2332
2348
2364

2317
2333
2349
2365

2318
2334
2350
2366

2319
2335
2351
2361

94
95
96
97

2368
2384
2400
2416

2369
2385
2401
2417

2370
2386
2402
2418

2371
2387
2403
2419

2372
2388
2404
2420

2373
2389
2405
2421

2374
2390
2406
2422

2375
2391
2407
2423

2376
2392
2408
2424

2377
2393
2409
2425

2378
2394
2410
2426

2379
2395
2411
2427

2380
2396
2412
2428

2381
2397
2413
2429

2382
2398
2414
2430

2383
2399
2415
2431

98
99
9A
9B

2432
2448
2464
2480

2433
2449
2465
2481

2434
2450
2466
2482

2435
2451
2467
2483

2436
2452
2468
2484

2437
2453
2469
2485

2438
2454
2470
2486

2439
2455
2471
2487

2440
2456
2472
2488

2441
2457
2473
2489

2442
2458
2474
2490

2443
2459
2475
2491

2444
2460
2476
2492

2445
2461
2477
2493

2Q46
2462
2478
2494

2447
2463
2479
2495

9:
9D
9E
9F

2496
2512
2528
2544

2497
2513
2529
2545

2498
2514
2530
2546

2499
2515
2531
2547

2500
2516
2532
2548

2501
2517
2533
2549

2502
2518
2534
2550

2503
2519
2535
2551

2504
2520
2536
2552

2505
2521
2537
2553

2506
2522
2538
2554

2507
2523
2539
2555

2508
2524
2540
2556

2509
2525
2541
2557

2510
2526
2542
2558

2511
2527
2543
2559

AO
A1
A2
A3

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

2561
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

A4
A5
A6
A7

2624
2640
2656
2672

2625
2641
2657
2673

2626
2642
2658
2674

2627
2643
2659
2675

2628
2644
2660
2676

2629
2645
2661
2671

2630
2646
2662
2678

2631
2647
2663
2679

2632
2648
2664
2680

2633
2649
2665
2681

2634
2650
2666
2682

2635
2651
2667
2683

2636
2652
2668
2684

2637
2653
2669
2685

2638
2634
2670
2686

2639
2655
2671
2687

A8
A9
AA
AB

2688
2704
2720
2736

2689
2705
2721
2737

2690
2706
2722
2738

2691
2707
2723
2739

2692
2708
2724
2740

2693
2709
2725
2741

2694
2710
2726
2742

2695
2711
2727
2743

2696
2712
2728
2744

2697
2713
2729
2745

2698
2714
2730
2746

2699
2715
2731
2747

2100
2716
2732
2748

2701
2717
2733
2749

2702
2718
2734
2750

2703
2719
2735
2751

AC
AD
AE
AF

2752
2768
2784
2800

2751
2769
2785
2801

2754
2770
2786
2802

2755
2771
2787
2803

2756
2772
2788
2804

2757
2773
2789
2805

2758
2774
2790
2806

2759
2775
2191
2807

2760
2776
2792
280R

2761
2777
2793
2809

2762
2778
2794
2810

2763
2779
2795
2811

2764
2780
2796
2812

2765
2781
2797
2813

2766
2782
2798
2814

2761
2783
2799
2815

B

2060
2076
2092
2108

D

E

2061
2077
2093
2109

2062
2078
2094
2110

2063
2079
2095
2111

B

C

o

E

F

2826
2842
2858
2874

2827
2843
2859
2875

2828
2844
2860
2876

2829
2845
2861
2877

2830
2846
2862
2878

2831
2847
2863
2879

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

2952
2968
2984
3000

2953
2969
2985
3001

2954
2970
2986
3002

2955
2971
2987
3003

2956
2972
2988
3004

2957
2973
2989
3005

2958
2974
2990
3006

2959
2975
2991
3007

3015
3031
3047
3063

3016
3032
3048
3064

3017
3033
3049
3065

3018
3034
3050
3066

3019
3035
3051
3067

3020
3036
3052
3068

3021
3037
3053
3069

3022
3038
3054
3070

3023
3039
3055
3071

3078
3094
3110
3126

3079
3095
3111
3127

3080
3096
3112
3128

3081
3097
3113
3129

3082
3098
3114
3130

3083
3099
3115
3131

3084
3100
3116
3132

3085
3101
3117
3133

3086
3102
3118
3134

3087
3103
3119
3135

3141
3157
3173
3189

3142
3158
3174
3190

3143
3159
3175
3191

3144
3160
3176
3192

3145
3161
3177
3193

3146
3162
3178
3194

3147
3163
3179
3195

3148
3164
3180
3196

3149
3165
3181
3197

3150
3166
3182
3198

3151
3161
3183
3199

3204
3220
3236
3252

3205
3221
3237
3253

3206
3222
3238
3254

3207
3223
3239
3255

3208
3224
3240
3256

3209
3225
3241
3257

3210
3226
3242
3258

3211
3227
3243
3259

3212
-3228
3244
3260

3213
3229
3245
3261

3214
3230
3246
3262

3215
3231
3247
3263

3267
3283
3299
3315

3268
3284
3300
3316

3269
3285
3301
3317

3270
3286
3302
3318

3271
3287
3303
3319

3272
3288
3304
3320

3273
3289
3305
3321

3274
3290
3306
3322

3275
3291
3307
3323

3276
3292
3308
3324

3277
3293
3309
3325

3278
3294
3310
3326

3279
3295
3311
3321

3330
3346
3362
3378

3331
3347
3363
3379

3332
3348
3364
3380

3333
3349
3365
3381

3334
3350
3366
3382

3335
3351
3367
3383

3336
3352
3368
3384

3337
3353
3369
3385

3338
3354
3370
3386

3339
3355
3371
3387

3340
3356
3372
3388

3341
3357
3373
3389

3342
3358
3374
3390

3343
3359
3375
3391

3393
3409
3425
3441

3394
3410
3426
3442

3395
3411
3427
3443

3396
3412
3428
3444

3397
3413
3429
3445

3398
3414
3430
3446

3399
3415
3431
3447

3400
3416
3432
3448

3401
3417
3433
3449

3402
3418
3434
3450

3403
3419
3435
3451

3404
3420
3436
3452

3405
3421
3437
3453

3406
3422
3438
3454

3407
3423
3439
3455

3456
3472
3488
3504

3457
3473
3489
3505

3458
3474
3490
3506

3459
3475
3491
3507

3460
3476
3492
3508

3461
3477
3493
3509

3462
3478
3494
3510

3463
3479
3495
3511

3464
3480
3496
3512

3465
3481
3497
3513

3466
3482
3498
3514

3467
3483
3499
3515

3468
3484
3500
3516

3469
3485
3501
3517

3470
3486
3502
3518

3471
3487
3503
3519

3520
3536
3552
3568

3521
3537
3553
3569

3522
3538
3554
3570

3523
3539
3555
3571

3524
3540
3556
3572

3525
3541
3557
3573

3526
3542
3558
3574

3527
3543
3559
3575

3528
3544
3560
3576

3529
3545
3561
3577

3530
3546
3562
3578

3531
3547
3563
3579

3532
3548
3564
3580

3533
3549
3565
3581

3534
3550
3566
3582

3535
3551
3561
3583

o

1

2

3

4

5

6

7

8

9

BO
Bl
B2
B3

2816
2832
2848
2864

2817
2833
2849
2865

2818
2834
2850
2866

2819
2835
2851
2867

2820
2836
2852
2868

2821
2837
2853
2869

2822
2838
2854
2870

2823
2839
2855
2871

2824
2840
2856
2872

2825
2841
2857
2873

B4
B5
B6
B7

2880
2896
2912
2928

2881
2897
2913
2929

28 8 4
2898
2914
2930

2883
2899
2915
2931

2884
2900
2916
2932

2885
2901
2917
2933

2886
2902
2918
2934

2887
2903
2919
2935

2888
2904
2920
2936

B8
B9
BA
BB

2944
2960
2976
2992

2945
2961
2977
2993

2946
2962
2978
2994

2947
2963
2979
2995

2948
2964
2980
2996

2949
2965
2981
2997

2950
2966
2982
2998

2951
2967
2983
2999

BC
BD
BE
BF

3008
302L1
3040
3056

3009
3025
3041
3057

3010
3026
3042
3058

3011
3027
3043
3059

3012
3028
3044
3060

3013
3029
3045
3061

3014
3030
3046
3062

CO
Cl
C2
C3

3072
3088
3104
3120

3073
3089
3105
3121

3074
3090
3106
3122

3075
3091
3107
3123

3076
3092
3108
3124

3077
3093
3109
3125

C4
C5
C6
C7

3136
3152
3168
3184

3137
3153
3169
3185

3138
3154
3170
3186

3139
3155
3171
3187

3140
3156
3172
3188

C8
C9
CA
CB

3200
3216
3232
3248

3201
3217
3233
3249

3202
3218
3234
3250

3203
3219
3235
3251

CC
CD
CE
CF

3264
3280
3296
3312

3265
3281
3297
3313

3266
3282
3298
3314

DO
Dl
D2
03

3328
3344
3360
3376

3329
3345
3361
3377

04
D5
06
D7

3392
3408
3424
3440

D8
D9
DA
DB
DC
DD
DE
OF

Ap?endh:: L

159

o

1

2

3

4

5

6

7

8

9

A

B

EO
E1
E2
E3

3584
3600
3616
3632

3585
3601
3617
3633

3586
3602
3618
3634

3587
3603
3619
3635

3588
3604
3620
3636

3589
3605
3621
3637

3590
3606
3622
3638

3591
3607
3623
3639

3592
3608
3624
3640

3593
3609
3625
3641

3594
3610
3626
3642

3595
3611
3627
3643

3596
3612
3628
3644

3597
3613
3629
3645

3598
3614
3630
3646

3599
3615
3631
3647

E4
E5
E6
E7

3648
3664
3680
3696

3649
3665
3681
3697

3650
3666
3682
3698

3651
3667
3683
3699

3652
3668
3684
3700

3653
3669
3685
3701

3654
3670
3686
3702

3655
3671
3687
3703

3656
3672
3688
3704

3657
3673
3689
3705

3658
3674
3690
3106

3659
3675
369i
3107

3660
3676
3692
3108

3661
3677
3693
3709

3662
3678
3694
3710

3663
3679
3695
3711

E8
E9
EB

3712
3728
3744
3760

3713
3729
3745
3761

3714
3730
3746
3762

3715
3731
3747
3763

3716
3732
3748
3764

3717
3733
3749
3765

3718
3734
3750
3766

3719
3735
3751
3767

3720
3736
3752
3768

3721
3737
3753
3769

3722
3738
3754
3770

3723
3739
3755
3771

3724
3740
3756
3772

3725
3741
3757
3773

3726
3742
3756
3774

3727
3743
3759
3775

EC
ED
EE
EF

3776
3792
3808
3824

3777
3793
3809
3825

3778
3794
3810
3826

3779
3795
3811
3827

3780
3796
3812
2828

3781
3797
3813
3829

3782
3798
3814
3830

3783
3799
3815
3831

3784
3800
3816
3832

3785
3801
3811
3833

3786
3802
3818
3834

3787
3803
3819
3835

3788
3804
3820
3836

3789
3805
3821
3837

3790
3806
3822
3838

3791
3807
3823
3839

FO
F1
F2
F3

3840
3856
3872
3888

3841
3857
3873
3889

3842
3858
3874
3890

3843
3859
3875
3891

3844
3860
3876
3892

3845
3861
3877
3893

3846
3862
3878
3894

3847
3863
3879
3895

3848
3864
3880
3896

3849
3865
3881
3891

3850
3866
3882
3898

3851
3867
3883
3899

3852
3868
3884
3900

3853
3869
3885
3901

3854
3870
3886
3902

3855
3871
3887
3903

F4
F5
F6
F7

3904
3920
3936
3952

3905
3921
3937
3953

3906
3922
3938
3954

3907
3923
3939
3955

3908
3924
3940
3956

3909
3925
3941
3957

3910
3926
3942
3958

3911
3927
3943
3959

3912
3928
3944
3960

3913
3929
3945
3961

3914
3930
3946
3962

3915
3931
3947
3963

3916
3932
3948
3964

3917
3933
3949
3965

3918
3934
3950
3966

3919
3935
3951
3967

F8
F9
FA
FB

3968
3984
4000
4016

3969
3985
4001
4017

3970
3986
4002
4018

3971
3987
4003
4019

3972
3988
4004
4020

3973
3989
4005
4021

3974
3990
4006
4022

3975
3991
4007
4023

3976
3992
4008
4024

3977
3993
4009
4025

3978
3994
4010
4026

3979
3995
4011
4027

3980
3996
4012
4028

3981
3997
4013
4029

3982
3998
4014
4030

3983
3999
4015
4031

FC
FD
FE
FF

4032
4048
4064
4080

4033
4049
4065
4081

4034
4050
4066
4082

4035
4051
4067
4083

4036
4052
4068
4084

4037
4053
U069
4085

4038
4054
U070
4086

4039
4055
4011
4087

4040
4056
4072
4088

4041
4057
4073
4089

4042
4058
4074
4090

4043
4059
4075
4091

4044
4060
4076
4092

4045
4061
4077
4093

4046
4062
4078
4094

4047
4063
4079
4095

E~

160

D

Appendix M. Sample Programs

DPS Assembler Language Program

r---------------r-------------------------,
IPrint PositionslContents of Print Field I

The purpose of this sample program is to
give a short demonstration of the application of the Assembler language.

.---------------+-------------------------~
I
11
19
ICARD T~PE
I
I
21
IType (~,B or ~)
I
I
26 - 45
IArithmetic Operation
I
I
49
I Equal Sign
I
I
52 - 60
I Re s u1 t
I

Q~~gfie~iQn_Qf_~h~_~fQ~f~~

The program reads data carjs from tne 2501
Card Reader.
Only the first 13 columns of
each card are read.
Input-card format is
as follows:

r-------T---------------------------------l
Columnl~ontents
I

I

~-------+--------------~------------------~
I 1
I~,B or C (card~type indication)
I
~-------+---------------------------------~
1 2 - 4 la 3-digit. positive decimal
I
I
I number (Field1)
I
~-------+---------------------------------~
I 5 - 7 la 3-digit, positive decimal
I
I
I number (Field2)
I
~-------+-~-------------------------------~
I 8 - 10ta 3-digit, positive decimal
I
I
I number ,(Field3)
I
r-------+---------------------------------~
111 - 131 a 3-digit. positive decimal
I
I _______ I _________________________________
number (Field4)
L
JI
~

The program first checks the input cards
for correct format.
If anyone of the
columns does not contain a decimal digit,
the program halts and displays the number
and digit in error by executing an HPR
instruction.
(Refer to the halt routines
in part 11 of Figure 19). rhen the next
card is read in.
If the data is correct~ the desired calculations are carried out.
The calculations vary depending on the type of card as
designated in column 1:

L _______________ 4 __ - - - - - - - - - - - - - - - - - - - - - __ J

The program consists of two separate control sections, PART1 and PART2. The first
section# PARTl (see parts 2 and 3 of rigure
19), contains all the input/out?ut (IOCS)
routines. These routines consist of the
instructions required to read the data
cards (READ) and to print the results
(PRINT). The IOCS routines will not be
discussed in detail here. For further
information, refer to the SRL ?ublication
I~~_~~~~~~~l~Q_~Q~~l_~QL_Q~~~_~rQ~r~~~i~~
~y~~~~L_!n2~~~Q~~E~t-~QQ~fQl_~~~~~~,

3224-9007.

Form

The second section, PART2 (see part 6 of
Figure 19), contains a nunber of small routines that test the contents of the cards
and perform the desired calculation3.
These routines, which nake up the nain ?rogram, are quite similar to each other.
Compare, for example, the routines beginning with the names TSTRI20L, rSTMI~OL,
TSTLECOL an1 TRICOL, TMICOL, TLECOL (parts
7 and 8 of Figure 19). Although the source
code is different for each of these routines~ the Assembler produces the sane
object code.
This is demonstrated even
more clearly by the statements 0202, 0234
and 0264, which read as follows:
0202:
0234:
0264:

01
01
01

59(PRINTRG),X'FO'
DPRINTAR+59,B'111100~O'

RESZ-L'RESZ-1,2'O'

r----T------------------------------------,

Here, both operands are expressed differently in each of the three source
instructions. HOwever, their object coje
is exactly the same.

As each calculation is performed, a line
of output is printed. The format of the
printed line is:

The two sections of the prograu, PART1 and
PART2, are assembled separately.
rhey are
brought together to form a single program
by means of the Linkage Editor Program.
Hence, the symbols which are connon to both
sections must be defined by ENTRY instructions in the section in which tney appear
as a name, and by EXTRN instructions in the
section in which they are referred to.

ITypel Arithmetic Operation
I
~----+------------------------------------~
1 A I Fieldl + Field2 - Field3 * Field4 I
~----+------------------------------------~
I B I Field1 - Field2 * Field3 + Field4 I
~----+------------------------------------1
IL ____
C 4I ____________________________________
Field1 * Field2 + Field3 - Field4 JI

Appendix M. Sample Prograns

161

If we take the name OPENF as an example.
we find that it is defined in the firstA.ssembly as
ENTRY OPENF
fhe address~ as shown in the External
Symbol Dictionary, is hexadecimal 017C.
In
the second A.ssembly~ this name is defined
as
EXTRN OPENF
In this assembly, the Assembler uses the
value of hexadecimal 0000 for OPENF.
'T'h~
Linkage Editor then inserts the actual
value.
This is the address from the ESD of
the first assembly, plus the relocation
factor. which can be found in the Linkage
Editor listing output in column REL-FR
(part 17 of Figure 19). fhus, the actual
address inserted by the Linkage Editor is
X'017C'
X'OOBE I
OPENF - X'OF3A'

ESD
relocation factor

(REL-FR)

=======
In addition to the ENfRY and ExrRN
instructions, the Link register (LINKRG),
which is used for branching between the
main program (PART2) and the IOCS routines
(PART1). must be defined in both sections.
The same register must be specified in each
section (in our case, register 13).
£Qll~fQb_§~~~g~~ll~~

The Job Control cards needed for the Linkage Editor run are produced before PART1
of the program. This is done by means of
REPRO statements at assembly time.
These
cards also include the PHASE card.
The
letter S following the phase name causes
the program to be loaded immediately behind
the Monitor at the time of program execution.
(Refer to the publication IBM

§Y§!~m~~&Q_~29~!_£QL_Q!§~~f2gf~~m!Dg_§y~=
~~~L_£Eg~rQl_~~g_§~f~i£g_~f2gf~~~,

Form

GC24-9006.
Since the four cards that are produced
by the Assembler come before the srARf card
in the source deck. they are also in front
of the ESD (External Symbol Dictionary)
cards in the object deck produced by the
Assembler.
Adgf~~!g~_!g_thg_~~!ll_~E2gf~~

In the main program (PART2) two base registers are used - BASERGl and BASERG2 - in
order to show you the use of the USING and
DROP instructions.
From BEGIN (statement 0052) to TYPEA
(statement 0090) the Assembler uses register 10 (BASERG1) as a base register and
assumes the base address BA.SEA11. In the
routine TYPEA, register 10 is still used as
162

the base register, but its contents
changed to the base ajjress B~SEA12.

~re

For routine TYPEB, the Assembler has
both base registers at its dis9Jsal, but
uses only one of them, BASERG2, because
this provides the snaller displ~cement.

!

.J...

.LI.-

Routine CEXPR~ uses BASERGl aqain
because BASERG2 has been nade unavail~ble
by means of a DROP instruction.
When using the DROP instruction, take

care that the register to be drJP~ej is no
longer needed in that routine.
Jtherwise,
an addressability error will ~ccur.
If the
register that has been dr~pped is re~uire1
again at a later point in the program, the
Assembler must be inforned of this by me~ns
of a further USI~G instruction.
In routine CEXPRB exactly this ha3 been
done; BASERG2 has been nade av~ilable
again.
Since this base register ~rJvides ~
smaller displacement, it is use1 by the
~ssembler until the end of the ?rog~~n,
with the exception of the instructions for
branching back to the GETCARD rJutine
(statements 308 - 310).
GEfC~RD was defined before the base
addresses BASEA12 and BASEA21.
rherefore
its address is lOwer than that cont~inej in
the two base register~ at this point.
Hence, BASERGl must be loaded with the
original base address BASEA11 before a
branch to GETCARD takes place.

Loading and re-loading of the b~se
registers Lakes place when the program 15
executed.
Both base registers ~re loaded
initially in the routine headed LOAD BASE
REGISTERS with the addresses BASEA11 ~nj
BASEA21, respectively.
The contents of
BASERG2 are not changed during the whole of
the program. On the other hand, BASERG1 is
loaded with the address BASEA12 in the
TYPEA routine and re-loaded with its
original value, BASEA11, in the B3~f:~R~
routine.

To address the card and print areas, the
registers CARDRG anj PRINfR3 (general
registers 12 and 1~)~ respectively, ~re
used.
The two areas can be utilizej either by
!~e!!£!~ addressing (specifying base and
displacement), as in the routine :EXPRA, or
by ~~£!~f~t addressing, as in the r~utines
CEXPRB and CEXPRC.
In the latter c~se the
areas are define1 in a Dummy :ontrol Section.
fhe Assembler is informe1 vi~ a
USING instruction that register CARJR3 is
used to ~ddress the first Dummy Control
Section (DeS1) and that register PRINfR3 is
used to address the secon~ Dummv :ontrol

section (OCS2). This is done at the beginning of the main program (statements 0056
and 0057). Of course, CA.RORG and PRINTRG
must be loaded Nhen the program is
executed.
EQff!!~ii!!lg:_ih~_!ns:!:f~£:!:!.on_Listi!lg:

To make the program listings more readable,
related instructions have been grou~ed into
routines and subroutines and spaced out
accordingly by using SPA.CE, EJECri and
TITLE cards. Compare the listing of the
source deck (Figure 20) with the assembly
listing (Figure 19) to see the effect of
the respective source statement.
For example. statements SP1 058 and SP2
087 in Figure 20 are not listed in Figure
19 but the ap~ropriate spacing was performed by the A.ssembler during execution.
Likewise. the TITLE statement of source
statement SP2 0~5 in Figure 20 is not
listed in the assembly listing but the
effect of the execution of this formatting
statement is obvious.
Look at Figure 19 part 5; the last statement listed is SP2 044. The first statement listed in Figure 19 part 6 is SP2 046.
The TITLE. statement caused a skip to the
next page with the new heading printed on
top of that page. A.n EJECr statement
causes a skip to the next page without
changing the heading. Compare statements
SP2 075 - SP2 077 in Figure 20 with the
same statements in Figure 19.

The Cross Reference List contains useful
information such as: the lengths of
storage areas; the address of a particular
symbol; the numbers of those statements
which refer to the symbol in question. The
information contained in the table is
listed under headings as follows:
SYMBOL:

Under this heading, the
A.ssembler lists, in alphabetical order" all symbols in
the program.

LEN:

In this column you can find the
appropriate length attribute of
the symbol,.

VALUE:

This column contains the hexadecimal value of each symbol.

DEF:

CROSS
REFERENCE:

This column shows the number of
the statement that defines the
particular symbol. You can
find this number under the
heading STMT of the instructi~n
listing
Under this heading, the

A.ssembler gives a list of the
state~ent numbers, in which the
symbol in question is referred
to. You can find these numbers
under the heading STMT ~f the
instruction listing.
Below are three examples to explain the
use of the Cross Reference List.
Let us assume you Nish to find
out from which points in the ~r~gran a
branch is made to the entry point BGETCA.RD
(statement 0308). To find this sy~b~l,
look down the column SYMBOL in the :ross
Reference List until you find BGETCARD.
The column DEF confirms that the symbol was
defined in statement 0308. N~w look under
CROSS REFERENCE. There you find that the
symbol was used in statements 0290 and
.0295.
Column LEN in the Cross Reference List
contains the number 4 for the symbol
BGETCARD. The A.ssembler has assigned B3ETCARD a length attribute of 4 because the
machine instruction at statement 0308 takes
up four bytes of main storage.
EX~Qle~.

The value X'02E6' for BGETCA.RD under
VA.LUE is the relative storage address of
the first byte of the machine instruction
at statement 0308.
Suppose you want to kno~ which
register is meant by BASERG2 (refer to
statement 0206) and where it is loaded.

ExamQb~£.

You look for BA.SERG2 in the colunn
SYMBOL of the Cross Reference List and find
in the column VALUE hexadecimal 0006. This
means that the sy~bol BA.SERG2 stands for
register 11.
The symbol is defined in statement 0026,
as you can find in colu~n DEF. Under
CROSS-REFERENCE you can find that the symbol is used in statements 0055, 0120, 0174
and 0206.
If you look up these statenents you Nill
find that register 11 is loaded by the
machine instruction at statement 0055.
ExamQb~~.
Statement 0263 uses symbol RESZ
as its first operand and RESP as its second
operand. Both operands use an im~lied
length. What lengths are inserted by the
A.ssembler?

Now look for RESZ under SYMBOL in the
Cross Reference List. rhe colunn LEN gives
a length attribute of 9 since the area.
defined by RESZ is nine bytes l~ng. Ne can
check this by looking at the statement in
which RESZ is defined, i.e., statenent
0375.
Similarly, we find that the symbol RESP
has a length attribute of 5.
A.ppendix M.

San~le Pr~grans

163

II LOG
II JOB I\SSEMB
I I DATE 70020

II ASSGN

SYSIPT,X'100',R~

2501

I I ASSGN SYSOPT,X'300',P2

"

ASSGN SYSGGD,X·a03·,D4

II VOL SYSOOO,WORK1
II DLAB 'SYSTEM/360 MOD 20 DPS
0001,61150,61150
II XTENr 1.000.0153000:0199009.'202020'.S~SOOO
II EXEC
MOD 20 DPS ASSEMBLER VERSION 03 MOD-LEVEL 02

1202020',P

c

EXrERNI\L SYMBOL DICr1ONI\RY
SYMBOL
PART1
~PEi~F

READ
PRINT
CLOSEF
CAROAR
PRINTAR
EOCF

TYPE 1D
SO
LD
LD
LD
LO
LD
LD

01

ER

02

Figure 19.

164

ADDR
0000

LENGTH LO 10
01F8

OiiC
0186

018E
0196
OlAF
01BC

DPS Sample

01
01
01
01
01
01

Program~

Part 1 of 17

SLE
LOCATN

ADD1 ADD2 STMT

SOURCE SrltrEMENr

SLE

ASSEMBLER SAMPLE, PARr 1, IOCS
OBJECT CODE

ADD1 ADD2 STMT

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
SYMBOLS
• DEFI1'lE E(URIES AND
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
ROUrINE
ENTRY OPENF

SPl
SPl
SP1
SPl
SPl
SP1
SP1
SPl
SP1
SPl
SP1
SP1

020
021
022
023
024
025
026
021
028
029
030
031

SP1
SPl
SP1
SPl
SP1

033
034
035
036
031

SP1
••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SP1
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SP1
SPl
•
SP1
SPl
•
::SP1
SP1
SP1
SPl
SPl
SPl

039
040
041
042
043
044
045
046
041
048
049
050

SPl
SPl
SP1
SP1
SP1
SPl

052
053
054
055
056
051

048

SP1
SPl
SP1
SPl
SP1
SP1

059
060
061
062
063
064

04~

EXTER1~AL

OPE[~

ENrRY
J:.NTRY
ENrRY
ENTRY
ENrRY

READ
PRINT
CLOSEF
CAR DAR
PRINrAR

ExrRN EOCF

READ ROUTH~E
PRINT RourINE
CLOSE ROUTINE
AREA ;.JHERE ·Ca.RD IS SrORI:.D
PRINr AREA
END OF CARD FILE

0035
0036
D~FINE rHE FILES
0031
0038
DON'r PRINr GENERArED srATE:o!ENrs
0039
PRINr NOGEN
0040
0041 READER
DTFSR TYPEFLE=INPur,BLKSIZE=i3,DEVICE=READ01,EOFa.DDR=EOCF,
IOAREA1=INAREA,OVERLAP=NO,wORKA=YES
0042
0092 •
0093 PRINrER DrFSR rYPEFLE=ourpur,wJRKA=YES,DEVICE=PRINrER,BLKSI~E=60
0132
0133
DTFEN

•

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

0184 07FD

0281
0282 •
OPEN rHE FILES
0283
0284 •
0285 OPENF
OPEN READER,PRINTE:R
0291
BR
LINKRG

018C 07FD

0293
0294
READ A CARD
0295
0296
0291 READ
GET
READER,C~RDAR
0302
LINKR~
BR

OPEN REA:lER AND PRItHER
RErURN

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
READ a. CARD AND
Ir ro

DPS

S~mple

002

SP1 016
SP1 011
SPl 018

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

Figure 19.

Pa.GE

DPS a.SSE:MB 03/02

0029
0030 •
SYMBOLIC REGISrER DEFINIrIONS
0031
0032 •
LINK-REGISrER
0033 LINKRG
EQU
13

0000

001
002
003
004
005
006
001
008
009
010
011
012
013
014

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
STARr 0
FIRsr PARr OF rHr sa.MPLE
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

0016
0011
0018
0019
0020
0021
0022
0023
0024
0025
0026 •
0021

011C
0186
018E
0196
OlAF
01BC

SP1
SPl
SPl
SPl
SPl
SP1
SPl
SPl
SPl
SPl
SPl
SPl
SPl
SPl

01/20/70
SOUKCE srArEMENr

0012
0013 P!!IRT1
0014

0000

001

JPS a.SSE:l4B 03/02

AoprN NOSYM
0001
0002 •
0003 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0004.
PHEPARE CONrROL CARDS FOR LINKAGE EDIrOR RUN
0005 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0006 •
0001
REPRO
I I JOB LNKEDr
0008
REPR'::>
I I ASSGN SYSJPT,UA
ourpur ONLY IN RELOCArABL£ a.RE~
0009
REPRO
I I EXEC
0010
REPRO
PH~SE SAMPLE,S,O
STARr Jusr BEHIND rHE ~OdlrJR

LOCATN

P~~E

01/20/70
OBJECT CODE

~OVE

RETURN

::~RDa.R

Pro3ram, Part 2 of 17
Appendix M. Sample Program3

165

01/20/70

ASSEMBLER SAMPLE, PART 1, IOCS

SLE
LOCAT~

OBJECT CODE

ADD1 ADD2 STMT
0304
0305
0306
0307
0308
0313

LIi'iKRG

0315 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0316 •
CLOSE THE FILES AND GO BACK ro MO~IrOR (E~D JF JOB)
0317 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0318
0319 CLOSEF
CLOSE; READER ANj PRI~T~K
CLOSE READER,PRINrER
-0325 ..
0326
PRINr GEN
PRItH GENERArED STATEME.ns
0327 •
,
0328
EOJ
GIVE CONTROL B4CK TO ~O~ITOR
15,194(0,0)
0329+
BC

•

019E 47FO 00C2

00C2

0331
0332
0333
033"
0335
0336
0337

01A2
OlAF
OlBC

0339

'NO

STATEMENT

Figure 19.

166

S~mple

SPl
SPl
SPl
SPl
SPl
SPl

066
067
068
069
070
071

SPl
SPl
SPl
3Pl
SPl
SPl
SPl
SPl
SPl
EO]

073
014
075
076
011
078
019
080
081
012 053

050

••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SFl 083
•
AREAS
SPl 084
•••••••• ++++++ ••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SPl 085

•

INAREA
CARi>AR
P~INTA.R

::>["L

DSDS
DS

13C
CL13
~L60

END

FLAGGED

DPS

003

DPS 4S3E;.tB 03/02

SOURCE SrArEMENr

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
PRINf A LINE
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
PRINT
PUT
PRINTER,PRINfAR
PRINT A LINE
DR

P~~E

ProJram, Part 3 of 17

INPUT AREA FOR IOCS
CARD IS- STJRED HERE
PRINT AREA

AFT~R

G~r

voo

SPl 081
SPl 088
SPl 089
SPl 091

055

RELOCArION

DICrIQN~Rr

POS.IO REL.IO FLGS AOOR
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01

01
01
02
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01
01

011
011
011
011
011
011
04
04
011
011
011
011
04
04
04
04
04
04
04
04
04
04
04
04
04
04
04
04

0000
0002
00011
0008
0010
00311
0046
0068
OOAC
OOCA
OOCE
0002
0006
00E2
0136
01SA
016C
0170
017E
01B2
017E
0182
0188
018A
0190
0192
0198
019C

END OF JOB
I I JOB ASSEMB
I I EXEC

SECOND ASSEMBLY

MOD 20 OPS ASSEMBLER VERSION 03

MOO-LEVEL 02

ExrERNAL SYMBOL DICrIQNARY
SYMBOL
PART 2
OPENF
READ
PRINT
CLOSEF
CARDAR
PRINTAR
EOCF

TYPE 10
SO
ER
ER
ER
ER
ER
ER

LD

Figure 19.

01
02
03
04
OS
06
07

AODR
0000

02EE

LENGrH LO 10
0318

01

DPS S3mple Pro;:Jram"

Part 4 of 17

Appen3ix M. Sample Programs

167

01/20/70

SLE
LOCATN

OBJECT eCCE

SOURCE

ADDl ADC2 STMT

SLE
LOCATN

~PS

Sr~TEMENr

01/20/70
DPS

SOURCE SrF!.rEMENr

ADDt ADD2 STMT

03/02

~SSEMB

P~GE

03/02

0003 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SP2 003
0004 PART2
STARr 0
SECOND PARr ~F SAMPL~
SP2 004
0005 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SP2 005

0000

0007 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SP2 001
0008.
DEFINE ENTRIES AND EXTERNAL SYMBOLS
SP2 008
0009 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••• SP2 009

SP2 010
SP2 Q11

0010

02EE

0011
0012
0013
0014
0015
0016
0017 •
0018

0008
00011.
OOOB
OOOD
OOOE
OOOC
OOOF

0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030

OPENF
READ
PRINr
CLOSEF
CARDAR
PRINrAR

ENTRY EOCF

OPEN R;)UfINE
READ ROUTINE
PRINr ROUTINE
CLOSE RourINE
AHEA NHERE CARD IS
PRINT AREA

ST~RED

END OF CARD FILE

........................................................... .......... .
•
SYMBOLIC REGISTER DEFINIrIONS
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
~

•

REGS
BASERG1
BASERG2
LINKRG
BRANCHRG
CII.RDRG
PRINTRG

EQU

8
10
11

EQU

13

EQU
EQU
EQU

14
12
15

EQU

EQU

REG. 8
BASE-REGISTER 1
BASE-REGISrER 2
LINK-REGISrER
BRANCH-REGISrER
REGISrER F~R CF!.RD AREA
REGISTER FOR PRINT AREA

0032 ••••••••••••••••••••••••••••••••••••••••••••••••••••••••• *4 ••••••••••••
0033.
EQUATE SYMBOLS
0034 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0035 •
CONDITION EQUAL
8
0036 EQUAL
EQU
CONDIrION EQUAL !l.ND HIGH
0037 NOTLOii
EQU
11
0038 •
rYPE A
C"A"
0039 Til.
EQU
COB'
TYPE B
0040 TB
EQU
TYPE C
C'C'
00111 TC
EQU
CoO'
CHARAcrER 0
00112 CHARO
EQU
CHARAcrER 9
e'g'
00113 C!!AR9
EOU
C' ,
CH!l.RACrER 'BLANK'
0044 BLANK
EQU

0008
OOOB
OOCl
00c2
OOC)
OOFO

OOF9
0040

Figure 19.

EXTRN
EXTRN
EXTRN
EXTRN
ExrRN
EXTRN

DPS

S~mple

Pro~ram,

Part 5 of 17

001

SP2 001

ASSEMBLER SAMPLE, PART 2, DEFINIrIONS
OBJECT CODE

~SSE~B

AoprH CROSSREF,ENTRY

0001

P~;E

SP2
SP2
SP2
SP2
SP2
SP2
SP2

012
013
014
015
016
017
018

SP2 020
SP2 021

SP2 022
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

023

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

032
OB
03ii
035
036
037
038
039
040
041
042

024
025
026
027
028
029
030

SP2 C!J3

SP2 0114

002

3LE
LOCATN

ASSEMBLER SAMPLE, PART 2, MAIN PROGRAM
OBJECT CODE

0000 ODM
0002
0002
0002 48BO A108
0000
0000

ADDl ADD2 STMT

OlOA

0006 48EO A10A
OOOA ODDE
oooe 47FO A2AE

OlOC

0010 48EO A10C
0014 ODDE

OlOE

0016
OOlA
OOlE
0024

48FO
9240
D23A
F840

02BO

DPS Sample

SOURCE STATEMENT

003

PA~E

DPS ASSEIIS 03/02

0046 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0047 •
MAIN PROGRAM
0048 •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
0049 •
0050.
LOAD BASE REGISTER
0051 •
0052 BEGIN
'BASR SASER31,0
LOAD BASE-REGISTER 1 AND
0053
USING .,BASERGl
INFORM ASSEMBLER
0054 BASEA11 EQU
•
BASE-ADDRESS 1,1
0055
LH
BASERG2,=Y(BASEA21) LOAD BASE-REGISTER 2
0056
USIliG DCARDAR, CARDRG
FOR IMPLI:IT ADDRESSIN3
0051
USING DPRINTAR,PRINTRG
FOR IMPLICIT AODRESSIN3

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

046
047
048
049
050
051
052
053
054
055
056
051

0059 •
0060 •
0061
0062
0063

LOAD REG. WITH BRANCH ADDRESS
OPEN READER AND PRINTER AND RETURN
PRINT A BLANK LINE

SP2
SP2
SP2
SP2
SP2

059
060
061
062
063

009
009
009

LOAD REG. WITH BRANCH ADDRESS
BRANCH TO READ ROUTINE AND RETURN

SP2
SP2
SP2
SP2

065
066
067
068

009
009

SP2
SP2
SP2
SP2
SP2
SP2

070
071

OPEN CARD AND PRINTER FILE
LH
BASR
B

BRANCHRG,=Y(OPENF)
LINKRG,BRANCHRG
PRNTLINE

0065.
R~AD A CARD
0066 •
0067 GETCARD LH
BRANCHRG,=Y(READ)
0068
BASR LINKRG,BRANCHRG

0070 •
0071 •
AlOE
0110
0012
0073
FOOO
0000
FOOl FOOO 0001 0000 0074
A306 Al18 0308 OllA 0075

Figure 19.

01/20/70

BLANK PRINTAREA AND RESEr PACKED RESULr FIELD

Pro~ram,

LH
MVI
MVC
ZAP

PRINTRG,=Y(PRINTAR) LOAD ADDRESS OF PRINT ARE~
O(PRINTRG),C"
BLANK IN FIRST BYTE OF PRINT AREA
l(L'DPRINTAR-l,PRINTRG),O(PRINTRG) BLANK THE R&5r
RESP,=P'O'
INITIALIZE RESULT FIELD

072
073

074
075

009
009

009
009
009
009

Part 6 of 17

Appendix M. Sanple

Pr~gr~ns

169

SLE
LOCATN

00211.
002E
0032
0036
003A
003E
0042
0046

ASSEMBLER SAMPLE, PARr 2, MAIN PROGRAM
OBJECT CODE

4f1CO
95C1
4780
9SC2
4780
95C3
4780
47FO

11.110
COOO
11.048
cOOO

AOA2
COOO
11.011.11.
A2B8

11.001 11.002 STMT

0112
0000
00411.
0000
001\4
0000
OOAC
02BA

00411. 0011.0
004C
004C

TEsr rYPE OF CMD
LH
CLI
BC
CLl

Be
eLI
BE

Be

CARDRG,=Y(CARDAR)
O(CARDRG),TA
8, TYPEA
O(CA.RDR;i),i'B
EQUAL, TYPES
O(CARDRG),rC
TYPEC
15,HALrOOOl

4880
95F9
4720
95FO
4740

AOC8
C003
A28E
C003
A28E

0114
0003
02011.
0003
02011.

0060
0064
0068
006C
0070
0074

95F9
4720
95FO
47BO
9540
4710

C002
11.282
C002
A02C
C002
11.282

0002
02CE
0002
0018
0002
02CE

0078
007c
0080
0084
0088
008C

95F9
4,720
95FO
47BO
9540
4170

COOl
1.276
COOl
A044
COOl
11.216

0001
02C2
0001
0090
0001
02C2

0090
00911
0098
009C
0011.0

4980
47BO
411.80
4ACO
47FO

AOCA
AODO
AOC8
AOCC
11.004

0116
OllC
0114
0118
0050

Figure 19.

INITIALIZE REGISrER
TEST IF TYPE A
YES
H' tYPE B

YES
IF TYPE C
YES
GO ro HALr RourUES

0088 :I<
TEST FOR OEC. NUMBERS IN THE CARD ENTRIES
0089 •
0090 TYPEA
BASR BASERG1,0
CHANGE CONfENrs OF BASE-REGISrER
0091
USIN3 ·,BASERG1
AND INFORM THE ASSE'4BLER
oon BASEA12 EQU
BASE-ADDRESS 1,2
0093 •
0094
LH
8,=H'l'
INlrIALIZE COUNTER
3(CARORG),249
0095 TSTRICOL CLI
COMPARE RIGHr COL ~IrH 9
0096
BH
HALr003N
INVALID IF HIGH
0097
CLI
3(CARDRG),240
COMPARE WIrH 0
0098
BL
HALrOO3N
INVALID IF LOW
0099 *
0100 TSTMICOL CLI
2(CARDRG),C'9'
COMPARE MIDDLE COL WITH 9
0101
BH
HALT002N
INVALID IF HIGH
0102
2(CARDRG),C'O'
CLI
COMPARE WIrrl 0
0103
BNL
TSTLECOL
o.
K. IF Nor LOW
,
0104
2CCARDRG).C'
CLI
IF BLANK
0105
BNE
HALT002N
NO, I NVALILl
0106 •
0107 TSTLECOL CLI
1(CARDRG),X'F9'
COMPARE LEFT COL. WITH 9
0108
BH
H1.LTOOIN
INVALID IF HIGH
0109
l(CARDRG) ,X' FO'
CLI
COMPARE WITH 0
0110
BNL
TSTIFIN
o. K. IF NOf LOW
0111
1(CARDRG),X'40'
CLI
IF BLANK
0112
BNE
HALT001N
NO, INVALID
0113
0114 TSTIFIN CH
8,=Ii'4'
ALL ENrRIES CHECKED
0115
BNL
CEXPRA
YES, COMPurE EXPRESSIO~ rYPE: ~
0116
Ali
8,=H'l'
INCREMENT COUNrER BY 1
0117
AH
CARDRG,=H'3'
NExr ENrRY
0118
B
l'STRICOL
LOOP

•

DPS Sample Program, Part 7 of 17

PAGE

004

DP3 I\.SSE'4B 03/02

SOURCE SfAfEMENf

0077 •
0078 •
0079
0080
0081
0082
0083
0084
0085
0086

•

004C
0050
0054
0058
OOSC

110

01120/10

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

071
018
019
080
081
082
083
084
085
086

SP2
SPl
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

115
116
117
118

009
009
009
010
010
010
010
010

010

010
O~O

010
010
010
010
010
010
010
011
011
011
011
011
011
011
011
011
011
011
011
011

ASSEMBLER SAMPLE, PARr 2, MAIN PROGRAM

SLE
LOCATN

OBJECT CODE

00B4
018E

OOAC 11000 BOOO
OOBO 41FO BlIIC

00B4
0200

00B4
00B4
00B8
OOBC
OOCO
00C4

4880
95F9
4120
95FO
4740

B240
C003
B226
C003
B226

02F4
0003
02DA
0003
02DA

00C8
OOCC
0000
0004
0008
OOOC

95F9
4120
95FO
47BO
9540
4170

C002
B21A
C002
B02C
C002
B21A

0002
02CE
0002
OOEO
0002
02CE

OOEO
OOEII
00E8
OOEC
OOFO
00F4

95F9
4720
95FO
41BO
9540
4770

COOl
B20E
COOl
B044
COOl
B20E

0001
02C2
0001
00F8
0001
02C2

00F8
OOFC
OOFE
0102
0106

4980
07BO
4A80
4ACO
41FO

B244

02F8

B240
B242
B004

02F4
02F6
00B8

010A
010A
010C
010E
0110
0112
0114
0116
0118
011A

00B4
0000
0000
0000
0000
0001
0004
0003
OC

Figure 19.

SOURCE SfAfEMENr

ADDl ADD2 STMT

00B4
00A4 4000 BOOO
00A8 41FO BODA

0120
0121
0122
0123
0124
0125
0126
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155
0157
0158
0159
0160
0161
0162
0163
0164
0165
0166
0167
0168

01120/10

rYPEB

BRANCH TO SUBROUrINE AND RErtJRN
BRANCH TO SUBR~UrINE

BAS
B

LINKR3,rESrENfR
CEXPRC

BRANCH TO SUBROUrINE A..... D
BRANCH TO SUBROUfINE

E~U

•

BASE-ADDRESS 2,1

LH
CLI
BH
CLI
BL

REGS,Hl
ENTRY+2,CHAR9
HALr003N
ENTRY+2,CHARO
HALf003N

INlrIALIZE REGISrER
COMPARE RI3Hf COL ~IfH 9
HIGH
WlrH 0
LOw

CLI
BH
CLI
BNL
CLI
BRE

ENrRY+l,CHAR9
HALT002N
ENrRY+l,CHARO
rLECOL
ENTRY+l,BLANK
HALr002N

COMPARE MIDDLE
HIGH
WIrH 0
o. K.
IF BLANK
NO

CLI
BH
CLI
BNL
CLI
BNE

ENrRY,CHAR9
HALTOOIN
ENrRY,CHARO
TIFIN
ENrRY,BLANK
HALT001N

COMPARE LEFr
HI311
wUH 0

o.

CH
BCR
AH
AH
B

REG8,H4
NOrLOW", LINKRG
REG8,Hl
CARORG.H3
rRICOL

ALL ENTRIES CHECKED
YES
INCREltENT COUNrER BY 1
NEXT ENrRY
LOOP

•

•BASEA21

•
TESTELtl'R
TRICOL

•TMICOL

•TLECOL

•

TIFIN

•

C~L

C~L

It
It

It
It
It
It
It
It
It

wlrH 9

WlrH 9

K.

IF BLANK
NO

LITERAL POOL

•

005

DP3 ASSEltB 03/02

USING BASEA21,BASERG2
LINKRG,TESTENTR
BAS
CEXPRB
B

•

•

TYPEC

P,.3E

~EfURLi

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
S.. 2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
13S.
139
140
141
142
1113
144
145
146
147
148
149
150
151
152
153
15"
155

011
012
012
012

012
012
012
012
012
012
012
012
012
012
012
013
013
013
013
013
013
013
013
013
013
013

SP2 157
SP2 158
SP2 159

LTORG
Y(BASEA21>
Y(OPENF)
Y(READ)
Y(PKINrAR)
Y(CARDAR)
H'l'
H'4'
H'3'
P"Ot

013
013
·013
013
013
013
013
014
014

DPS Sample Program, Part 8 of 17

~ppen~ix

M. Sample Programs

171

SLE
LOC~TN

~SSEMBLER

S~MPLE,

OBJECT CODE

OllC 48CO A2B2
0120 ~8FO A2B4

~OD1

P~RT

2,

~002

STMT

02FE

0300

0124 0208 FOOA A2C3 OOOA 030F
012A 92C1 F014
0014
012E 0202 F019 COOl ·0019 0001
0134 F212 A2BF COOl 030B 0001
013A
013E
0144
014A

924E
0202
F212
FA21

FOlD
0010
F01F C004 001F 0004
A2C1 C004 0300 0004
A2BE A2C1 030A 0300

M~IN

0170
0171
0112
0173
0174
0175
0176
0177
0178
0179
0180
0181
0182
0183
0184
0185
0186
0187
0188
0189
0190

0150 9260 F023
0023
0154 0202 F025 C007 0025 0007 0191
015A F212 A2C1 C007 0300 0007 0192
030D 0193
FB21 A2BE
0194
0166 925C F029
0029
0195
016A 0202 F02B COOA 002B OOOA 0196
0170 F212 A2C1 COOA 0300 OOO~ 0197
0176 FC41 A2BC A2C1 0308 0300 0198
0199
011C 927E F030
0030
0200
0180 F384 F033 A2BC 0033 0308 0201
0136 96PO POlB
003&
0202
018A 47FO A224
0270
0203
0204
0205
00B4
0206
0207
018E 48CO B24A
02FE
0208
0192 48FO B24C
0300
0209
0210
0196 D208 FOO~ B25B OOOA 030F 0211
019C 92C2 F014
0014
0212
0213
OlAO D202 FOl9 COOl 0019 0001 0214
01A6 F212 B251 COOl 030B 0001 0215
0216
OlAe 9260 FOlD
OOlD
0217
01BO D202 FOlF C004 OOlF 0004 0218
01B6 F212 B259 C004 0300 0004 0219
01BC FB11 B251 B259 030B 0300 0220
0221
01C2 925C F023
0023
0222
01C6 0202 F025 C007 0025 0007 0223
01ec F212 B259 C007 0300 0007 0224
01D2 FC41 B254 B259 0308 0300 0225

Figure 19.

172

DPS

S~mple

SOURCE
•
•
•
•

01/20/70

PROGR~M

JP3

ST~TEMENT

COMPUfE EXPRESSIONS: TYPE ~
TYPE B
TYPE C

•
CEXPRA

ENTRY1 + ENr~Y2 ENrRY1 - ENrRY2 ...
ENrRYl • ENrRY2 +

ENr~Y3
ENTRY4 SP2
ENTRY3
ENrRY4 SP2
ENrRY3 - EiURY4 SP2
SP2
SP2
SP2
SP2
REGISrER

DROP

BASERG2

LH

CARORG,YC~ROAR

LH

PRrNrRG,YPRrNrAR

MIlC
Mill

10(9,PRINrRG),MESS

~ESSAGE

TJ

20tPRINTRG),r~

rYPE ro

p~INrAREA

INlrIALIZE
INITIALIZE

RE~ISTER

•
PRI~T

~REA

•
MVC

25(3,PRINTRG),1(C~RDR3)

NUMB~R

P~CK

RESP+3(2),1(3,CARDRG)

PACK

MVI
MVC
PACK
AP

29(PRINrRG),:'+'

SIGN TJ PRINr ARE~
NUMBER 2 ro PRINr~R~A
PACK NUMBER 2 (N2)
N1 + N2

1 ro PRINr ~R~~
1 (~1)

~UMBER

...
31(3,PRINTRG),4(:~R~RG)

PFLD,4(3,CARORG)
RESP+2(3),PFLD

•
MVI
MVC
P~CK

35(PRINTRG),C'-'
31(3,PRINrRG),7(CARORG)
PFLD, 7(3,C~RORG)
.......... ,...-- ..... ,

...

'"

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

1'\1:..::l.t"'T~'.:JJ,rruu

SIGN ro PRINr ~REA
~UMBER 3 ro PRINT ~RE~
PACK NUMBER 3 (N3)
.H ~ t.. 2 - iB

•
MVI
MIlC

41(PRINrRG),C'·'
43(3,PRINTRG),10(C~RDRG)

P~CK

PFLD,10(3,C~RDRG)

MP

RESP,PFLD

MVI
UNPK
or

48(PRINrRG),:'='
51(9,PRINTRG),RESP
S9CPRINrRG),X·FO·
EDIT

SIGN T~ PRINr ARE~
NUMBER 4 ro PRINT AREA
PACK NUMBER 4 (N4)
N1 + N2 - N3 ... ~4

•

B

EOU~L SIGN TJ PRINr AREA
RESULT TO PRINr ~RE~

CHANGE SIGN IN ZJNE IJ F

•
...
...
CEXPRB

USIN~

B~SEA21,BASERG2

LH
LH

CARORG,YCARO~R

INlrIALIZE REGISrER

PRINrRG,YPRINr~R

INlrI~LIZE

MIlC
MVI

OPRINr~R+10(L'MESS),MESS
OPRINr~R+20,rB

~ESS~GE rJ PKINT Il,.REA
rYPE ro PKINr ~RE~

Mve

DPRIN!'AR+25 (L' NU!1Bl>. NUMB1

P~CK

RESP+L'RESP-LNUMBP(L~UMBP),jUMB1

.'IUMBER 1 TO PRINT Il,.REI\
P~CK NU~BER 1 (~1)

MVl

;)pR.I~rAa+29.l:'-'

MIlC

DPRINT~R+31(L'NUMB2),NUMB2

NUMB~R

P~CK

PFLO,NUMB2
RESP+L'RESP-LDIF(LOIF),PFLD

P~CK

NUMBER 2

I'll -

1'12

REGISTE~

•
...
•

SP

'-' TO PRINT hRE~
2 TO PRINr

~R2~

(~2)

•

Pro~ram,

Mill
MIlC

DPRINrAR+35,C'.·

P~CK

PFLD,NUMB3
RESP,PFLO

MP

DPRINr~R+37(L'NUMB3),NUMB3

Part 9 3f 17

'.' ro PRINT AR~~
NUMBER 3 f3 PRI~r Il,.REIl,.
P~CK NUMBe:R 3 (In)

ru -

~S3E~B

1'12 • 1'13

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

P~~E

03/02
161
162
163
164
165
166
161
166
169
170
171
172
113
174
175
176
177
118
179
180
181
182
183

SP2 18l+

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

00&

185
186
187
188
189
190
191
192
193
194
195
196
191
198
199
200
201
202
203
204

014
014
014
014
014
014
014

014
015
015
015
015
015
015
015
015
015
015
016
016

016
016

016
016

205

016

206
201
208

016

vlb

209

016

210
211
212
213
214
215
216

016
017
017
017
017
017

OBJECT CODE

AOOl AOD2 STMT

0108
OlDC
01E2
01E8

924E
0202
F212
FA41

F029
0029
F02B COOA 002B OOOA
B259 COOA 0300 OOOA
B254 B259 0308 0300

OlEE
01F2
OlFI
OlFC

'21E
F184
96FO
"FO

F030
0030
F033 B254 0033 0308
F03B
003B
BIBC
0210

02,° 0 48CO B24A
020' 48FO B24C

02FE
.0300

4

0208 0208 FOOA B25B OOOA 030F
020E 0200 F014 COOO 0014 0000
0211l 0202 F019 COOl 0019 0001
021"A F212 B251 COOl 030B 0001
0220
0224
022A
0230

925C
0202
F212
FC41

0010
FOlD
F01F C004 001F 0004
B259 C004 0300 0004
B254 B259 0308 0300

0236
023A
0240
0246

924E
0202
F212
FMl

F023
0023
F025 C007 0025 0007
C007
0300 0007
B259
B254 B259 0308 0300

024C
0250
0256
025C

9260
0202
F212
FB41

0029
F029
F02B COOA 002B OOOA
B259 COOA 0300 OOOA
B254 B259 0308 0300

0262 927E F030
0030
0266 F384 F033 B254 0033 0308
026C 96FO FOlB
003B

B240
B24E
FOOO
BIE4
B250
BIFC
FOOO
B240
B240
BIC4

02F4
0302
0000
0298
0304
02BO
0000
02F4
02F4
0278

0298 4BFO B240
029C 9101 B258

02F4
030C

0210
0214
0218
021C
0280
0284
0288
028C
0290
0294

01120/10

ASSEMBLER SAMPLE, PART 2, MAIti PROGRAM

SLE
LOCATN

4880
48FO
95FO
4110
4980
47BO
9240
4AFO
4A80
47FO

Figure 19.

DPS

S~mple

0226
0227
0228
0229
0230
0231
0232
0233
0234
0235
0236
0231
0238
0239
0240
0241
02Q2
02Q3
0244
02Q5
0246
0241
0248
0249
0250
0251
0252
0253
0254
0255
0256
0251
0258
0259
0260
0261
0262
0263
0264
0266
0267
0268
0269
0270
0271
0212
0273
0214
0275
0216
0271
0278
0219
0280

;)PS

SOURCE STA.TEMENT
•
'+' TO PRINT AR.t;A
NUMBER 4 ro PRINr
PACK NUMBER 4 ( !i4)
N1 - N2 • N3 + N4

MVI

OPRINTAR+41,:::'+'

l~VC

OPRINTAR+43(L'~U~B4),NUMB4

PACK
AP

PFLO,NUMB4
RESP,PFLD

MVI
UNPK
01
B

OPRINTAR+48,C'='
OPRINrAR+51(L'RESP·2-1),RESP
OPRINTAR+59,B'11110000'
EOIr

~R~A

•

•
•
CEXPRC LH
LH
•
MVC
MVC
•
MVC
PACK
•
MVI
MVC
PACK
MP
•
MVI
MVC
PACK
AP
•
MVI
MVC
PACK
SP
•
MV1
UNPK
01

*

'=' ro PRINr AREA
RESULT T::> PR AREA.
:::HANGE SI3N IN ZONE r:> F

CARORG,Y:::ARDAR
PRINTRG,YPRINTAR

INITIALIZE REGISTER
INITIALIZE REGISrER

DMESS,MESS
prYPE,TYPE

MESSAGE AND
TYPE T::> PRINT

P!"UMB1, NUMB1
RESPRI,NUMBl

I'll

SIGN1,C'·'
PNUMB2,NUMB2
PFLO,NUMB2
RESP,PFLD

A~EA

N2
N1 • N2

SIGN2,C'+'
P~UMB3,NUMB3

PFLO,NUMB3
RESP,PFLO

N3
iU • N2 + ·N3

SIGN3,C'-'
PNUMB4,NUMB4
PFLO,NUMB4
RESP,PFLD

,.. 4
N1 • N2 + N3 - N4

E;JSIGN,C'='
RESZ,RESP
RESZ+L'RESZ-l,C·O·

RESULT TO PR1[~r AREI\
CHANGE SIG~ ro F

EDIT RESULT

•
EDIT
TSTIFO

•
TSTSIGN

LH
LH
CLI
BNE
CH
BNL
MVI
AH
AH
B

REG8,H1
PRINrRG,YRESZ
O(PRINTRG),C'O'
TSTSIGN
REG8,YLRt:SZ
PRNTLINE
O(PRINrRG),C'
PRINTR3,H1
REG8,H1
TSTIFO

SH
TM

PRINTRG,H1
ONE STEP BACK
RESP+L'RESP-l,B'OOOOOOOl'
TEST SIGN

INITIALIZE REGISrER
LOAD ADDRESS :>F RESULT FIEL) ZONE)
TEST IF 0
~O

ALL BYTES CHECKEJ
YES
MOVE BLANK
NEXT BYTE
INCRE~ENT C:>UNrER BY 1
LOOP

A.SSE~B

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

PI\:;E

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

251
258
259
260
261
262
263
264
265
266
267
268
269
210
211

sp;t

007

03/02

011
017
017
011
011
017
018
018
018
018
018
018
018
018
018
018
018
019
019
019
019
019
019
019
019
019
019
020
020

020
020
020
020
020
020
020
020
020
020
020
020

Projram, Part 10 of 17

Appen1ix M. Sample Prograns

173

ASSEMBLER SAMPLE, PART 2, MAIN PROGRAM

SLE
LOCATN
02M

02A4
02A8
02AC

OBJECT CODE

u710
924E
47FO
9260

B1F8
FOOO
BlFC
FOOO

AD01 A:>D2 STMT
02AC
0000
02BO
0000

SOURCE

0281

Mlt~US

0282 PLUS
0283
0284 MINUS

MVI
B
MVI

O(PRINTRG),C'+'
PRNrLINE
O(PRINTRG),C'-'

0286 $
PRINT A LINE
0287 •
0288 PRNTLINE LH
BRANCHRG.YPRINr
0289
BASR LliiKRG, BRANCHRG
0290
BGETCARD
B

02FA

02BA 9900 0001
02BE 47FO B232

0001
02E6

02C2 4080 B230
02C6 9610 B231
02CA 47FO B22E

02E4
02E5
02E2

02CE 4080 B230

02E4

0292
0293
0294
0295
0296
0297
0298
0299
0300
0301

n"') .... "'l

D"~~

02ES

0302

0206 47FO B22E

02E2

0303
03011
0305 HII.LT003~
0306
0307 HPRI
0308 BGETCAtPENF

OPEN READER, PRINTER
BR
LINKRG
SPACE 2

OPEN REAOEK AND PRINrER
RErURN

BR
LINKRG
SPACE 2

RETURN

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
READ A CARD
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
GET
READER,CARDAR
READ A CARD AND MOVE Ir ro CARDAR
•

~EAD

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
PRINr A LINE
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••

•

Figure 20.

C

SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SPl
SP1
SP1
SP1
SP1
SP1
SPl
SP1
SP1
SP1
SP1
SP1
SP1
SPl
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SPl
SP1
SP1
SPl
SPl
SP1
SP1
SPl
CSPl
SPl
SPl
SPl
SP1
SPl
SPl
SPl
SP1
SP1
SP1
SP1
SP1
SPl
SPl
SPl
SPl
SPl
SPl
SP1
SPl
SPl
SPl
SPl

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
031
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
0"55
056
057
058
059
060
061
062
063
064
065
066
067
068

Source Deck Listing, Part 1 of 7

Appendix M. 5anpie

Pr~grans

181

PRINT

PRINTER,PRINTAR
LINKRG
SPACE 2

PUT
BR

PRINT A LINE
RErURN

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
CLOSE THE FILES
GO
TO MONITOR (END OF JOB)
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•: LOSEF CLOSE READER,PRINTER
CLOSE
PRINrER
•
PRINT GEl'"
PRINT 3ENERArED
•
EOO
,
3IVE CONTROL BACK ro MONIrOR
~ND

B~CK

ReAO~R ~ND

SrArE~ENrS

SPACE 2

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
AREAS
.................................................
.................... .
~

•INAREA

CARDAR
PRINTAR

OS
OS
DS
SPACE
END

13C
CL13
CL60
2

I NPUT AREA FOR IOCS
CARD IS STORED dERE AFrER 3Er
PRINT AREA

SP1
SP1
SPl
SP1
SP1
SPl
SP1
SP1
SP1
SP1
SP1
SPl
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SP1
SPl
SP1
SP1

069
010
071
072
013
01l!

075
016
071
018
019
080
081
082
083
084
085
086
087
088
089
090
091

/.
//
//

JOB ASSEMB
SECOND ASSEMBLl
EXEC
AOPTN CROSSREF,ENTRY
SLE
TITLE 'ASSEMBLER SAMPLE, PART 2, DEFINlrIONS'

PART2

START 0

SECOND PARr OF SAMPLE

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
2
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
DEFINE ENTRIES AND EXTERNAL
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•
EXTRN OPENF
OPEN ROUrINE
SP~CE

SY~BOLS

EXTRN
EXTRN
EXTRN
EXTRN
EXTRN

•

READ
PRINT
CLOSEF
CARDAR
PRINTAR

READ ROUTINE
PRItIl' ROUrINE
C[.()SE ROUrINE
AREA WHERE CARD IS SrORED
PRINr MEA

ENTRY EOCF
SPACE 2

EN!) OF CARD FILE

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
REGISTER DEFINITIONS
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•REGS
REG. 8
EOO
8
•

SY~BOLIC

10
11
EQU
13
LINKRG
14
BRAMeHRS EQlJ
CARDRG
EQU
12
EQlJ
15
P~INTRG
SPACE 2
BASERG1
BASERG2

EQU

BI'oSE-REGISTER 1
fW)E-REGISTER 2

EQlJ

LINK-REGISTER
BRANCH-REGISTER
REGISTEK FOR CARD AREA
REGISTEK FOR PRINT I'oREA

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
EQUATE SYMBOLS
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
•EQUAL Eoo 8
CORDIrION EQUI'oL
•

NOTLOW

•rA

rB

rc
::HARO
CHAR9
BLANK

EQU

11.

EQU
EQU
EQU
EOO
EQU
Eoo
TITLE

C"A'
COB'
C·C·
C'O'
C'9'
C·,
'ASSEMBLER

CONDIl'ION

SI'o~PLE,

EQUI'oL AND HiGH

TYPE 1'0
rYPE B
TYPE C
CHI'oRACTLR 0
CHARI'oCrER 9
CHI'oRACrER 'BLI'oNK'
PI'oRT 2, MAIN PROGRAM'

•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
MAIN PROGRM
•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
• LOl'oD BASE REGISTER
•
•BEGIN BASR BASERG1,O
BASE-REGISrER 1 I'oND
•

LO~D

USING .,BASERG1

Figure 20.
1e2

INFORM I'oSSEMBLER

Source Deck Listing, Part 2 of 7

SP2 001
SP2 002
~r~

vve.

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
')P2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

004
005
006
007
008
009
010
011
012
013
014
015
016
011
018
019
020
021
022
023
024
025
026
027

028
029
030
031
032
033
034
035
036
031
038
039
040
041
042
043
044
045
046
047
048
0119
050
051
052
053

BASE-ADDRESS 1,1
•
BASERG2,=YCBASEA21) LOAa BAS~-REGISTER 2
FOR IMPLICIr ADDRESSING
USI~G DCARDAR,CARDRG
FOR IMPLICIr ADDRESSIN3
USING DPRINTAR,PRINfRG
SPACE 2
OPEN CARD AND PRINTER FILE

BASEAll

•

•

EQU
LH

LH
BRANCHRG,=YCOPENF)
BASR LINKRG,BRANCHRG
B
PRNTLINE
SPACE 2
READ A CARD

LOAD REG. wIfH BRANCH ADDRESS
OPEN READER AND PRINfER AND RErURN
PRINT A BLANK LINE

•
•
GETCARD
•

•

•rYPEA

LOAD REG. wIl'H BRANCH ADDRESS
LH
BRANCHRG,=Y(READ)
BRAi«:1j 1'0 READ ROOrINE AND RErlJRN
BASR LI~KRG,BRANCHRG
SPACE 2
BLANK PRINTAREA AND RESET PACKED RESULr FIELD

LH
MVI
MVC
ZAP
EJECT
TEST TYPE

PRINTRG,=YCPRINTAR) LOAD ADDRESS OF PRINr AREA
OCPRINfRG),C' ,
BLANK IN FIRST BYTE OF PRINT AREA
lCL'DPRINTAR-l,PRINTRG),OCPRINfRG) BLANK raE REsr
RESP,=P'O'
INITIALIZE RESULT FIELD
OF CARD

INITIALIZE REGISTER
LH
CARDRG,=YCCARDAR)
CLI
OCCARDRG),TA
TEST IF rYPE A
YES
BC
8, TYPEA
CLI
OCCARDRG),TB
IF TYPE B
BC
EQUAL,l'YPEB
YES
CLI
O(CARDRG),TC
IF TYPE C
YES
BE
rYPEC
GO TO HALr RoorINES
BC
15,HALTOOOl
SPACE 2
TEST FOR DEC. NUMBERS IN THE CARD ENrKIES

BASEA12

BASR BASERG1,O
USING *,BASERGl
EQU
*

*

8,=H'1'
3(CARDRG).,249
HALT003N
3(CARDRG).240
HALT003N

INITIALIZE COIJNrER'
COMPARE RIGHT COL WITH 9
INVALID IF HI3H
COMPARE wITH 0
INVALID IF LOw

CLI
BH
CLI
BNL
CLI
BNE

2CCARDRG),C'9'
HALT002N
2CCARDRG),C'0'
TSTLECOL
2 (CARDRG) ,C' ,
HALT002N

COMPARE MIDDLE COL wIrH 9
INVALID IF HIGH
COMPARE WIrH 0
O. K. IF NOT L3W
IF BLANK
NO, INVALID

CLI
BH
CLI
BNL
CLI
BNE

1(CARDRG) ,X'F9'
HALT001N
1CCARDRG),X'FO'
TSTIFIN
1(CARDRG),X'40'
HALT001N

COMPARE LEFT C3L. WITH 9
INVALID IF HIGH
COMPARE WIrH 0
o. K. IF Nor LOW
IF BLANK
NO, INVALID

CH
BNL
AH
AH
B
EJECT
USING
BAS
B

8,=H'4'
CEXPRA
8,=H'1'
CARDRG,=H'3'
TSTRI.COL

ALL ENrRIES CHECKED
YES, COMPUTE EXPRESSION TYPE A
INCREMENT COIJNrER BY 1
NEXT ENTRY
LOOP

BASEA21,BASERG2
LINKRG,TESTENrR
CEXPRB

BRANCH TO SUBR3UTINE AND RETURN
BRANCH TO SUBROIJrINE

BAS
B

LINKRG,TESrENrR
CEXPRC

BRANCH TO SUBR3UTINE AND RETURN
BRANCH 1'0 SUBRourINE

EQU

*

BASE-ADDRESS 2,1

LH
CLI

REG8,Hl
ENTRY+2,CHAR9

INITIALIZE REGISTER
COMPARE RIGHr COL wIrH 9

LH
rSTRICOL CLI
BH
eLI
BL

*rSTMICOL

*TSTLECOL

•

TSTIFI[~

TYPEB

CHANGE CONrENrs OF BASE-REGISrER 1
AND INFORM THE ASSEMBLER
BASE-ADDRESS 1,2

*

•TYPEC
*

•BASEA21
•TESTENTR
TRICOL

Figure 20.

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132

Source Deck Listing, Part 3 of 7
Appendix M. 3anple

Pr~gram3

183

•rMICOL

I'LECOL

BR
CLI
BL

HALTOO3N
ENTRY+2,CHARO
HALTOO)N

CLI
BH
CLI
BNL
CLI
BliE

ENTRY+1,CHAR9
HALTOO2N
ENTRY+l,CHARO
TLECOL
ENTRY+1,BLANK
HALT002N

eLI

ENTRY,CHAR9
HALTOOIN
ENTRY,CHARO
rIFIN
ENTRY, BLANK
tlALT001N

SH
CLI
BNL
CLI
BNE

HIGH
WlrH 0
LOioJ

COMPARE MIDDLE COL WlrH 9
HIGH
wITH 0

o.

K.

IF BLANK
NO

CUMPARE LEFI' COL wlrH 9
HIGH
WlrH 0

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

133
134
135

136
137
138
139
140
141
142
Si'l i4]
SP2 144
SP2 145

146
147
148
1 .. 9
150
SP2 151
ALL ENrKIES CHECKED
rIFIN
CH
REG8,H4
SP2 152
YES
BCR
NOTLOW,LINKRG
SP2 153
INCREMENT COUNTER BY 1
AH
REG8,H1
SP2 154
NEXT ENTRY
AH
CARDRG,H3
SP2 155
LOOP
B
rRICOL
SP2 156
SPACE 2
SP2 157
•
LlrERAL POOL
SP2 158
SP2 159
LrORG
SP2 160
EJECT
COMPUTE EXPRESSIONS. TYPE A
E~TRYl • E~TRY2 - E~TRY3 • eNTRY4 SP2 161
ENrRY1 - ENTRY2 • ENTRY3 + ENrRY4 SP2 162
TYPE B
ENTRYl • ENrRY2 + ENrRY3 - ENTRY4 SP2 163
TYPE C
SP2 164
SP2 165
DROP BASERG2
SP2 166
INITIALIZE REGISTER
SP2 167
CARDRG,YCARDAR
CEXPRA
LH
INIrIALIZE REGISTER
SP2 168
PRINTRG,YPRINTAR
LH
SP2 169
MVC
10(9.PRINTRGl,MESS
MESSAGE ro PRINT AREA
SP2 170
MVI
20(PRINTRG),TA
TYPE TO PRINrAREA
SP2 111
SP2 172
MVC
25(3,PRINTRG),1(CARDRG)
NUMBER 1 TO PRINr AREA
SP2 173
PACK NUMBER 1 (N1)
PACK RESP+3(2),1(3,CARDRG)
SP2 17"
SP2 175
29(PRINTRG),C'+'
SP2 176
SIGN TO PRINT AREA
MVI
31(3,PRINTRG),4(CARDRG)
NUMBER 2 ro PRINT AREA
SP2 171
MVC
PACK l«JMBER 2 (N2)
PACK PFLD,4(3,CARDRG)
SP2 178
N1 + N2
RESP+2(3),PFLD
AP
SP2 179
SP2 180
SIGN TO PRINT AREA
35lPRINTRG),C'-'
SP2 181
MVI
37(3.PRINTRG),7(:ARDRG)
NUMBER 3 ro PRINT AREA
MVC
SP2 182
PACK NUMBER 3 (N3)
PACK PFLD,7(3,CARDRG)
SP2 183
RESP+2(3),PFLD
SP
N1 + N2 - N3
SP2 184
SP2 185
•
SIGN
ro
PRINr
AREA
MVI
SP2
186
41 (PRIi.iTRG) , C' .'
43(3,PRINTRG),10:CARDRG)
NUMBER 4 TO PRINr AREA
MVC
SP2 187
PACK NUMBER 4 (N4)
PACK PFLD,10(3,CARDRG)
SP2 188
N1 + N2 - N3 • N4
SP2 189
RESP,PFLD
MP
SP2 190
48(PRINTRG),C'='
EQUAL SIGN ro PRINT AREA
SP2 191
MVI
RESULr TO PRINT AREA
UNPK 51(9,PRIHTRG),RESP
SP2 192
59(PRINTRG),X'FO'
CHANGE SIGN IN ZONE TO F
SP2 193
01
B
EDIT
SP2 194
SP2 195
*
SP2 196
SP2 197
USING BASEA21,BASERG2
SP2 198
INITIALIZE REGISrER
SP2 199
CEXPRB
LH
CARDRG,YCARDAR
INIrIALIZE REGISrER
PRINTRG,YPRINTAR
SP2 200
La
SP2 201
MESSAGE TO PRINT AREA
DPRINTAR+10(L'MESS),MESS
SP2 202
MVC
TYPE
TO
PRINT
AREA
DPRINTAR+20,TB
MVI
SP2 203
SP2 204
MVC
DPRINTAR+25(L'NUMB1),NUMB1
NUMBER 1 TO PRINT AREA
SP2-205
PACK RESP+L'RESP-LNUMBP(LNUMBP),NUMB1 PACK NUMBER 1 (N1)
SP2 206
SP2 201
MVI
DPRINTAR+29,C'-'
SP2 208
'-' ro PRINr AREA
MVC
DPRINTAR+31(L'NUMB2),NU~B2
NUMBER 2 TO PRINT AREA
SP2 209
PACK PFLD,NUMB2
PACK NUMBER 2 (N2)
SP2 210
SP
RESP+L'RESP-LDIF(LDIF),PFLD
SP2 211
N1 - N2

•

O. K.

IF BLANK
NO

•

•
•
•

•

•
•

•

.

Figure 20.

184

Source Deck Listing, Part 4 of 7

SP2
SP2
SP2
SP2
SP2

•

SP2
SP2
SP2
SP2
SP2
SP2
'+' TO PRINT AREA
SP2
DPRINTAR+41,C'+'
MVI
DPRINTAR+Q3(L'NUMBQ),NUMB4
NUMBER 4 TO PRINr AREA
SP2
MVC
PACK NUMBER. 4 (N4)
SP2
PACK PFLD,NUMB4
Nl - N2 • N3 + N4
SP2
RESP,PFLD
AP
SP2
'=' TO PRINT AREA
SP2
DPRINTAR+48,C'='
MVI
SP2
RESULT
TO
PR
AREA
UNPK DPRINTAR+51(L'RESP·2-1),RESP
CHANGE SIGN IN ZONE TO F
SP2
DPRINTAR+59,B'11110000'
01
SP2
EDIT
B
SP2
SP2
SP2
INITIALIZE REGISTER
:EXPRC LH
CARDRG,YCARDAR
SP2
INITIALIZS REGISTER
LH
PRINTRG,YPRINTAR
SP2
SP2
MESSAGE ANI)
MVC DMESS,MESS
SP2
TYPE TO PRINT AREA
MVC PTYPE,TYPE
SP2
SP2
MVC PNUMB1,NUMB1
SP2
Nl
PACK RESPRI,NUMB1
SP2
SP2
MVI SIGN1,C'.'
SP2
MVC PNUMB2,NUMB2
SP2
N2
PACK PFLD,NUMB2
SP2
Nl • N2
MP
RESP,PFLD
SP2
SP2
MVI SIGN2,C'+'
SP2
MVC PNUMB3,NUMB3
SP2
N3
PACK PFLD,NUMB3
N1 • N2 + tn
SP2
AP
RESP,PFLD
SP2
SP2
MVI SIGN3,C'-'
SP2
MVC PNUMB4,NUMB4
N4
SP2
PACK PFLD,NUMB4
Nl • N2 + N3 - N4
SP2
SP
RESP,PFLD
SP2
SP2
MVI EQSIGN,C'='
RESULT TO PRINT AREA
SP2
UNPK RESZ,RESP
SP2
CHANGE SI3N ro F
RESZ+L'RESZ-1.C'O'
01
SP2
SPACE 2
SP2
EDIT RESULT
SP2
INITIALIZE RE3ISrER
SP2
EDIT
LH
REG8,H1
LOAD ADDRESS OF-RESULT FIELD ZONED
SP2
LH
PRINTRG,YRESZ
TEST IF 0
SP2
CLI
O(PRINTRG),C'O'
TSTIFO
NO
SP2
BNE
TSTSIGN
SP2
ALL BYTES CHECKED
CH
REG8,YLRESZ
YES
SP2
BNL
PRNTLINE
MVI
O(PRINTRG),C'
MOVE BLANK
SP2
NEXT BYTE
SP2
AH
PRINTRG,H1
INCREMENT COUNrER BY 1
AH
REG8,H1
SP2
LOOP
S'P2
B
TSTIFO
SP2
TSTSIGN SH
PRINTRG,Hl
ONE STEP BACK
SP2
TM
RESP+L'RESP-l,B'OOOOOOOl' TEST SI3N
SP2
BO
MINUS
SP2
PLUS
MVI
O(PRINTRG),C'+'
MOVE PLUS SIGN
SP2
SP2
B
PRNTLINE
MINUS
MVI
O(PRINTRG),C'-'
MOVE MINUS SIGN
SP2
SPACE 2
SP2
PRINT A LItlE
SP2
SP2
PRNTLINE LH
BRANCHRG,YPRINT
LOAD BRANCH-REGISrER
SP2
BASR LINKRG,BRANCHRG
SP2
PRINT A LINE AND RETURN
B
BGETCARD
READ NEXr CARD
SP2
SPACE 2
SP2
HALT ROUTINES
SP2
SP2
flALT0001 HPR
1,0
INVALID CARD rYPE
SP2
B
BGETCARD
NEXT CARr>
SP2
SP2
t:IALT001N STH
8,t:IPRI+2
STORE &NTRY NU~BER (N = 1, 2, 3 OR 4 SP2
01
.HPRI+3,X'10'
'OR' COLU~~ NUMBER (COL. 1)
SP2
B
HPRI
SP2

•

MVI
MVC
PACK
MP

DPRINTAR+35,C'.'
DPRINTAR+37(L'NUMB3),NUMB3
PFLD,NUMB3
RESP,PFLD

' . ' TO PRINT AREA
NUMBER 3 ro PRINT AREA
PACK dUMBER 3 (N3)
Nl - N2 • N3

•

•
•
•

•

•

•

•
•

•
•

•

•

•

•

Figure 20.

212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290

Source Deck Listing, Part 5 of 7
Appen1ix M. Sanple

Pr~grans

185

HAI.T002N STH
01
B

ENTRY NUMBER (N
NUMBER OF COL

ElPiU

SP2
SP2
SP2
ENrRY NUMBER (N = 1. 2. 3 OR 4)
SP2
COL 3
SP2
~ILL BE UPDATEa BY HALr ROUTINES
I.OAD BASE REGISrER 1 ~IrH ORIG VALUE SP2
SP2

REG8,HPRI+2
HALT003N 5TH
HPRI+3,X'30'
01
0,0
HPRI
HPR
BGETCARD LH
BASERG1,YBASEA11
USING BASEAll,BASERGl
GETCARD
B
SPACE 2
•
END OF CARD FILE

1, 2, 3 OR 4)

SP2 293

LII BRANCHRG,YCLOSEF LOAD ADDRESS OF CLOSE ROOfINE
BR BRANCHRG CLOSE rHE FILES
TITLE • ASSEMBLER SAMPLE, PART 2, UJ>.rA DEFINlrlONS i
*
DArA DEFINITIONS
~OCF

Hl

DC

H)

DC

H'l'
H'3'

114

DC

H' 4'

DC

Y(PRINT)
Y(CLOSEF)
Y(CARDAR)
Y(PRI1"frAR)

YCLOSEF DC
YCARDAR DC
YPRINTAR DC

ADDRESS
ADDRESS
ADDRESS
ADDRESS

OF PRINT ROUTINE
OF CLOSE ROOlINE
OF CARDAREA
OF PRI~rAREA
Ul'

t<,t;~UU"J.·

YRESZ

1.1'-

Y( PRI NTAR'" 51)

AuuRESS

YI.RESZ
YBASEAll

DC
DC

'{(I.' RE"SZ)
Y(BASEAU)

LENGTH OF RESZ
BASE ADDRESS 1 1

RESP
PFLD

DC
DC

PL5'O'
PL2'0'

RESULr PACKED
PACK FIELD

*

ORG
EQU
EQU

RESP
X'OOOOOO'
PL2'O'
L'PFLD
LNUMBP

SET LOC. COUNrER BACK ro RESP
FIRST PARr OF RESP
RI3HT PARr OF RESP
LENGrH OF PACKED NUMBER
LENGTH OF DIFFERENCE

ORG
DC

C'CARD TYPE'

RESPRI
LNUMBP
LDIF

*
MESS

*
DCSl

•DCARDAR
rYPE
dUMBl
l"fUM82

LiUMB3
l"fUMSII

ENTRY

DC
DC

C

CL3
CL3
CL3
CL3
NUMBl

DCS2

SPACE 2
DSECT ,

PTYPE
PNUMBl
SIG.U
PNUMB2
SIGN2
PNUMB3
SIGlfl
PNUMBII

EOSIGN

OS
ORG
DC
ORG
OS
ORG
OS
EQU
ORG
OS

EOO

ORG
OS
EQU
ORG
OS

EOO
ORG

RESZ
PAEcfD

186

302
303
3011
305
306
307
308
309
310
311
312
313
3111
315
316
317

SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
sPi
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

320
321
322
323
3211
325
326
327
328
329
330
331
332
333
3311
335
336
337

DUMMY

PRINrARE~

OCL60
DPRINTAR+I0
C'CARD TYPE'
DP1UNTAR+ 20
C

OPRINTAR.'t25

CLl
·+1
*+3
CL3
*+1
·+3
CL3
*+1
*+3
CLl
·+2
*+5
Clog

Ei"D

BEGIN

318
SP2 319

338

339
3110
341
342

SP2 343

•

DS
EOU
SPACE

Figure 20.

s~crIONS'

OCL1)

EOO

DMESS

sp2
SP2
SP2
FREE
SP2
FORMA.r SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

, TO piU;VENr OVERLOADING OF PFL.O

:AE[.u

*DPRINTAR

FIELD ZONED

TITLE 'ASSEMBLER SAMPLE, PARr 2, DUMMY CONTROL
DSECT •
DUMMY CARDAREA
DS
OS
OS
OS
OS
OS
EQU

294
295
296
297
298
299
300

sp2 301

NEXT CARD

•

•YPRINT

SP2 291
SP2 292

REG8,HPRI+2
HPRI+3.X'20'

•2

Source Deck Listing, Part 6 of 1

SPi
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SPi
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2
SP2

3114
345
346
347
348
3119
350
351
352
353
3511
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369

SP2 370

/*

//
//
//
//
//
//
//
A
B

PAUSE INSERT ASSEMB OUT pur DECKS OF Bora ASSEMBLIES FOR LNKEDr
JOB CMAINT
CORE IMAGE MAINTENANCE RUN
EXEC R
CATAL
END
JOB SAMPLE
ASSEMBLER SAMPLE
EXEC
i 2 3 4
1 234
C 1 234
A 5 678
8 5 6 7 8
C 5 678
A 45 71 28 39
B 45 71 28 39
::= 45 71 28 39
A248935627310
8248935627310
C248935627310

R~N

/*

Figure 20.

Source Deck Listing, Part 7 of 7

Appendix M. Sanple

Pr~gr~ns

187

TPS Assembler Language Program

Now you must perform a new IPL with the
system tape created in the :M~I~T run
above.
IPL is followed by

You may use the source jeck from the DPS
sample program in a tape-oriented system.
However~ to run the program under TPS you

r-----------------------------------------,I

must make the following changes:
•

1// LOG
1// JOB SAMPLE

replace the job control statements

!//

•

replace the ~OPTN CROSSREF,ENrRY statement (SP2 001) by an AOPTN ENTRY
statement.

III EXEC

t----~------------------------------------1
IL___________
Data cards _________________ ___________ JI
~

The TPS job control statements with
which you must replace the corresponding
DPS job control statements are listed
below.

r-----------------------------------------,
IJob control cards for first assembly
I
~-----------------------------~-----------~
I I I LOG
i
1// JOB ~SSEMB
i
1// ~SSGN SYSOOO,X-780'T2
I
1// ~SSGN SYS001,X ' 781'T2
I
1// ASSGN SYS002~X·782·,r2
I
1// ~SSGN SYSOPT,X'300'P2
I
1// DATE. 70020
I

1//

EXE~

I

~-----------------------------------------i

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

IJob control cards for second assembly arel
lidentical to those for DPS
I
~-----------------------------------------~

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

IJob control cards for Linkage Editor run J
~-----------------------------------------~
I / / JOB LNKEDT
I
1// ASSGN SYSOPT~X'782',T2
I

1//

EXE~

I

t-~---------------------------------------1
~-----------------------------------------~
fJob control cards for CMAI~T run
I
~--~--------------------------------------~
1// JOB ~MAIN'r
i
']// ASSGN SYSIPT,X'782',T2
I
1// FILES SYSIPT,REW
I
i l l ASSGN SYSOPT~Xi781~,T2
I
1// EXEC
I
1// CATAL
1
1//
END
L_________________________________________
JI

.1RR

I
I
i

DATE 70020

~

You can study the general and detailed
organization of the program in the description of the DPS sample progran. The only
differences which occur are in the. Job :ontrol, Linkage Editor an1 CMAINr program3 J
of which you can find a descri?tion in the
SRL pu bi icat ion !~~:L§~~!::~~~l~Q._~22~!:.-~Q.L
±~£~_Rf29f~~~!gg_~~~!::~~L_ge~i~~!:._~~~_§~~~
Y!£~_EfQ9f~~~f

Form GC24-9000.

For information on the Tape Ioes refer
to the publication IBM System/360 Mode~_£Q.L
Tape Programminq svstem, Inout/Jut~~t-:~n~
i£ol_~~tem, Form G~24-9003.

Indez
~ndexes to System/360 Model 20 SRL pubfications are consolidated in the publication

IBM System/360 Model 20, Disk Programming System: Master

Index~,

rorm GC33-6008.

(Where more than one page reference is given, major reference appears first.)
&SYSECT ~- current control section •••••• 95
&SYSLIST(n) -- macro instruction
operand field •••••••••••••••••••••••••• 96
&SYSNDX -- macro instruction index •••••• 94
Absolute
expressions ••••••••.•••••••.•••.••• 20,16
terms ••.•.•.•••••••••••••••.••••••• 20,16
Add
Decimal packed (AP) ••••••.•••••••••••• 30
Halfword (AH) .•••••••••••••••••••••••. 26
Register (AR) •••••.••••••.•••••••••••• 24
Address
adjustment of ••••••••••••.•••••.•••••• 97
constant (Y) •••••••••••••.•••••••••••• 51
explicit •••••••••••••••••.•••••••••••• 19
implicit •••••••••••••.•••.•••••••••••• 19
Addressing ••••••••••.••••••••••••••••••• 18
direct •.•••••••••.•••••••••.•••••••••• 19
dummy contrdl sections •••••••••••••••• 57
examples of ••••••••••••••••.•••••••••• 21
explicit •.•.•••••••••.•••••••••••.•••• 19
external control sections ••.•.••••• 19,61
implicit •••••••••••••••••••.•••••.•••• 20
indirect~ ••••••••••••••••.•.•••••••••• 19
relative •••••••••••••.•••••••••••••••• 20
Addressing error
binary arithmetic operations .••••••.•. 23
branching operations •••••••.•.••••••.• 42
decimal arithmetic operations ••••••••• 27
logical operations •••••••••..••••••••• 34
AGO -- Unconditional Branch ••••••••••••• 90
AGOB -- Unconditional Branch Backward ••• 91
AH -- Add Halfword ••••••••••.••••••••••. 26
AlE -- Assembly in error ••••••••••••••• 109
AIF -- Conditional Branch ••••••••••••••• 89
AIFB -- Conditional Branch Backward ••••• 90
Alignment of Machine instructions •••• 53,17
Alphabetic characters ••••••.••••••••••••• 7
And Immediate (NI) •••••••••••.•••••••••• 39
AND (logical operator) •••••.•••••••••••• 86
ANOP -- No Operation •••••••••••••••••••. 91
AOPTN (Assembler Option) statement ••••• 107
AP -- Add Packed •••••••.•••••••••••••••• 30
AR -- Add Register •••••••••••••••••••••• 24
Areas, definition of •••••••.•••••••••••• 52
Arithmetic relation •••••••••••.••.•••••• 86
Assembler
diagnostic messages ••••••••.••••••••• 139
functions of ••••••••••••••••••••••••••• 5
option statement (AOPTN) •••.••••••••• 106
work file statement (AWORK) .•••••.••• 105
Assembler actions on errors •••••••••••• 109
Assembler instructions •••••••••••••••••• 47
base register ..••••••.•••••••••••••••• 60
data definition •••..•••••••••••.•.•••• 48
listing control ••••••.••..•••••••••••• 63
program control •••.••••••••••••••••••• 65
program linking .•.•••••••.•••••••.•••• 54

program sectioning........ . • • .• • . • • . .. 54
summary of ....•••.••••••.••••••.•.••. 126
symbol definition ...•.••.••.•.•••••.•. 47
Assembler language
coding conventions..................... 8
features of ••.••••••••••.•••••••••• 132,7
statements, types of .••••.•••...•••.•.• 5
structure of .•••..•••••••.•••...•.•••. 12
Assembler listinq...................... 109
description of -layout. • . • • • . • • • • • • • .• 135
example of •...•.•.••..•.•••••....•• 137,6
printing optional data................. 64
printing title •.•••••••.•..•••.••••••. 63
spacing of............................ 64
sta,rting new page..................... 63
Assembler program defined terms .••.••••. 13
location counter reference •...•••••• ~. 15
symbols. . • • • . . • • • • • • • . • . • . • • • . . • • . • • •. 13
Assembly
6f macro instructions................. 74
of a program .......................... 104
operating environment for •.•.••••.•••.• 7
ASSGN control statement ••.....•.•.• 105,108
AWORK (Assembler Work-File) statement •• 106
B type constant .•.•.•••.•.•••.....•.•.•. 50
BAS -- Branch and Store ••..••.•••.•.•.•• 44
Base address ....••..•..••....••••••.• 19,60
Base register instructions .•.••••••••.•. 60
DROP -- Drop Base Register •••.•..••.•• 62
USING -- Use Base Register .••.••..•.•• 60
Base registers •••••.•.•••..•..••••..•••• 19
f or direct address ing. • • • • • . • . • • • • • . •• 19
for indirect add.ressing............... 19
loading of ••.••••.•.•••.•..••.••••••.• 62
pseudo ••.••.•..••.••..•. ~ ..•..•.•••••. 61
restrictions for use of............... 62
specifying •.•••.•.••••••..•••.•••.•••• 60
Basic Monitor program ••••••..•••••.••••.• 7
BASR -~ Branch and Store Register ••••••• 43
BC -- Branch on Condition ••••••••••••.•• 43
BCR -- Branch on Condition Register ••... 42
Begin
column .••••...••..•.•.•.•••••••.••• 107,8
literal pool (LTORG) ..•..•••..•••.•••• 66
Binary
constants .•..••••..•.•.••..•..•••••••• 50
data, format of....................... 23
halfword •••...••..•••••..••••.•.•.•.•• 23
machine instruction formats ••.....•.•• 23
numbers. • • • . • • . . . . • • . . • . . . . . . . • . . . • . •. 23
self-defining terms................... 13
Binary arithmetic instructions •.•••.•••• 24
AH
Add Halfword ••.••..••...••.••.•• 26
AR
Add Register........ . . • • . • . • • • •• 24
CH
Compare Halfword •.•.....•••.•.•. 25
LH
Load Hal fword. • . • . . . . • • . • . • • • • •. 25
SH
Subtract Halfword............... 26
SR
Subtract Register............... 24
Index

189

STH -- store Halfword •••••••••••••••••
Binary arithmetic operations ••••••••••••
condition code setting after ••••••••••
error conditions ••••••••••••• ~ ••••••••
Boundary alignment ••••••••••••••••••••••
Branch
on Condition (BC) •••••••••••••••••••••
on Condition Register (BCR) •••••••••••
and store (BAS) •• m~ee~e.~~~~~~Dee~e~ee
and Store/Register (BASR)~.~~~~ •• ~~~~~
Branch instructions •••••••••••••••••••••
BAS -- Branch and store ••••••••••••• ~.
BASR -- Branch and store Register •••••
BC -- Branch on Condition •••••••• ~, •••
BCR == Branch on Condition Register •••
SPSW -- Set PSW •••••••••••••••••••••••
Branch operations ••••••••••.••••••••••••
error conditions ••••••••••••••••••••••
machine instruction formats •••••••••••

25
22
23
23

53
43
42
44
43
42
44
43

43
44
41
42
42

C type constant ••••••• ~ ••••••••••••••••• 49
cataloging a macro definition •• e • • • • • • e 108
'CH -- Compare Halfword •••••••••••••••••• 25
Channel command word ................. 54,110
definition of ••••••••••••••••••••••••• 54
Character
codes •••••••••••••••••••••••••••••••• 147
constants •••••••••••••••••••••• ~ •••••• 49
data, format of ••••••••••••••••••••••• 33
telation •••••••••••••••••••••••••••••• 87
self-defining term •••••• e • • • • • • • • • • • • • 13
set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 7
CMAINT (core-image maintenance)
program •••••••••••••••••••••••••••••••• 65
Coding conventions •••••••••••••••••.••••• 8
summa~y

of ..•...•...................... 9

Coding form ••••••••••••••••••••••••.•• 8,11
Combining symbolic parameters with
other characters ••••••••••••••••••••••• 78
Comments entries
in macro language statements~~~~t~~ ••• 93
in source program statements'......... 9,6
Compare
Decimal Packed (CP) ••••••••••••••••••• 30
Halfword (CH) ••••••••••••••••••••••••• 25
Logical Characters (CLC) •••••••.•••••• 37
Logical Immediate (CLI) ••••••••••••••• 36
Compatibility •••••••••••••••••••••••••• 110
Complex relocatable expressions ••••••••• 52
Concatenation
of symbolic parameters.~ •.•••••••••••• 78
of substrings ••••••••••••••••••••••••• 85
Condition code setting
after binary arithmetic operations •••• 23
after decimal arithmetic operations ••• 27
after logical operations •••.•••• o.4.~a 34
Coriditional assembly ifistructions ••••••• 80
sequence symbols ••••••••••••••••••• 88-92
SET variable symbols ••••••••••••••• 80-88
Conditional branch (AIF) •••.•••••••••••• 88
Conditional branch backward CAIFB) •••••• 90
Configuration t system ••••••••••••••••.• 153
Constants
address (Y) ••••••••••••••••••••••• , ••• 51
binary (B) •••••••••••••••.•••••••••••• 50
character (C) ••••••••••••••••••••••••• 49
decimal ••••••••••••••••••••••••••••••• 51
definition of •••••••••••••••••••••• 48-52

fixed- point (H)....................... 50
hexadecimal (X) ••••••••••••••••••••••• 50
literals ................ ~ ..
46
packed decimal
51
rules for definition ..••.••••••••.•••• 48
summary of •.•••.•.•••••.••.••••••.••. 127
zoned decimal (Z)..................... 51
continuation
e •• e

••••••••

(p)....................

card ............................................... ;; 72
character~

•...•••.•..••.•..••••.••••••. 8

column ••••••...•..•.•••••••.••••••• 8,105
of macro language statement •.•••• ~ •. 72,8
Control sections........................ 54
dummy .•.••••..•...•••••.•.••.•••••••.. 57
external, addressing of............... 59
first .••.•••.••.•••••••••••••••••••••• 55
maximum number of .•••••.••.••••••••••• 55
starting location of •••.••••••••.•••.. 55
unnamed. • • • . • . • . • . • • • • • • • . . • • • • • • •• 55, 57
Control statements..................... 105
Conversion table, hexadecimal-decimal •• 155
CP -- Compare Decimal Packed .••••••••••. 30
CROSSREF (Assembler option) •••••••••••. 106
CSECT -- Identify Control secti~n •••.•• 56
Current control section C&SYSE2T) ••••... 95
Data definition instruction •••••••••••.. 48
DATE control statement ••••••••••• 105,108
DC -- Define Constant..... • • • . • • • • • • •• 48
DCCW -- Define Channel Command Word ••• 54
DS -- Define Storage.................. 52
literals .•...•.•.••••.••.•.•.•••.•••. 4.8
DATA (operand of PRINT instruction ••••.• 64
Data error
decimal arithmetic operations ••••••••• 28
logical operations.................... 35
Data formats
binary numbers •••.•••••••••••••.•••.•• 23
character data •••.••.•••••.•..••.•••.• 33
decimal numbers............................. 26
DATE control statement.~~ •.•.••• ~ •• 105,108
DC -- Define Constant •.••••.•.•.••.••••• 48
DCCW -- Define Channel Command word ••••• 54
Decimal arithmetic error conditions ••••• 27
Decimal arithmetic operations ••••••.••.. 26
condition code setting after •••••••••• 27
Decimal
constants ••••.•••.••.•••.••.•.•••••••• 51
data, format of ••••••••••.•••••••••••• 26
machine instructions, format of .•••••• 27
numbers, length of •••••••••••••••.•••• 26
Decimal arithmetic instruction •••••.•••• 28
AP
Add Decimal Packed •••••••••••••• 30
CP
Compare Decimal Packed ..••••••.• 30
DP
Divide Decimal Packed ••••••••••. 32
MP
Multiply Decimal Packed .•••.••.. 31
MVO -- Move with Offset ••••••.•••••••• 28
PACK -- Pack~ •••..•••••••••••••••••••• 28
SP -- Subtract Packed.................... 31
UNPK -- Unpack •••••••••••••••••••••••. 29
ZAP -- Zero and Add Packed •••••••.•••. 29
Define
Channel Command Word (DCCW) •.•••••••.• 54
constant (DC) •••••••••••••.••••••.• 48-52
Storage (DS) •••••••••.•.••.•..•..••••• 52
Defining
areas. • . . • • . • . • . • • • . • • • . . . . • . .. .. . .. . • • •. 52
constants .•••••••••••••.••••••••••• 48-52

entry point of program ••••••••••••• 65,66
fields within areas •••••••••••••••• 53,57
substrings with SETC •••••••••••••••••• 84
symbols ••••••••••••••••••••••••••••••• 14
Depth of nesting macro instructions ••••• 19
Device assignments ••••••••••••••••••••• 104
Diagnostic messages
Assembler •••••••••••••••••••••••• 139-144
Macro Maintenance program •••••••••••• 145
Direct addressing ••••••••••••••••••••••• 19
Divide Decimal Packed (DP) •••••••••••••• 32
DLAB control statement ••••••••••••• 105,108
DP -- Divide Decimal Packed ••••••••••••• 32
DROP -- Drop Base Register •••••••••••••• 62
DS -- Define storage •••••••••••••••••••• 52
DSECT -- Identify Dummy section ••••••••• 57
Dummy control section ••••• ~ ••••••••••••• 51
Duplicate following card •••••••••••••••• 65
Duplication factor
in DC instructions ••••••••••••••••••• ~ 48
in DS instructions •••••••••••••••••••• 52
EBCDIC to card code conversion
table. • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 147
Edit (ED) ••• • • • • • • • • • • • • • • • • • • • • • • • • • • • • 37
EJECT -- start New Page ••••••••••••••••• 63
End column............................. 107
END -- End Assembly ••••••••••••••••••••• 66
use in overlay structures •••••••••• 61,68
ENTRY (Assembler option) ••••••••••••••• 106
ENTRY -- Identify Entry-point Symbol •••• 58
EQ (relational operator) •••••••••••••••• 87
EQU -- Equate Symbol •••••••••••••••••••• 47
Error checking.......................... 99
Error conditions
addressing (see Addressing error)
binary arithmetic ••••••••••••••••••••. 22
branching •••••.••••••••••••••••• ~ ••••• 42
data (see Data error)
decimal arithmetic •••••••••••••••••••• 27
logical operations •••••••••••••••••••• 34
specification {see specification
error)
Error indications •••••••••••••••••••••••• 7
ESD (External symbol dictionary) ••••• 55,65
EXEC control statement ••••••••••••• 105,108
Explicit addressing ••••••••••••••••••••• 19
Explicit length......................... 20
Expressio.ns ••••••••••••••••••••••••••••• 15
absolute ••••••••••••••••••••••••••• 16,20
complex relocatable ••••••••••••••••••• 52
evaluation of ••.•••••••••••.•••••••••• 15
logical ••••••••••••••••••••••••••••••• 86
in macro language •••••••••••••••••••• 128
relational •••••••••••••••••••••••••••• 86
relocatable •••••••• -•••••••••••••••• 16,20
Extended mnemonic codes ••.•••••••••• 18,123
External control section •••••••••••••••. 59
External Symbol Dictionary ••••••••••• 55,58
EXTRN -- Identify External Symbol ••••••• 59
FETCH macro instruction ••••••••••••••••• 67
Fields, definition of.~ .••••••••••••• 53,57
First control section ••••••••••••••••••• 55
Fixed-point constants (H) ••••••••••••••• 50
Formats of Machine instructions ••••• 124,17

GE (relational operator)................ 81
GEN (operand of PRINT instruction ••••••• 64
Generate transfer card (XFR) •••••••••••• 65
Global SET symbols ••••••••••••••••••• 81,86
Glossary ••••••••••••••••••••••••••••••• 111
GMOVE macro definition •••••••••••••••••• 97
coding of ••••.••••••••••••••••••••••• 101
error checking........................ 99
flow chart of........................ 100
global SET symbols in................. 99
in-line use ••••••••••••••••••••••••••• 97
main-storage considerations ••••••••••• 99
used as subroutine •••••••••••••••••••• 98
GT (relational operator)................. 81
\

H type constant ••••••••••••••••••••••••• 50
Halt and Proceed (HPR) •••••••••••••••••• 40
Head phase •••••••.•••••••••• ~ •••••••• 67,68
Header statement
positional •••••••••••••••••••••••••••• 75
keyword .•••••••••••••••••••••••••••••• 94
Hexadecimal constants (X) ••••••••••••••• 50
Hexadecimal to decimal conversi:m
table. .. • • • . • • . • • • • • • • • • • • • • • • • • • • .. • • •• 155
Hexadecimal self-defining term •••••••••• 12
Highest positive binary number •••••••••• 23
Highest positive fixed-point constant ••• 51
HPR -- Halt and Proceed ••••••••••••••••• 40
ICTL -- Input Format Control ••••••••••• 107
Identification-sequence field •••••••••••• 9
Identify
Assembly output (TITLE)............... 63
Control Section (CSECT) .•••••••••••••• 56
Dummy section (DSECT)................. 57
Entry-point Symbol (ENTRy) •••••••••••• 58
External Symbol (EXTRN) ••••••••••••••• 59
Immediate data ••••••••••••••••••••••• 35,46
Implicit addressing......... • • • • • • • • • • •• 20
Implicit length......................... 20
Indirect addressing..................... 19
Inner macro instructions •••••••••••••••• 79
Input format control (ICTL) •••••••••••• 107
Input/Output operations ••••••••••••••••• 45
Input sequence checking (ISEQ) ••••••••• 101
Instructions
Assembler •••.••••••••••••••••••••••••• 47
machine .•.•••••.•••••••.•••••••••• 17,122
macro. • . • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 70
I/O devices for assembly •••••••.••••••• 104
IOCS. • • • • • • • • • • • • • • . • • • • • • • • • • • • • • • • • • •• 45
macro instructions.................... 45
ISEQ -- Input Sequence Checking •••••••• 107
Job control statements
for an assembly....................... 105
for cataloging a macro definition •••• 108
Keyword macro definition •••.••••••••••••
Keyword macro instruction ••••.••••••••••
operands, rules for writing .••••••••••
Keyword prototype statement •••••••••••••

93
72
73
94

Language compatibility ••••••••••••.•••• 110
Layout of Assembler listing •••••••••••• 135
LE (relational operator) •••.•••••••••••• 81
Length
Index

191

attribute reference ••••••.••••••••• 12,14
of character constants •••••••••••••••• 49
of decimal constants •••••••••.•••••••. 51
of decimal numbers •••••••.•••••••..••• 26
e f f ect i ve = = • = = = • = = = • • • • • = • • • • • • • • • • • •• 21
explicit •••••.•••••••••••••••••••••••• 20
implicit •••••••••••••••••••••••••••••• 20
modifier. • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 49
Level of nesting macro instructions ••••• 79
LH -- Load Halfword ••••••••••••••••••••• 25
Linkage Editor program •••••••••••••.••• , 65
Linkage, symbolic ............................. 58
Linkinq (see sectioninq and linkinq)
Listin~ (see Assembler-listing)
Li~ting control instructions •••••••.• 05,41
EJECT
Start New Page ••••••••••••••• 63
PRINT
Print Optional Data •••••••••• 64
SPACE
Space Listing ••••••••••••• ~ •• 64
TITLE
Identify Assembly Output ••••• 63
Literal pool •••••••••••••••••••••••.• 46,66
LITERAL (~ssembler option) ••••••••••••• 106
Li terals. . • • • . • • • • • • • • • • • • • • • • • • • • • • • • •• 46
addressing considerations ••••••••••••• 66
format of .................................. 46
location of, in storage ••••••••••••••• 66
use of •.•••••••••••••••••••••••••••••• 71
workfile •••••.••••••••••••••••••••••• 106
Load Halfword (LH) •••••••••••••••••••••• 25
LOAD mac~o instruction •••••.•••••••••••. 69
Loading a base register ••••••••••••••••• 62
Local SET symbols •••••••••••••••••••• 81,86
Location counter
reference ••••••••.•••••••••••••••••••• 14
setting of ••••••••••••••••••••••••• 60,15
Logical expression •••••••••••••••••••••• 86
evaluation of ••••••••••••••••••••••••• 89
Logical operations •••••••••••••.•••••••• 33
condition cod~ setting after •••••.•.•• 34
data format ••••••••••••••••••••••••••• 33
error condition ••.•..••••.•..••••.•••. 34
Logical operations instructions .•••••.•. 35
CLC -- Compare Logical Character •••••• 37
CLI -- Compare Logical Immediate •••••• 36
ED -- Edit •••••••••••••••••••••••••••. 37
HPR
Halt and Proceed ••••••••.•••••• 40
MVC
Move characters •••••••••••••••• 35
MVI
Move Immediate.m ••••••••• e • • • • ~ 35
MVN
Move Numerics •••••••••••.•••••• 36
MVZ
Move Zones ••••••••••••••••••••• 35
NI
And Immediate ••••••••••••••••••• 39
01
Or Immediate •••••••••••••••••••• 39
TM
Test under Mask ••••••••••••••••• 40
TR
Translate ••••••••••••••••••••••• 41
Logical operators ••••••••••••••••••••••• 86
Lowest negative binary number ••••••••••• 23
Lowest negative fixed-point constant •••• 51
LT (relational operator) •••••••••••••••• 87
LTORG -- Begin Literal Pool •••• , •••••••• 66
use in overlay structures .••••••••• 67,68
Machine instruct~ons ••••••••.••••••• 17,122
alignment of •••••••••••••••••••••••••. 17
format of ••••••••••••••••••••••••. 17,124
numemonic operation codes ••••••••••••. 17
operands •••••••••••••••••••••••••.•••• 18
summary of •••••••••••••••••••••••.••• 122
Machine operations......................... 22
binary arithmetic ••••••••••••••••••••. 22
192

branch. • • • • • • . • . • . • • • • • • . . • • • • • . • • • . •• 41
decimal arithmetic.................... 26
input/output •.•.••••..•....••••.•.•.•. 45
logical .. : • • • . • . . . • • . • • . . . • . • • • . • . • • .. 33
MACRO -- Macro Header statement •••..••.. 75
Macro definition
cataloging of .•••.•••••.•••••••..•••• 108
end processing of.................. 92,93
error chec~il1g
109
IBM supplied •.•••.•.•••...•••.••.•••• 131
keyword .•••...•••.••••••.••.•••••••••• 93
positional •.••••••••.••••.•••••••••••. 75
sample o f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Macro exit.............................. 92
Macro instruction index (&SYSNDX) ••••••. 94
Macro instruction operand
field (&SYSLIST (n) ) • . . • . • • . . • • • • • • • • .• 96
Macro instructions ••••••••••••••••.••••. 70
FETCH. • • • . • • • • • . . . • . • • • • • • . • • • • • . • • . •. 67
formats of •...•••.•..•••••..••••••• 71,72
GMOVE. • • • . • • • . • . • • • • • • • . • . • • • • • • • • • • •• 97
inner •••••.•..•.•.•••••.••.••••.•.••.• 79
keyword ••••••••••••••••••.••••••.••••• 72
LOAD. • . . • • • • . . .. • . . • . . . .. . • . • • . . • . • . • • •. 69
nested ••.••••.•.••.••••••••••••••••••• 79
positional •• ~ ••.•.•••••••••••••••.•••. 71
Macro language •.•.••••..•••...•••.•• 75-103
comments statements ••••••.•••.•••.••.. 93
conditional assembly instructions ••••• 80
expressions in, summary •.•••••••• 128,130
header statement •••••••••••••••••••••• 75
macro exit............................ 92
model statements •.••••••••.••••••.•••• 76
request for a message................. 92
trailer statement .•••.•.•..••.•••.•.•. 93
summary of •.•.•••.•.•••.••••••••••••• 129
Macro maintenance diagnostics •..•••.••• 145
Macro prototype statement
keyword .•••••.•.•.•••••.•..••••••.•••. 94
posit.ional •...•..••..•.....•.•..•.•.•. 75
Main-storage considerations, GMOVE •••••• 99
Maximum system configuration ••••••••••• 153
MEND -- Trailer Statement............... 93
MEXIT -- Macro Definition Exit ••.••••••. 92
Minimum system configuration •••••••.••. 153
Mnemonic operation codes •••••••••••. 17,122
extended •.....•...•...•••.. o • • • • • • 18,123
MMAINT •••.••••.•••••••••••••••••••••••• 109
MNOTE -- Request for Error Message •••••. 92
Model statements........................ 76
operation code, restrictions for •••.•• 77
Modifier .•••••.••.•.•••.•••••••••••.•.•• 49
Move
Characters (MVC) •.•••.••.•.••••••••.•. 35
Immediate (MVI) •••••••••••.••.•••••••• 35
Numerics (MVN) •••••••••••.•••••••••••• 36
with Offset (MVO) •••••••....•••••••••• 28
Zones (MVZ) .•.•••••••••••••••••••••••• 35
MP -- Multiply Decimal Packed ...•.•••••. 31
Multiply Decimal Packed eMP) .••••••••••• 31
MVC
Move Characters ••••••.•••••..•••• 35
MVI
Move Immediate................... 35
MVN
Move Numerics.................... 36
MVO
Move with Offset ••••..••.•••.•.•. 28
MVZ
Move Zones ••.•••••.•.•••••••.•.•• 35

ill....................

Name ent.ries............................... 8
NE (relational operator) ••••.••.••.••.•. 87

Nested macro instructions ••••••••••••••• 79
NI -- And Immediate ••••••••••••••••••••• 39
No operation (ANOP) ••••••••••••••••••••• 91
NODATA
e
PRINT
64
NODECK (Assembler option) •••••••••••••• 106
NOERR (Assembler option) ••••••••••••••• 106
NOESD (Assembler option) •• ~ •••••••••••• 106
NOGEN (operand of PRINT instruction) •••• 64
NOLIST (Assembler option) ••••••• ~ •••••• lQ6
NORLD (Assembler option) ••••••••••••••• 106
NOT (logical operator) •••••••••••••••••• 86
NOSYM (Assembler option) ••••••••••••••• 106
NOVERIFY (Assembler option) •••••••••••• 106
Null character string ••••••••••••••••• ,' 87
Null parameters ••••••••••••••••••••••••• 87
in name field ••••••••••••••••••••••••• 71
in operand field •••••••••••••••••••••• 72
testing for ••••••••••••••••••••••••••• 87
Numeric characters ••••••••••••••••••••••• 7
Object program ••••••••••••••••••••••••••• 5
OFF (operand of PRINT instruction) •••••• 64
01 -- Or Immediate •••••••••••••••••••••• 39
ON (operand of PRINT instruction) ••••••. 64
Operand ••••••••••••••••••••••••••••••••• 18
entries ••• '. . • • . • • • • • • • • • • • • • • • • • • • • • • •• 9
fields •••••••••••••••••••••••••••••••• 18
of keyword macro instructions ••••••••• 73
of positional macro instructions •••••• 71
subfields •• ~ •••••••••••••••••••••••••• 18
Operating environment ••••••••.••••••••••• 7
Operation code
Assembler language ••••••••••••••••••••• 9
macro language •••••••••••••••••••••••• 77
operator
logical •••••••.••••••••••...•••••.•••• 86
relational •••••••••••••••••••••••••••• 86
Optional data, printing on assembly
listing •••••••.•••••••••••••••••••••••• 64
OR (logical operator) ••••••••••••••••••• 86
Or Immediate (OI) •••.••••••••••••• ~ ••••• 39
ORG -- Set Location counter ••••••••••••• 65
output listings •••••••••••••••••••••••• 109
Overlay with FETCH macro instruction •••• 67
Overlay with LOAD macro instruction ••••. 69
P type constant ••••••••••••••••••••••••• 51
Pack (PACK) ••••••••••••••••.•••••••••••• 28
Parameter ••••••••••••••••••••••••••••••• 70
Phase (see Program phases)
PHASE (Phase Definition) statement •••••• 65
positional macro definition ••••••••••••• 75
positional macro instruction •••••••••••• 71
operands, rules for writing ••••••••••• 71
positional prototype statement ••••••• 75,72
PRINT -- Print Optional Data •••••••••••• 64
Program control statements ••••••••••••• 105
AOPTN -- Assembler Option •••••••••••• 106
AWORK -- Assembler Work File ••••••••• 105
ICTL -- Input Format Control ••••••••• 107
ISEQ -- Input Sequence Checking •••••• 107
Program linking (see Sectioning and
linking)
Program listings ••••••••••••••••••••• 7,135
examples of ••••••••••••••••••.••••• 6,137
Program sectioning (see Sectioning and
linking)
Program sections (see Control

Sections)
Program phases •••.••••••••••••••••••• 67-69
Program-Structure control instructions •• 65
END
E
Ass
ly
66
LTORG -- Begip Literal Pool ••••••••••• 66
ORG -- Set location counter ••••••
65
REPRO -- Reprocedure Following
Statement •••.•••••••••••.•••.•••••••. 65
XFR -- Generate a Transfer Card ••••.•• 65
Prototype statement
keyword •••••••••••••••••••••••••• 72,94
positional •••••••••••••••••••••••••• 75
Pseudo base registers .................... 61
L

••••

Register usage.......................... 62
Relati~e addressing ••••••••••••••••••.•• 20
Relational expression ••••••.•••••••••••• 86
evaluation of ••••••••••••••••••••••.•• 89
Relational opera tor. • • • • • • • • • .. • • .. • • • • • •• 86
Relative addressing ...................... 20
Reloactable expressions •••••••••••••• 16,20
complex. • • • • • • • • • • • • • • • • • • • • • • • • • • • • •• 52
Relbcatable terms......................... 12
pairing of •.•.••••••••••••••••••••• 16,52
Relocation •••.••••••••••••••••••••••••••• 7
dictionary (RLD) .................... 55,52
REPRO -- Reproduce Following Card ••••••• 65
use in overlay structures •••••••••• 67,68
Reserving space.......................... 98
Request for message (MNOTE) ••••••••••••• 92
RR instruction format................... 17
RX instruction format •••••••••••••.••••• 17
SA -- statement assembled •••••••••••••• 109
Sample program ..•.•.••••••••••••••• 161-188
addressing the I/O areas ••••••.•••••• 162
addressing in main program ••••••••••. 162
control statements................... 162
cross reference list •.••••.•••••••••• 163
description of....................... 161
formatting instruction listing ••••••• 163
linking sections...................... 161
organization of •••••••••••••••••.•••• 161
TPS As~embler, differences •••••••••.• 188
Sectioning and linking .••••••••.•••.•• 7,54
example of •••.•••••••••••••••••••••.•• 56
S~ctioning and linking instructions
CSECT
Identify Control Section ••••. 56
DSECT
Identify Dummy sectian ••.•.•• 57
ENTRY
Identify Entry-Point Symbol •. 58
EXTRN
Identify External Synbol ••.•. 59
START
Start Assembly ••..••.•••.••.. 55
self-defining terms .•.••••••••.•••.••••. 12
binary ................................ 13
character ••••••••••••••••••..••.••••. 13
decimal. • • • • • . • • • . • • • • • • • • • • • • • • • . • • •• 12
hexadecimal .~ •••••••.•••.•••.•••.•.•• 12
use of................................ 12
Sequence field (on coding form) .•••••.••• 9
Sequence symbol ••••.••••••••.••••••••••• 88
Set
Location Counter (ORG)................ 65
PSW (SPSW) .••••••.•••••••••••.•••••••• 44
SET variable symbols........ . •• . • • • . • . •. 80
global. • • • • . • • • • • • • • • • • • • • . • • • • • . .• 81,86
local ••••••.•••••.•••••.••.••.•.••• 81,86
SETA
Set Arithmetic.................. 81
SETB -- Set Binary •.•••.•..••••.•.•••.•• 85
Index

193

SETC -- Set Character ••.•••••••••••••••• 83
Sequence symbols
AGO -- Unconditional Branch ••••••••••. 90
AGOB -- Unconditional Branch
Backward •••••••••••••••••••••••..•.•• 91
AIF -- Conditional Branch ••••••••••••• 88
AIFB -- Conditional Branch Backward ••• 90
SH -- Subtract Halfword ••••••••••••••••• 26
SI instruction format •••••. ~ •..••••••••. 17
SIA -- statement incompletely
assembled ............................... 109
Sign •• '•••••••••••• '. • • • • • • • • • • • • • • • • • • • •• 51

Source program •••••••••••••.••••••••••••. 5
Assembler actions on ••••••••••••••••• 109
errors in •••••••••••••••••••••••••••• 109
SP -- Subtract Packed ••••••••••••••••••• 31
SPACE -- Space Listing •••••••••••••••••• 64
Special addressing considerations ••••••• 66
Special characters •••••••••••• ~ •••••••••• 7
Specification error
binary arithmetic operations •••••••••• 24
branching operations •••••••••••••••••• 42
decimal arithmetic operations ••••••••• 27
logical operations •••••••••••••••••••• 35
SR - - subtract Register •••••••••••••••• 24
SS instruction format ••••••••••••••••••• 17
Start New Page (EJECT) •••••••••••••••••• 63
START -- start Assembly ••••••••••••••••• 55
use in overlay structures •••••••••• 67,68
Statement
boundaries •••••••••• '•••••••••• '••••••••• 8
contination of •••••••••••••••••••• ~ •••• 8
format, rules for ••••• '. • • • • • • . • • • • • • • •• 8
types of •••••••••.•••••••••••• ~ ••.••••• 5
STC -- Statement treated as comment •••• 109
STH -- Store Halfword ••••••••••••••••••• 25
Store Halfword (STH) •••••••••••••••••••• 25
Subfields (of operand) •••••••••••••••••• 18
subphase •••••••••••••••••••• o •••••••• 67,68

Subroutine facility •••••••••...••••••••• 98
Substring with SETC instruction ••••••••• 84
Subtract
Decimal Packed (SP) ••••••••••••••.••••
Halfword (SH).oo~ •••••••••••••••••••••
Register (SR) ••••• eo ••••••••••••••••••
Symbols •••••••••••••••••••••••••••••••••
absolute ••••••••••••••••••••••••••••••
defining ••••••••••••••••••••••••••••••
entry-point •••••••••••••••••••••••••••
external ••••••••••.••••••••.••••••••••
length attribute of •••••••••••••••••••
previously defined ••••••••••••••••••••
relocatable ••••••.•••.••••••••••••••••
restrictions for use of •••••••••••••••

194

31
26
24
13
12
14
58
59
14
14
12
14

rules for use of...................... 13
Symbol definition instruction .•.••.••.•.
Symbolic linkages.......................
Symbolic parameters
combining with other characters ••.•..•
evaluation as null parameters .•••••••.
in keyword prototype statement •...•.••
in positional prototype statement ••.••

47
58
78
73
94

76
use in expressions ..•.•.......•...•.. 130
System configuration •••••••••••••••••.• 153
System variable symbols .•.•••••.••••.•.• 94
&SYSECT -- Current Control section •••.•• 95
&SYSLIST(ni -- Macro Instruction
Operand Field .......•..•.••• = : : : : • : •• : : 96
&SYSNDX -- Macro Instruction Index •••.•. 94

Terms. • • • • • • • • • . • • • . • • • • • • • • • • • . • • . • • • •• 12
absolute •••.•••••••••••••••.•••.••• 12,14
Assembler program defined •••••••.••.•• 13
relocatable ..••..••••••.•.••..•••.• 12,14
sel f -defining. • . • . • • • . • • • • . • . . • . . . • • •. ..L L
Test under Mask (TM) •••••.•••••••••••••• 40
Testing for a null parameter .••••••••.•• 87
Text output file •••.•••••••••••••••••.• 104
TITLE -- Identify Assembler output •••••• 63
TM -- Test under Mask.................... 40
TR -- Translate......................... 41
Trailer statement (MEND)................ 93
Translate (TR) •••.•••••.•.•••••••••••.•. 41
Type specification in DC instruction •••• 48
Unconditional branch (AGO) •••••••••••••• 90
Unconditional branch backward (AGOB) •••• 91
Unnamed control section •••••.••• ~ •••• 55,57
Unnamed dummy section ••••.••••••••..•••. 57
Unpack (UNPK) •••••..•••••••••••••...•••• 29
USING -- Use Base Register...... • • • • • • •. 60
Variable symbols •..••••••• e ~ • • • • • • • • 94.132
use in expressions •••••.•.•••••.••••• 130
VOL control statement ..••.•••.••••• 105,108

X (hexadecimal) ••••.•••••.••.••••.•.•••• 50
X type constant ••••.•••.•....••.••.•..•• 50
XFR -- Generate a Transfer Card ••••.••.• 65
use in overlay structures ••.•••••.• 67,68
XTENT control statement ••••••••••.• 105,108
Y type constant .•••.•••.•.•.•••.••••••.. 51
Z type constant .•••.•••..••••••.•••.•••. 51
Zero and Add Packed (ZAP) .•••••••••••••. 29

GC24-9002-5

International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, N.Y.10601
rUSA Only]
IBM World Trade Corporation
821 United Nations Plaza, New York; New York 10017
r Internationa! 1

READER'S COMMENT FORM
IBM Systern/360 Model 20
DPS/TPS Assembler language

GC24-9002-5

• How did you use this publication?
As a reference source .............................. D
As a classroom text .................................. D
As a self-study text .................................. D
• Based on your own experience, rate this publication
As a reference source:

Very

Good

Fair

Poor

Very
Poor

Good

As a text:

Very
Good

Good

Fair

Poor

Very
Poor

• What is your occupation? ................................................................................................................... .
• We would appreciate your other comments; please give specific page and line references
where appropriate. If you wish a reply, be sure to include your name and address.

• Thank you for your cooperation. No postage necessary if mailed in the U.S.A.

GC24-9002-5

YOUR COMMENtS, 'LEASE ...
This SRL manuai is part oi a library that serves as a reference source for systems anaiysts,
programmers and operators of IBM systems. Your answers to the questions on the back of this
form, together with your comments, win heip us produce better pubiications for your use. Each
reply will be carefully reviewed by the persons responsible for writing and publishing this
material. All comments and suggestions become the property of IBM.

()

c-;

»
r

o
Z

C)

-;
I

en

Please note: Requests for copies of publications and for assistance in utilizing your IBM system should be directed to your IBM representative or to the IBM sales office serving your
iocaiity.

r
Z

m

Fold

Fold

.............................................................................................................................
FIRST CLASS
PERMIT NO. 1359
WHITE PLAINS. N. Y.

BUSINESS R EPL Y MAIL
NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES

POSTAGE WILL BE PAID BY ...

IBM Corporation
112 East Post Rcad

White Plains. N. Y. 10601

Attention: [)epar1ment 813 BP

..........................................................................................................................
Fold

Int.rnatio.allu.i•••• Machin •• Corporation
Data Prac •••i"1 DiYiaie.
112 East Po.t Rea., White Plai•• , N.Y. 10601
jUSAOniyj
IBM World Trad. Corporation
821 United Natians Plaza, N•• Yo~k, H•• York 10017
[International]

Fold



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
Producer                        : Adobe Acrobat 9.13 Paper Capture Plug-in
Modify Date                     : 2009:09:03 21:43:18-07:00
Create Date                     : 2009:09:03 21:43:18-07:00
Metadata Date                   : 2009:09:03 21:43:18-07:00
Format                          : application/pdf
Document ID                     : uuid:df7d7c27-4ebe-48d0-be6f-92d387b0b8ea
Instance ID                     : uuid:36828189-8962-4191-be4d-2be7dbc5e84c
Page Layout                     : SinglePage
Page Mode                       : UseOutlines
Page Count                      : 198
EXIF Metadata provided by EXIF.tools

Navigation menu