Académique Documents
Professionnel Documents
Culture Documents
S _fANDARD
SPACECRAFT
COMPUTER
HSSC -II
ASSEMBLER
LANGUAGE
(lI15A-CR-178827)
CCfSPO_I_IB !t55C-2
Fedezal
_ystens
tt87-7C5,
NASA 5&IIDAI_I_
5PACCR&FT
AESEBELEB
ZJ_(;OtGZ
(ZBtt
Div.)
249
1; Avail:
NZI5
0 O/61
CHANGE
NOTICE
This revision cancels and supersedes the change issued February 1, 1974.
Copies of this document may be obtained from the IBM Corporation
(Department U34), 150 Sparkrnan Drive, Huntsville, Alabama 35803.
HTC/0S
ASSEMBLER
LANGUAGE
This
publication
contains
specifications
for
the
IBM
System/360
Operating
System
Assembler
Language
(Level F) modified
to he compatible
with the extended
Hybrid
Technology
Computer
(HTC) j i.e., the HTC including
the short precision
option
and the double
precision
flxed-polnt
arithmetic
option.
write
The
assembler
programs
for
language
the HTC.
is
a
symbolic
programming
language
used to
The language
provides
a convenient
means
for
representing
the machine
instructions
and related
data necessary
to program
the
HTC.
The
IBM
HTC
Operating
System
Assembler
Program
processes
the
language
and provides
auxiliary
functions
useful
in
the
preparation
and
documentation
of
a
program,
and
includes
facilities
for processing
the
assembler
macro
language.
Part
I of
Part II of
language
-- the
this
publication
describes
this publication
describes
macro
language
-- used to
the
assembler
an extension
define
macro
language.
of
the
assembler
instructions.
PREFACE
This
assembler
publication
language
and
is
its
areference
features.
manual
for
the
programmer
using
the
are
chart
and
contains
macro
language
summary
Appendix
I
is
a
features
Appendix
J includes
samples
of
Knowledge
of HTC machine
operations,
particularly
storage
addressing,
data
formats,
and
machine
instruction
formats
and
functions,
is
prerequisite
to using
this publication,
as is experience
with
programming
concepts
and
techniques
or completion
of basic
courses
of instruction
in
these areas.
HTC machine
operations
are discussed
in the publication
"HTC
Principles
of
Operation."
Information
on
program
assembling,
linkage
editing,
executing,
interpreting
listings,
and
assembler
programming
considerations
is provided
in "OS Assembler
(F) Programmer's
Guide,"
Order
No. GC26-3756.
The
following
publications
OS
Introduction,
OS
Utilities,
Order
OS
Loader
Linkage
OS
Supervisor
OS
Data
Management
Macro
OS
Data
Management
Services
and
Order
are
No.
No.
Services
referred
to
in
this
publication:
GC28-6534
GC28-6586
Editor,
and
Order
Macro
No.
Instructions,
Instructions,
Guide,
GC28-6538
Order
Order
No.
Order
No.
No.
GC28-6646
GC26-3794
GC26-3746
i/ii
CONTENTS
PART
I --
SECTION
THE
1:
ASSEMBLER
LANGUAGE
INTRODUCTION
........................
i-i
Compatibility
i i
The
Assembler
Language
........................
Machine
Operation
Codes
......................
Assembler
Operation
Codes
.....................
Macro
Instructions
........................
i-i
1-2
1-2
1-2
The
Assembler
Program
Basic Functions
1-3
1-3
Programmer
Aids
Operating
System
SECTION
2:
...........................
1-3
Relationships
1-4
INFORMATION
2-1
GENERAL
Assembler
Language
Coding
Conventions
................
Coding
Form
............................
Continuation
Lines
........................
Statement
Boundaries
.......................
Statement
Format
.........................
2-1
2-1
2-2
2-2
2-2
Identlflcation-Sequence
Field
...................
Summary
of Statement
Format
....................
Character
Set ...........................
2-5
2-5
2-6
Assembler
Language
Structure
Terms and
Terms
Expressions
.....................
2-6
2-7
2-7
Symbols
Self Defining
Terms
Location
Counter
Reference
Literals
Symbol
Length
Attribute
Terms in Parentheses
Reference
Expresslons
Evaluation
of Expressions
Absolute
and Relocatable
2-7
2-10
2-13
2-14
..............
Expressions
2-15
2-16
.............
2-17
2-18
2-18
iii
SECTION3:
ADDRESSING
-- PROGRAM
SECTIONING
ANDLINKING ........
3-1
Addressing ..............................
Addresses -- Explicit and Implied .................
Base Register Instructions
....................
USING-- Use Base Address Register ..............
DROP-- Drop Base Register ..................
Programmingwith the USINGInstruction
..............
Relative Addressing ........................
3-1
3-1
3-1
3-2
3-4
3-4
3-6
3-6
3-7
3-8
3-8
3-8
3-9
3-10
3-11
3-14
3-14
3-15
3-17
3-18
3-18
3-19
3-20
SECTION
4:
iv
.....
MACHINE-INSTRUCTIONS
....................
4-1
4-i
4-1
4-2
4-4
4-5
4-5
4-6
4-6
4-7
4-7
4-8
4-8
4-8
SECTION
5:
Symbol
EQU
ASSEMBLER
Definition
-- EQUATE
INSTRUCTION
STATEMENTS
..............
5-1
Instruction
. ...................
Symbol
.......................
5-2
5-2
Operation
Code Definition
Instruction
................
OPSYN -- EQUATE
OPERATION
CODE
..................
Data Definition
Instructions
.....................
DC
DS
--
DEFINE
Operand
Operand
Operand
Operand
-- Define
Special
CONSTANT
Subfield
Subfield
Subfleld
Subfield
Storage
Uses of
. . ...........
..........
i:
Duplication
Factor
...........
2:
Type
..................
3:
Modifiers
................
4:
Constant
.............
.......................
the Duplication
Factor
............
Listing
Control
Instructions
.....................
TITLE
-- Identify
Assembly
Output
.................
EJECT
-- Start New Page
......................
SPACE
PRINT
--Space
-- Print
Listing
Optional
......................
Data
...................
Program
Control
Instructions
.....................
ICTL -- Input Format
Control
...................
ISEQ -- Input Sequence
Checking
..................
PUNCH -- Punch
a Card
.......................
REPRO -- Reproduce
Following
Card
.................
ORG -- Set Location
Counter
....................
LTORG -- Begin Literal
Pool ....................
Special
Addressing
Consideration
...............
Duplicate
Literals
......................
CNOP -- Conditional
No Operation
.................
COPY -- Copy Predeflned
Source
Coding
.....
..........
END -- End Assembly
........................
PART
2 --
SECTION
THE
6:
MACRO
INTRODUCTION
Macro
Instruction
The
Macro
Definition
The
Macro
Library
System
& Programmer
Macro
"
5-4
5-6
5-7
5-7
5-12
5-25
5-28
5-29
5-29
5-30
5-31
5-31
5-33
5-33
5-34
5-35
5-36
5-36
5-37
5-38
5-38
5-39
5-41
5-41
LANGUAGE
The
System
5-3
5-3
5-4
TO
THE
Statement
MACRO
LANGUAGE
.............
...................
.........................
..........................
Macro
Instructions
Definitions
................
......................
6-1
6-1
6-1
6-2
6-2
6-3
6-3
6-3
6-3
6-3
6-4
Organization'of
6-4
SECTION
MACRO
MEND
7:
HOW
--
Macro
this Part
TO
-- Macro
PREPARE
of
MACRO
Definition
Definition
the
Publication
DEFINITIONS
Header
Trailer
.............
..............
7-I
...................
7-i
. ..................
7-i
Macro
Instruction
Prototype
.....................
Statement
Format
.........................
7-2
7-3
Model
...........................
7-4
Symbolic
Parameters
.........................
Concatenating
Symbolic
Parameters
with Other Characters
or Other Symbolic
Parameters
..................
Comments
Statements
.........................
7-6
COPY
7-10
Statements
Statements
SECTION
Macro
8:
HOW
TO
WRITE
MACRO
Operands
INSTRUCTIONS
..............
8-i
......................
8-I
Format
...........................
8-3
Omitted
Operands
...........................
8-3
Operand
Subllsts
...........................
8-4
Inner
Macro
Levels
of
SECTION
SET
vi
...........................
Instruction
Statement
7-7
7-9
9:
Instructions
Macro
HOW
TO
.......................
Instructions
WRITE
8-6
.....................
CONDITIONAL
ASSEMBLY
INSTRUCTIONS
Symbols
.............................
Defining
SET Symbols
.......................
Using
Variable
Symbols
......................
8-7
.......
9-1
9-2
9-2
9-2
Attributes
Type
.............................
Attribute
(T')
Length
(L'), Scaling
(S'), and Integer
(I')
Count Attribute
(K')
.......................
Number
Attribute
(N') ......................
Assigning
Sequence
LCLA,
Attributes
to
Symbols.
Attributes
.....
................
Symbols
LCLB,
SETA
Set
--
Set
9-9
LCLC
-- Define
SET
Symbols
................
9-11
Arithmetic
Evaluation
Using
SETA
SETC
9-3
9-5
9-6
9-7
9-7
9-8
.......................
9-11
of Arithmetic
Expressions
...............
Symbols
........................
Character
9-12
9-i3-
........................
9-!5
Type Attribute
.........................
Character
Expression
.......................
Substring
Notation
........................
Using
SETC Symbols
.......................
9-16
9-16
9-17
9-18
SETB
Symbols
Conditional
--
Assembly
Conditional
ANOP
--
Assembly
Conditional
i0:
9-23
9-24
Branch
--
Branch
Unconditional
ACTR
SECTION
9-21
9-23
.....................
9-26
Loop
9-28
Counter
............
No
Operation
....................
9-28
Assembly
Elements
....................
9-29
EXTENDED
MEXIT
--
Macro
MNOTE
--
Request
FEATURES
Definition
for
Error
OF
Exit
THE
MACRO
LANGUAGE
..........
....................
Message
..................
Global
and Local Variable
Symbols
..................
Defining
Local
and Global
SET Symbols
...............
Using
Global
and Local
SET Symbols
................
Subscripted
SET Symbols
......................
i0-i
i0-i
10-2
10-4
10-5
10-5
I0-ii
vii
SYSTEM
VARIABLE
&SYSNDX
&SYSECT
SYMBOLS
.......................
-- Macro
Instruction
Index
................
-- Current
Control
Section
................
&SYSLIST
-- Macro
Instruction
Operand
10-12
10-12
10-15
...............
10-17
Keyword
Macro Definitions
and Instructions
..............
Keyword
Prototype
.........................
Keyword
Macro Instruction
.....................
10-18
10-18
10-19
Mixed-Mode
10-22
Macro
Mixed-Mode
Mixed-Mode
Macro
Definitions
and
Instructions
............
Prototype
.......................
Macro
Instruction
...................
Definition
Compatibility
10-23
10-23
....................
10-24
APPENDICES
APPENDIX
A"
CHARACTER
APPENDIX
B:
HEXADECIMAL-DECIMAL
NUMBER
APPENDIX
C:
MACHINE-INSTRUCTION
FORMAT
APPENDIX
D:
MACHINE-INSTRUCTION
MNEMONIC
APPENDIX
E:
ASSEMBLER
APPENDIX
F:
SUMMARY
APPENDIX
G:
MACRO
APPENDIX
H"
SAMPLE
APPENDIX
I:
ASSEMBLER
APPENDIX
J:
SAMPLE
viii
CODES
......................
INSTRUCTIONS
OF
PROGRAM
........
................
OPERATION
CODES
.......
F-I
..................
DEFINITIONS
FEATURES
COMPARISON
.................
D-I
E-I
G-I
......................
--
B-I
C-I
...................
SUMMARY
LANGUAGES
MACRO
TABLE
..................
CONSTANTS
LANGUAGE
CONVERSION
A- i
H- i
CHART
.....
I-I
J-i
_TIONS
Figures
Figure
Figure
Figure
2-1.
2-2.
2-3.
Figure
Figure
Figure
Figure
Figure
Figure
Figure
Figure
3-1.
4-1.
5-1.
5-2.
5-3.
5-4.
5-5.
5-6.
Coding
Form .......................
Punched
Card Form ....................
Assembler
Language
Structure--Machlne
and Assembler
Instructions
.....................
Multiple
Base Register
Assignment
...........
Extended
Mnemonic
Codes
.................
Type Codes for Constants
.............
Bit-Length
Specification
(Single'Constant)
.......
2-i
2-2
Bit-Length
Specification
(Multiple
Constants)
Bit-Length
Specification
(Multiple
Operands)
Floatlng-Polnt
External
Formats
.............
CNOP Alignment
...................
5-9
5-_0
5-19
5-40
2-8
3-5
4-9
5-7
5-9
.....
......
Tables
Table
Table
4-1.
4-2.
Address
Details
Specification
Details
..............
of Length
Specifications
in SS Instructions
4-3
. . . 4-5
ix/x
PART
I --
THE
ASSEMBLER
SECTION
i:
INTRODUCTION
SECTION
2:
GENERAL
SECTION
3:
ADDRESSING
SECTION
4:
MACHINE
SECTION
5:
ASSEMBLER
LANGUAGE
INFORMATION
AND
PROGRAM
INSTRUCTIONS
INSTRUCTIONS
SECTIONING
AND
LINKING
SECTION
Computer
programs
may
language
directly
interpreted
which
is much more meaningful
however,
must
be translated
execute
the
program.
This
program.
Of
the
various
symbolic
i:
INTRODUCTION
be
expressed
in
machine
language,
i.e.,
by the computer,
or in a symbolic
language,
to the programmer.
The
symbolic
language,
into machine
language
before
the computer
can
function
is
accomplished
by
a
processing
programming
languages,
assembler
languages
closest
to
machine
language
in form and content.
The assembler
discussed
in this manual
is a symbolic
programming
language
for
System/360.
It
enables
the programmer
to use all IBM System/360
functions,
as if he were coding
in System/360
machine
language.
The assembler
program
that processes
the language
translates
instructions
into machine-language
instructions,
assigns
storage
and
performs
auxiliary
functions
necessary
to
produce
an
machine-language
program.
are
language
the
IBM
machine
symbolic
locations,
executable
Compatibility
The
following
HTC assembler
exceptions:
The
le
HTC
I/O
uses
is
the standard
different
S/360
from
instruction
S/360
and
instruction.
The SI0 instruction
format
to
an
RS
format.
The S/360 TIO, HIO,
not supported
by the HTC assembler.
.
A new
instruction,
the
HTC.
The
operand
must be
.
The
HTC
Feature
_Direct
Timer
No
assembler
does
instructions,
Control
Feature
All
S/370
HTC
ASSEMBLER
Set
are
the
by
i.e.,
the
the
SlO
been changed
from SI
TCH instructions
are
has
been
added
and
S/360
Insert
the
HTC
for
the
storage
Floatin_
Point
Feature
instructions,
the
Channel
Command
the
supported
has
and
with
uses
an RS format
boundary.
the
Decimal
instructions
,
or
only
(TMRS)
support
instructions,
precision
option
option,
are not in
THE
not
instruction,
instructions
extended
and
TMRS instruction
has
aligned
on a halfword
(CCW)
assembler
instruction.
4.
Read
set
Storage
Key
tn'_
Word
(ISK)
assembler.
instructions
in
the
or the double
precision
fixed,point
the S/360 instruction
set.
short
arithmetic
LANGUAGE
language
is
collection
of
mnemonic
i-i
1.
.
System/360
machine-language
Operations
program.
(auxiliary
operation
functions)
codes.
to
be
performed
by
the
assembler
The
language
is
augmented
by
other
symbols,
supplied
by
programmer,
and
used to represent
storage
addresses
or data.
Symbols
easier
to remember
and code than their machine-language
equivalents.
of symbols
greatly
reduces
programming
effort
and error.
The
programmer
may
also
create
type
instruction.
A mnemonic
symbol,
supplied
operation
code of the instruction.
Machine
Operation
by
the
are
Use
of
instruction
called
a macro
the
programmer,
serves
as
the
Codes
The assembler
language
provides
mnemonic
machine-instruction
codes
for
all
machine
instructions
in
the
IBM
System/360
Instruction
Set and extended
mnemonic
operation
codes for
the
branch
instruction.
Assembler
Operation
The
assembler
operation
Universal
conditional
Codes
language
also
contains
mnemonic
assembler-instruction
operation
codes,
used to specify
auxiliary
functions
to be performed
by the
assembler.
These are instructions
to the
assembler
program
itself
and,
with a few exceptions,
result
in the generation
of no machine-language
code
by the assembler
program.
Macro
Instructions
The
assembler
instructions.
for
language
Macro
instructions
a
sequence
of
instructions
into
two
relate
the
instructions
at hand,
or
enables
the
programmer
are represented
by
machine
and/or
to
define
and
use
an operation
code
which
assembler
instructions.
stands
Macro
used in preparing
an assembler
language
source
program
categories:
system
macro
instructions,
provided
by IBM,
object
program
to components
of the operating
system;
and
created
by the
for incorporation
Programmer-created
macro
programmer
specifically
in a library,
available
instructions
are
used
macro
fall
which
macro
the
writing
of a program
and to ensure
that a standard
sequence
of instructions
is used
to accomplish
a desired
function.
For instance,
the logic of a program
may
require
the same instruction
sequence
to
be
executed
again
and
again.
Rather
than
code
this
entire
sequence
each
time
it
is
needed,
the
programmer
creates
a macro
instruction
to represent
the sequence
and
then,
each
1-2
time
the
sequence
is
needed,
the
programmer
simply
codes
the
macro
instruction
statement.
represented
by
the
macro
During
assembly,
the
instruction
is inserted
Part
II of this publication
discusses
defining
and using macro instructions.
the
sequence
of
in the object
language
and
instructions
program.
procedures
THE
ASSEMBLER
the
The assembler
program,
also referred
to as the "assembler,"
source
statements
written
in the assembler
language.
Basic
for
PROGRAM
processes
Functions
Processing
involves
the translation
of source
statements
into machine
language,
the assignment
of storage
locations
to
instructions
and
other
elements
of
the
program_
and the performance
of the auxiliary
assembler
functions
designated
by
the
programmer.
The
output
of
the
assembler
program
is the object
program,
a machine-language
translation
of the source
program.
The
assembler
furnishes
a
printed
listing
of
the
source
statements
and object
program
statements
and additional
information
useful
to the progra_ner
in analyzing
his program,
such as error
indications.
object
program
is in the format required
by the linkage
editor
component
Operating
System360.
(See the linkage
editor
publication.)
The
amount
of main storage
allocated
processing
determines
the maximum
number
of
may be present
in the source
program.
PROGRAMMER
to the
certain
assembler
language
for use
elements
The
of
during
that
AIDS
The
assembler
provides
auxiliary
functions
that assist
the programmer
in checking
and documenting
programs,
in controlling
address
assignment,
in
segmenting
a program,
in data and symbol
definition,
in
generating
macro
instructions,
and in controlling
the assembler
itself.
Mnemonic
operation
codes
for these functions
are provided
in the language.
Variety
in Data Representation:
Decimal,
binary,
hexadecimal,
or character
representation
of machine-language
binary
values
may
be
employed
by
the
programmer
in
writing
source
statements.
The
programmer
selects
the
representation
best suited
to his purpose.
Base Re_ister
Address
Calculation:
As
Principles
of
Operation,"
the
System/360
designation
of a base register
(containing
displacement
value
in specifying
a storage
the clerical
burden
of calculating
storage
symbolic
addresses
used by the programmer.
of
base
register
usage
and
the values
discussed
in
"IBM
System/360:
addressing
scheme
requires
the
a
base
address
value)
and
a
location.
The assembler
assumes
addresses
in these terms for the
The programmer
retains
control
entered
therein.
1-3
Relocatability:
format
enabling
other
suitable
The object
programs
relocation
from the
area.
produced
originally
by the
assembler
assigned
storage
are
area
in
a
to any
Sectioning
and
Linking:
The
assembler
language
and
program
provide
facilities
for partitioning
an assembly
into
one
or
more
parts
called
control
sections.
Control
sections
may be added
or deleted
when loading
the object
program.
Because
control
sections
do
not
have
to
be
loaded
contiguously
in
storage,
a
sectioned
program
may be loaded
and executed
even though
a continuous
block
of storage
large
enough
to
accommodate
the
entire
program
may not be available.
The
assembler
allows
symbols
to
be
defined
in
one assembly
and
referred
to in another,
thus effectlng
a link between
separately
assembled
programs.
This
permits
reference
to data and transfer
of control
between
programs.
A discussion
of sectioning
and linking
is contained
in
Section
3 under
the heading,
"Program
Sectioning
and Linking."
Program
Listings:
A
listing
of
the
source
program
statements
and
resulting
object
program
statements
may be produced
by
the
assembler
each
source
program
it assembles.
The programmer
can partly
control
form and content
of the listing.
Error
Indications:
actual
or potential
errors
are indicated
OPERATING
The
and,
as
operating
other
program
Editor.
magnetic
1-4
SYSTEM
the
for
the
As a source
program
is assembled,
it
is
analyzed
for
errors
in the use of the assembler
language.
Detected
in the program
listing.
RELATIONSHIPS
assembler
is a component
of the IBM
System/360
Operating
System
such,
functions
under
control
of
the
operating
system.
The
system
provides
the assembler
with
input/output,
library,
and
services
produced
needed
by the
in assembling
assembler
will
a source
program.
be linkage
edited
translates
for loading
linkage
into the
The output
object
by a S/360 Linkage
editor
HTC.
output
into
SECTION
2:
GENERAL
INFORMATION
This section
presents
conventions
and assembler
information
about
assembler
language
source
statement
structure
addressing.
ASSEMBLER
CONVENTIONS
Codin_
the
One
CODING
This
subsection
discusses
the
use of the assembler
language.
with
into
used
LANGUAGE
general
coding
conventions
coding
associated
Form
A source
program
is a sequence
of source
statements
that
are
punched
cards.
The standard
card form, IBM 6509 (shown
in Figure
2-2), can be
for
punching
source
statements.
These
statements
may be written
on
standard
llne of
columns
form for
The
coding
form,
coding
on the
GX28-6509
(shown
form ls punched
on
the
program
form correspond
identification
body
the
statement
columns
statement
of
form
to
and
(Figure
in Figure
into
one
card columns.
instructions
2-1)
is
to
2-1), provided
card.
The
Space is
keypunch
composed
of
by IBM
vertlca!
provided
on
operators.
two
fields:
the
the
field,
columns
1-71,
and
the
identlflcatlon-sequence
field,
73-80.
The
identlffcatlon-sequence
field
is
not
part
of
a
and is discussed
following
the subsection
"Statement
Format."
The
entries
(i.e., coding)
composing
a
of a
line
and,
if
needed,
columns
16-71
continuation
lines.
IBM ST,,,m IE0 A.._.,
XBN
statement
of
one
occupy
columns
1-71
or
two
successive
t_,.i ro_
I
+
|.| i !
_i[:I.
i
ti
ittt[l:i.t:t
tlitl
t.11II;tI1:1t_tt1I_It
Iillliiltll!lllI!l
illlilliillilllllll]I!lll]
lllillilllllllfI
,iiLi
Ill
;:L!!!_
II I I
.! ! ! i
i:::
!!!!
" : : i
i;
!
_]
,_i,ll,l[,,.llI:
i;I
l I I;I{
!!!;;!
;:t!:[!;L
: :
ill!
{llil
: :
;
r
:iiii i
i'|
.......
....
;l::i;lil
;;ililltlll
iiii
Coding
;'.lllillili
I1[
!!!1'!I"1II
;
'
i i I./:t I t I tl 11:tllt
:1::III!II
[II:;I;_i.t;
[HI t1t:71
T T
'
|
t
-
iiil'iiili!illl!iilii";li
i_
i
i
]
i!,l'_i]:li,i,l,lilllltll
ii,i ::illi,llll[llllililll.:ili
'
[:t1.1.ttl;t
I;;l lI;ltll
II [I I It;tI1t tt 1
I I I 1 I]i I II1f 1t
II I 1I: I[ 1::17;I,11
I::t:f I 11
I t1I! It 1t
l _
Ii I !!.1t I 1...1titl It II II 1i I !!i ttt1111
t] I
l_li_illii_;ll]illiillliiiili[
t_
:I1
' : ....
it....
t,,
iiiiillitlllllllililllliIillllllilil
iiiiiilllilllllllllillllllilllllllll
i!ltt
2-1.
ili
il!li!:llli
" I
;{Lti.l
li]
: :
Figure
illilt
itltlltl ;:I1t11Ittltit1II1111Iitt111I;1i:
li;tfllt];illltllll
11111ttltli[
!.I.t.! tlii1
tt 11.1 11 1I 1 II II tl I i II I I I li,tt
I1
1,I
ti
Form
2-1
1,'
;lll
ill
L,I
_111
I i
_llliittl
t
I
i
0818d_01_IIIIII
Figure
iIII$I!_
::
I ;I
1,11
IIitlt1:
)lltllllll]
_;_l_Tti7777117?;1771777t777777
'
I
'
_717171117i;71
iiI;
II_IilllOil[lEl_O_U_i_llilillllll_ZillS[91!_lllll'Jll_llllll
2-2.
Punched
Continuation
Card
Form
Lines
When it is necessary
followln 8 rules apply.
i.
e
3.
Write
the
Continue
columns
If
in
5.
6.
These
the
continue
statement
up
The
statement
enter
statement
through
column
character
(not
of the line.
is
not
16
statement
of
to be
the
maximum
Macro
instruction
can
that
Boundaries"
normal
of
and
the
before
line,
the
not
next
column
in
part
line,
71 of
column
72,
the
of
leaving
the
and
second
continue
llne.
finished
be
another
71.
character
followlng
has
because
assume
the
on
blank
16
finished
a continuation
llne,
rules
the statement
in column
1 through
15 blank.
column
"Statement
Statement
to
Enter a continuation
coding)
in column
72
line,
(see
I_1T1_1111_111_]
22_2
before
number
coded
of
on
source
column
71
continuation
as
many
statement
lines
of
lines
as
are
boundaries
the
is
third
two.
needed.
are
used
below).
Boundaries
Source
statements
are normally
contained
in columns
1-71 of statement
lines and columns
16-71 of any continuation
llnes.
Therefore,
columns
1,
71,
and
16 are referred
to as the "begin,"
"end,"
and "continue"
columns,
respectively.
(This convention
can be altered
by use of the
Input
Format
Control
[ICTL]
assembler
instruction
discussed
later in this publication.)
The continuation
character,
if used, always
immediately
follows
the
"end"
column.
Statement
Format
Statements
They
2-2
are,
from
may
left
consist
to
right:
of
one
to four
a name
entry,
entries
an
in
the
operation
statement
entry,
an
field.
operand
entry,
more
and a
blanks,
comments
and must
entry.
These
be written
in
The
coding
form (Figure
fleld,
a 5-character
operation
comments
field.
entries
must
be
the order stated.
separated
by
one
or
8-character
name
operand
and/or
If
desired,
the
programmer _can disregard
these boundaries
the name, operation,
operand,
and
comment
entries
in
other
subject
to the following
rules:
and write
positions,
The entries
must not extend
beyond
statement
boundaries
within
line
(either
the conventional
boundaries
if no ICTL statement
le
given,
or
instruction).
as
2.
The
entries
must
be
3.
The
entries
must
be separated
If used,
column.
a name
The
and
name
designated
in proper
entry
operation
description
of
the
by
must
the
sequence,
by
be
entries
including
name,
programmer
one
as
must
at
operation,
stated
or more
written
be
via
the
a
is
ICTL
previously.
blanks.
starting
in
the
begin
completed
in
the
first
least
one
operand,
blank
and
followlng
comments
the
entries
Name Entry:
The name entry is
a
symbol
created
by
the
programmer
to
identify
a
statement.
A name entry is usually
optional.
The symbol
must
consist
of eight
characters
or
less,
and
be
entered
with
the
first
character
appearing
in
the
begin
column.
The first character
must be
alphabetic.
If the begin
column is blank,
the assembler
program
assumes
no
name has been entered.
No blanks
can appear
in the symbol.
Operation
Entry:
The
operation
entry
is
the
mnemonic
operation
code
specifying
the machine
operation,
assembler,
or macro
instruction
operation
desired.
An
operation
entry
is
mandatory
and
cannot
appear
in
a
continuation
line.
It 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 Appendices
D and E of this publication.
Valid
operation
codes
consist
of
five
characters
or
fewer
for
machine
or
assembler-lnstruction
macro instruction
operation
entry.
operation
codes,
operation
codes.
No
or fewer
within
for
the
2-3
Operand
Entries:
Operand
upon by the instruction,
by
masks,
storage-area
lengths,
Depending
can be written.
many assembler
entries
identify
and describe
data
indicating
such things
as
storage
or types of data.
on the needs
of the instruction,
Operands
are required
for all
instructions
require
no operand.
Operands
must
be
separated
between
operands
_nd the
commas
normally
indicates
the end of the
The
operands
cannot
contain
by
commas,
and no blanks
that
_eparate
them.
The
operand
field.
embedded
If
character
representation
is
or immediate
data in an operand,
blanks,
e.g., C'A D'.
to be acted
locations,
blanks,
except
used to specify
the
character
as
can intervene
first
blank
follows:
a constant,
a literal,
string
can
contain
Comment
Entries:
Comments
are descriptive
items of information
about
the
program
that are shown on the program
listing.
All
256
valid
characters
(see
"Character
Set"
in
this
section),
including
blanks
can be used in
writing
a comment.
The entry can follow
the
operand
entry
and
must
be
separated
from
it
by a blank;
each line of comment
entries
cannot
extend
beyond
the end column
(column
71).
An entire
statement
field can be used for
a
comment
by
placing
an
asterisk
in the begin column.
Extensive
comment
entries
can be written
by
using
a series
of lines with an asterisk
in the begin
column
of
each
line
or
by
using
continuation
lines.
Comment
entries
cannot
fall between
a
statement
and its continuation
line.
entry
comma
In statements
is desired,
preceded
where an optional
the absence
of the
and
Name
For
instructions
needed.
followed
by
one
Operand
END
COMMENT
that
information
instructions,
2-4
or more
Operation
cannot
contain
Note:
Macro
prototype
statements
comments,
even if a comma is coded
For
operand
operand
refer
on
rules
to the
as
for
table
an
blanks,
operand
without
shown
the
entry
entry
as
follows:
entry,
operands
above.
operand
in Appendix
is omitted
but a comment
must be indicated
by
a
field
E.
of
this
comma
will
not
different
is
not
tolerate
assembler
Statement
Example:
The
followlng
example
illustrates
the
use
of
name,
operatlon_
operand,
and
comment
entries.
A compare
instruction
has been
named
by the symbol
COMP;
the
operation
entry
(CR)
is
the
mnemonic
operation
code
for
a reglster-to-reglster
compare
operation,
and the two
operands
(5,6) designate
the two general
registers
whose
contents
are to be
compared.
The comment
entry reminds
the programmer
that
he
is
comparing
"new sum" to "old" with this instruction.
Name
Operation
Operand
COMP
CR
5_6
Identiflcation-Sequence
NEW
SUM
TO
OLD
Field
The
identification-sequence
field of the coding
form (columns
73-80)
is
used
to
enter
program
identification
and/or
statement
sequence
characters.
The
entry is optional.
If the field_
or a portion
of it, is
used for program
identification,
the
identification
is
punched
in
the
source
cards
and reproduced
in the printed
listing
of the source
program.
To aid in keeping
source
statements
in
order,
the
programmer
can
number
the
cards
in this field.
These
characters
are punched
into their
respective
cards,
and
during
assembly
the
programmer
may
request
the
assembler
to
verify
this
sequence
by use of the Input Sequence
Checking
(ISEQ) assembler
instruction.
This instruction
is discussed
in Section
5,
under
"Program
Control
Instructions."
Summ-ry
of
Statement
The
entries
blank
and must be
comment(s).
are
and
Format
in
a statement
in the following
must always
be separated
by
order:
name,
operation,
Every statement
requires
an operation
entry.
optional.
Operand
entries
are required
for
most assembler
instructions.
The
statement
name
and
operation
line, including
at
The
name
and
operation
entries
must not
have
blanks
separate
them.
A name
entry
must
always
entries
least one
must
blank
entries
preceding
start
in
must
or
the
be
completed
following
the
not contain
following
begin
at least
one
operand(s),
in
the
operation
first
entry.
blanks.
Operand
the
commas
that
column.
2-5
If
the
column
after
new
statement.
If
following
line is treated
All
continue
the
end
the
as
column
after
a continuation
column
entries
must be contained
column
boundaries.
Character
statements
are
written
Letters
A through
Z,
Digits
0 through
Special
Characters
+ -
These
, =
. *
characters
and
( )
are
$,
ASSEMBLER
The
basic
structure
source
An
operation
An
operand
Comments
An
name
A
using
#,
designated
must
not
begin,
start
blank,
the
end,
and
the
following
characters:
represented
of
statement
the
line
is
by
the
in Appendix
designated
in comments,
card-punch
combinations
and
A.
In addition,
any of
the
anywhere
that characters
may
and
in
macro
instruction
STRUCTURE
A name
An
2-6
LANGUAGE
within
next
column
internal
bit configurations
listed
256
punch
combinations
may
be
appear
between
paired
apostrophes,
operands.
the
the end
line.
Set
Source
is blank,
is
entry
entry
the
composed
(usually
entry
entry
entry
language
can
be
stated
as
follows:
of:
optional).
(required)
(usually
required).
(optional).
is:
symbol.
operation
entry
is:
A mnemonic
operation
macro
instruction.
operand
entry
is:
code
representing
a machine,
assembler,
or
One or
more operands
composed
of one
in
turn,
are composed
of a term or
terms.
or
an
more expressions,
which,
arithmetic
combination
of
Operands
of machine
instructions
generally
represent
storage
locations,
general
registers,
immediate
data, or
Operands
of assembler
instructions
provide
the information
assembler
program
to
perform
the
designated
such
things
as
constant
values.
needed
by
the
operation.
Figure
2-3
depicts
this
structure.
Terms
shown in Figure
2-3 are
classed
as absolute
or relocatable,
depending
on
the
effect
of
program
relocatlon
upon
them.
Program
relocation
is the loading
of the object
program
into storage
locations
other than those originally
assigned
by
the
assembler.
A
term
is
absolute
if
its
value
does
not
change
upon
relocation.
A term is relocatable
if its value
changes
upon relocation.
The
as
following
outlined
TERMS
AND
in
subsection
Figure
"Terms
and
Expressions"
discusses
these
items
2-3.
EXPRESSIONS
TERMS
Every
term represents
assembler
(symbols,
symbol
may
be
inherent
in
An arlthemtic
assembler.
its
The
use.
following
the
a value.
This value
may
length attribute,
locatlon
term
itself
combination
material
of
(self-definlng
terms
discusses
is
reduced
each
type
be
assigned
by
counter
reference)
term,
to a
of
the
or
literal).
single
term
value
and
by
the
the
rules
for
to
represent
Symbols
A
symbol
locations
is
a character
or
arbitrary
or
combination
values.
and in operands,
provide
the
reference
a program
element.
and/or
i.
Ordinary
symbols.
2.
Variable
symbols.
3.
Sequence
symbols.
of
Symbols,
programmer
There are
characters
through
used
their
use
in
with an efficient
way to
three types of symbols:
Ordinary
symbols,
created
by the progra=mer
an operand,
must conform
to these rules:
for
use
as
name
fields
name
name
and
entry
2-7
Name
Entry
I
Isa
1,,o_man,oI
is on
I_,o_I'
Symbol
which
I_r"_
En'_
I
Operation
Ir_rvction
Operands
InstrucHon
that
ore compased
of on
Code I
ILl 11
Macro
Instruction
I
I
Exp
Exp(Exp,
I
or
Exp(Exp)
Exp
or
Expfesslon
Symbol
(AT or RT)
or
Combination
Variable
Term
Symbol
Arithmetic
of
Terms
I
or
I
Symbol
any one of
which
maybe
the fallowing
e.g.,
BETA
(AT or RT)
I
Counter
Reference i.e.,*
A Location
defining
Term (AT)
(RT)
1
i
A Literal
e'g"=F'1259'
IAttribute
Re|er-|
jence
e.g.,
|
(RT)
'$_.1
L
At_rlbur.
References
e.g.,
any one of
whlch
may be
the following
May
I
15
Coadltiorml
Figure
2-8
e.g.,X'C4'
be generated
(AT)
(__AT_)_)..J
AT = Absolute
by combination
e.g.,B'101'
of variable
Term
_TRelocatable
Te,m
e.g.,C'AB9'
language
characters.
(Conditional
assembly
only)
amNm_bly only.
2-3.
Assembler
Language
Structure
-- Machine
and
Assembler
Instructions
Exp)
The symbol
must
first
character
letters,
digits,
lo
2.
No
special
3.
No
blanks
In
the
The
READER
A23456
X4F2
are
may
allowed
sections,
are
LOOP2
N
S4
The
characters
following
following
not consist
of more
than eight
must
be a letter.
The other
or a combination
of the two.
valid
in
be
included
in
characters.
characters
may
The
be
a symbol.
a symbol.
the
term
symbol
refers
to ordinary
symbol.
symbols:
@B4
SAI
#56
following
256B
KECORDAREA2
symbols
are
invalid,
for
the
reasons
noted:
(first
character
is not alphabetic)
(more than eight characters)
(contains
a special
character
- *)
(contains
a blank)
BCD*34
IN AREA
Variable
symbols
must begin with an ampersand
(&) followed
by one to
seven
letters
and/or
numbers,
the
first
of
which
must
be
a
letter.
Variable
symbols
are used within
the source
program
or macro
definition
to
allow
different
values
to be assigned
to one symbol.
A complete
discussion
of variable
symbols
appears
in Section
6.
Sequence
symbols
consist
of a period
(.)
followed
by
one
to
seven
letters
and/or
numbers,
the
first
of which
must be a letter.
Sequence
symbols
are used to indicate
the position
of statements
within
the
source
program
or macro
definition.
Through
their use the programmer
can vary the
sequence
in which statements
are processed
by the assembler
program.
(See
the complete
discussion
in Section
6.)
NOTE:
Sequence
symbols
and variable
symbols
are used only
for
the
language
and
conditional
assembly.
Programmers
who
do
not use
features
need not be concerned
with these symbols.
macro
these
DEFINING
SYMBOLS:
The assembler
assigns
a value
to each
symbol
appearing
as
a
name
entry
in
a source
statement.
The values
assigned
to symbols
naming
storage
areas,
instructions,
constants,
and controlsections
are the
addresses
of the leftmost
bytes of the storage
fields
containing
the
named
items.
Since
the
addresses
of
these
items
may
change
upon program
relocation,
the
symbols
naming
them
are
considered
relocatable
terms.
A symbol
used as a name entry in the
Equate
Symbol
(EQU)
assembler
instruction
is
assigned
the value
designated
in the operand
entry of the
instruction.
Since
the
operand
entry
may
represent
a relocatable
value
or
2-9
an absolute
(i.e.,
nonchanging)
term
or
an
absolute
relocatable
equated
the
symbol
is
considered
depending
upon'the
value
it
a
is
to.
The
value
of a symbol
A symbol
is said
statement.
(A special
under
value,
term,
"Program
may
to be
case
Sectioning
not
be
negative
and
may
not
exceed
22_-i.
defined
when it appears
as the name of a source
of symbol
definition
is discussed
in Section
3,
and
Linking.")
Symbol
definition
also involves
the assignment
of a
length
attribute
to
the
symbol.
(The
assembler
maintains
an internal
table - the symbol
table - in which the values
and attributes
of symbols
are kept.
When
the
assembler
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 length,
in bytes,
of the storage
field whose
address
is represented
by
the symbol.
For example,
a symbol
naming
an instruction
that occupies
four
bytes
of
storage
has
a
length
attribute
of
4.
Note
that there are
exceptions
to this rule; for example,
in the case where
a symbol
has
been
defined
by
an
equate
to
location
counter
value
(EQU *) or to a selfdefining
term, the length
attribute
of the symbol
is i.
These
and
other
exceptions
are noted under
the instructions
involved.
The length
attribute
is never
affected
by a duplication
factor.
PREVIOUSLY
DEFINED
appearing
that the
entry
in
SYMBOLS:
Some
instructions
require
that
a symbol
in the cperand
entry be previously
defined.
This
simply
symbol,
before
its use in an operand,
must have appeared
as
a prior statement.
means
a name
GENERAL
RESTRICTIONS
ON SYMBOLS:
A symbol
may be defined
only once in an
assembly.
That is, each symbol
used as the name of
a
statement
must
be
unique
within
that
assembly.
However,
a symbol
may be used in the name
field more than once as a control
section
name
(i.e.,
defined
in the START,
CSECT,
or DSECT assembler
statements
described
in Section
3)
because
the
coding
of
a
control
section
may
be
suspended
and then resumed
at any
subsequent
point.
The CSECT or DSECT
statement
that
resumes
the
section
must
be
named
by the same symbol
that initially
named
the section;
thus,
the symbol
considered
that names
the section
must be
repeated.
to be duplication
of a symbol
definition.
Self-Definln_
A
self-defining
self-deflnlng
There
2-10
usage
is
not
Terms
is not assigned
defining
term
binary,
Such
term
are
and
term
is
one
whose
four
is always
types
character.
value
is
inherent
in
For example,
the
of 15.
The length
the
term.
decimal
attribute
It
selfof a
i.
of
Use
self-defining
of
these
terms:
terms
decimal,
is
spoken
hexadecimal,
of
as
decimal,
hexadecimal,
binary
value
they
b_nary,
or bit
Self-definlng
represent
do
or character
configuration
representation
they represent.
of
the
machine-language
terms
are
classed
as absolute
terms,
not change
upon program
relocation.
since
USING
SELF-DEFINING
TERMS:
Self-deflning
terms are the means
of
machine
values
or bit configurations
without
equating
the values
and using the symbols.
the
values
specifying
to symbols
Self-definlng
terms may be used to specify
such
program
elements
immediate
data,
masks,
registers,
addresses,
and address
increments.
type of term selected
(decimal,
hexadecimal,
binary,
or
character)
depend
on what is being specified.
as
The
will
truncation
or
padding
with
zeros
Decimal
Self-Defining
Term:
A
decimal
self-defining
term is simply
an
unsigned
decimal
number
written
as a sequence
of
decimal
digits.
Highorder
zeros may be used (e.g., 007).
Limitations
on the value
of the term
depend
on its use.
For example,
a decimal
term that designates
a
general
register
should
have
a
value
between
0 and 15; one that represents
an
address
should
not exceed
the size of storage.
In any case, a decimal
term
may not consist
of more than eight digits,
or exceed
16,777,215
(22_-i).
A decimal
examples
self-definlng
term is assembled
as
of decimal
self-defining
terms are:
Hexadecimal
Self-Definin_
of one to six hexadecimal
the letter
X: X'C49'.
Term:
digits
A hexadecimal
self-deflnlng
enclosed
by apostrophes
and
Each hexadecimal
digit is assembled
as
Thus,
a hexadecimal
term used to represent
of two hexadecimal
digits.
The maxlmumvalue
X'FFFFFF'.
The
Oi23-
0000
0001
0010
0011
hexadecimal
4- 0100
5- 0101
6- 0110
7- 0111
digits
89AB-
i000
i001
i010
i011
and
CDEF-
its binary
equivalent.
8, 147, 4092, and 00021.
their
bit
Some
term consists
preceded
by
its four-blt
binary
equivalent.
an elght-blt
mask would
consist
of
a
hexadecimal
term
is:
patterns
are
as
follows:
ii00
ii01
iii0
iiii
2-11
A
table
representation
Binary
for
converting
from
is provided
in Appendix
Self-Defining
Term:
A binary
hexadecimal
B.
self-definlng
unsigned
sequence
of is and 0s enclosed
letter
B, as follows:
B'10001101'.
This
shown,
occupying
one
byte.
A
binary
represented.
masks
Binary
or in
Test
The
following
Under
Mask (TM)
bit
by
bit,
representation
is used
logical
operations
against
representation
term
pattern
of
primarily
bits
written
in apostrophes
and
term would
appear
term
may
have
in
designated
example
illustrates
a binary
instruction.
The contents
of
the
is
represented
Name
Operation
Operand
ALPHA
TM
GAMMA,B'I0101101'
the
as
an
preceded
by the
in
storage
as
up
to
24 bits
bit
term used
GAMMA are
by
to decimal
patterns
of
as a mask in a
to be
tested,
binary
term.
Character
Self-Defining
Term:
A character
self-deflnlng
term consists
of
one to three characters
enclosed
by apostrophes.
It must
be
preceded
by
the
letter
C.
All letters,
decimal
digits,
and special
characters
may be
used in a character
term.
In addition,
any of the
remainder
of
the
256
punch
combinations
Examples
of character
C'/'
C'ABC'
may
be
designated
in a character
self-deflnlng
self-deflning
terms are as follows:
term.
Because
of the use
of
apostrophes
in
the
ampersands
in
the
macro
language
as syntactic
rule must be observed
when using
these characters
assembler
language
and
characters,
the following
in a character
term.
Each character
in the character
sequence
is assembled
as its elght-bit
code equivalent
(see Appendix
A).
The two apostrophes
or
ampersands
that
must
be
used to represent
an apostrophe
or ampersand
within
the character
sequence
are assembled
as an apostrophe
or ampersand.
2-12
Location
The
Counter
Location
Reference
Counter:
location
counter
is
used
to
assign
storage
addresses
to
program
statements.
It is the assembler's
equivalent
of the
instruction
counter
in the computer.
As each machine
instruction
or
data
area
is
assembled,
the
location
counter
is first adjusted
to the proper
boundary
for the item, if adjustment
is necessary_
and then incremented
by
the
length
of
the
assembled
item.
Thus, it always
points
to the next
available
location.
If the statement
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
the
assembler
program
Source
counter
and
statements
for that
maintains
manipulates
for each
section.
a location
each
counter
location
for
counter
each
control
section
as previously
section
are assigned
addresses
The
location
counter
for
from
each
of
described.
the location
successively
declared
control
section
assigns
locations
in consecutively
higher
areas
of
storage.
Thus, if a program
has multiple
control
sections,
all statements
identified
as belonging
to the first control
section
will be assigned
from
the
location
counter
for section
i_ the statements
for the second
control
section
will be assigned
from the location
counter
for
section
2,
etc.
This
procedure
is
followed
whether
the statements
from different
control
sections
are interspersed
or written
in control
section
sequence.
The location
counter
setting
can be controlled
by using
the START
and
ORG
assembler
instructions,
which are described
in Sections
3 and 5.
The
counter
affected
by either
of these assembler
instructions
is
the
counter
for
the
control
section
in whlch they appear.
The maximum
value
for the
location
counter
is 224-i.
The programmer
may refer
to the current
value
of the location
counter
at
any
place
in
a program
by using an asterisk
as a term in an operand.
The asterisk
represents
the
location
of
the
first
byte
of
currently
available
storage
(i.e.,
after any required
boundary
adjustment).
Using
an
asterisk
as
the operand
in a machlne-lnstructlon
statement
is the same as
placing
a symbol
in the name field of the statement
and
then
using
that
symbol
as
an
operand
of
the
statement.
Because
a location
counter
is
maintained
for
each
control
section,
a
location
counter
reference
designates
the
location
counter
for
the section
in which
the reference
appears.
A reference
to
the
location
counter
may
be
made
in
literal
constant
(i.e.,
the asterisk
may be used in an address
constant
in literal
form).
The address
of the instruction
containing
the
used for the value
of the location
counter.
A location
counter
may
not
be
symbol,
with
used
in
a
the exception
statement
which
requires
the
of the EQU and 0RG assembler
address
specified
literal
is
reference
use of a predefined
instructions.
2-13
Literals
A
_
literal
program.
It
term
is
is one
simply
of
three
constant
basic
ways
preceded
to
by
an
introduce
equal
data
sign
A
literal
represents
data
rather
than
a
reference
appearance
of a literal
in a statement
directs
the
assembler
assemble
the
data specified
by the literal,
store
this data
pool,"
and place the address
of the storage
field containing
the operand
field of the assembled
statement.
Literals
calculation,
out
the
provide
addresses,
a message)
instruction
a
means
indexing
of entering
constants
factors,
or words
or
into a program
by specifying
the
in which
it is used.
This is in
assembler
instruction
to enter the
name
of the DC instruction
in the
a machine-instruction
statement.
A
literal
term
cannot
A literal
cannot
modifies
storage.
be
be
data into
operand.
combined
used
as
the
with
When
a
explicit
base
literal
register
The
instruction
specified
coded
below
in an
shows
then using
is allowed
the
in
other
field
shift
use
Name
Operation
Operand
GAMMA
I0,=F'274'
as numbers
for
for
printing
the program
and
Only one literal
terms.
of an
instruction
instruction
address
one
data.
The
program
to
in a "literal
the
data
in
of
DC
is contained
in an instruction,
or an explicit
index register.
A literal
cannot be
"DC--Define
Constant").
to
the operand
using
the
any
it
of
(see
2-14
general,
as
literals
an operand.
can
They
be
cannot,
used
wherever
however,
be
that
an
specify
Section
I/O
an
5,
a literal.
using
of the
a literal
as the
instruction
will
NOTE:
If a literal
operand
is a self-deflnlng
term (X, C, B,
and the equal sign (=) is omitted,
the statement
may assemble
(see "Using
Self-Defining
Terms").
In
or
cannot
constant
The
statement
GAMMA
is
a
load
instruction
second
operand.
When assembled,
the second
operand
be the address
at which
the value F'274'
is stored.
permitted
in
to
receiving
A literal
cannot be
specified
in
instruction
(HIO, HDV, TIO, SIO, SIOF).
(such
phrases
constant
contrast
into
(=).
a
used
or
decimal)
without
error
storage
in
any
address
is
assembler
instruction
that requires
are considered
relocatable,
defined
symbol.
Literals
the literal,
rather
than
the literal
itself,
will be assembled
in
the
statement
that
employs
a
llteral.
The
assembler
generates
the literals,
collects
them, and places
them in a specific
area of storage,
as explained
in
the
subsection
"The
Literal
Pool."
A literal
is not to be confused
with the immediate
data in
an SI instruction.
Immediate
data is assembled
into the instruction.
Literal
llteral
Format:
being
information
descriptive
constant.
The assembler
requires
specified
as well as the
assists
portion
It may
the
of
also
a
description
literal
itself.
assembler
in assembling
the literal
the
literal
must
indicate
the
specify
the length
of
the
of
the
type
of
This descriptive
correctly.
format
of
The
the
constant.
The
method
of
describing
and specifying
a constant
as a literal
is
nearly
identical
to the method
of specifying
it in
the
operand
of
a
DC
assembler
instruction.
The major difference
is that the literal
must start
with
an
equal
sign
(-), which indicates
to the assembler
that a literal
follows.
The reader
is referred
to the
discussion
of
the
DC
assembler
instruction
operand
format
(Section
5)
for
the
means of
literal.
The type of literal
designated
in an instruction
is
for correspondence
with the operation
code of the instruction.
Some
=A (BETA)
=F'1234'
=C'ABC'
examples
of
llterals
are:
constant
--
address
---
a fixed-point
a character
specifying
a
not
checked
literal.
number
llteral.
with
a length
of
four
bytes.
The
Literal
Pool:
The literals
processed
by the assembler
are collected
and placed
in a special
area called
the literal
pool, and the
location
of
the
literal,
rather
than the literal
itself,
is assembled
in the statement
employing
a literal.
The positioning
of the literal
pool may be controlled
by the programmer,
if he
so
desfres.
Unless
otherwise
specified,
the
literal
pool is placed
at the end of the first control
section.
The
created.
programmer
may
also
However,
the sequence
pool
is
controlled
the literal
pool(s)
Symbol
the
Length
specify
in which
that
multiple
literal
pools
be
literals
are
ordered
within
the
by the assembler.
Further
information
on
is in Section
5 under
"LTORG--BeEIn
Literal
Attribute
The length
attribute
attribute
is made by
positioning
Pool."
Reference
of a
coding
Reference
in:
to
L'BETA
The
length
use of the length
explicit
length
attribute
attribute
given by
2-15
illustrates
the
the use
hlgh-order
or
of L'symbol
low-order
end
in moving
of
a character
storage
into
either
are
such
Name
Operation
Operand
A1
B2
HIORD
LOORD
DS
DC
MVC
MVC
CL8
CL2 'AB '
A1
names
AI (L'B2),B2
AI+L'AI-L' B2 (L' B2) ,B2
a storage
length
attribute
and is assigned
a
the
contents
of
field
eight
bytes
in
The
bytes
length
and
is
assigned
of 8.
B2 names
a character
constant
two bytes
in length
length
attribute
of 2.
The statement
named
HIORD
moves
B2
into the leftmost
two bytes
of AI.
The term L'B2 in
parentheses
provides
the length
specification
When the instruction
is assembled,
the length
of the machine
instruction.
two
constant
field.
statement
named LOORD moves
of AI.
The combination
of
required
by the
is placed
in the
the contents
of B2
terms
AI+L'AI-L'B2
instruction.
proper
field
into the
results
rlghtmost
in
the
addition
of
the
length
of
A1
to
the beginning
address
of AI, and the
subtraction
of the length
of B2 from this value.
The result
is the address
of the seventh
byte in field AI.
The constant
represented
by B2
is
moved
into
AI
starting
at
this
address.
L'B2 in parentheses
provides
length
specification
as
in HIORD.
Note:
As previously
stated,
the length
attribute
length
of
the
instruction
in which
it appears,
which
case the length
attribute
is i.
Terms
of
*
except
is
in
equal
an EQU
value;
thus,
to
the
to *, in
in Parentheses
Terms
parentheses,
in parentheses
are reduced
to a single
in effect,
become
a single
term.
Arithmetically
combined
terms,
enclosed
in parentheses,
combination
with terms outside
the parentheses,
as follows:
the
may
be
terms
in
used
in
14+BETA-(GAMMA-AMBDA)
When the assembler
program
encounters
terms in parentheses
in combination with other terms,
it first reduces
the combination
of terms inside
the
parentheses
to a single value
which may be absolute
or relocatable,
depend-
2-16
ing
rest
on the
of the
combination
combination
Terms
in
of
to
terms.
another
parentheses
This
value
then
single
value.
may
be
included
is
used
within
in
reducing
set
of
the
terms
in
parentheses:
A+B-(C+D-(E+F)+IO)
The
innermost
levels
of
parenthesis
occur
as
arithmetic
section
set
of
parentheses
terms
are
in
parentheses
a11owed;
is
evaluated
level
of
first.
parentheses
Five
is a left
"Expressions."
EXPRESSIONS
This
subsection
discusses
the
expressions
used
in coding
operand
entries
for source
statements.
Two
types
of
expressions,
absolute
and
relocatable,
are
presented
along
with
the
rules for determining
these
attributes
an
of an
As shown
arithmetic
expression.
in
Figure
2-3,
combination
an expression
is composed
of terms.
The followlng
of
are
a slngle
examples
term
or
of valld
expressions:
*
AREAI+X'2D'
*+32
N-25
FIELD+332
FIELD
BETA*10
B'IOI'
C'ABC'
29
L'FIELD
LAMBDA+GAMMA
(EXIT-ENTRY+I)+GO
_F'1234'
TEN/TWO
ALPHA-BETA/(IO+AREA*L'FIELD)-I00
The
rules
for
coding
expressions
are:
An expression
cannot start
Therefore,
the
expression
i.
pression
O-A+BETA
with an arithmetic
-A+BETA
is invalid.
cannot
An
expression
cannot
consist
4.
An
expression
cannot
have
5.
A multiterm
(+-/*).
the ex-
is valid.
An expression
succession.
operator,
However,
expression
contain
two
of more
more
cannot
than
contain
terms
or
than
five
a
16
two
operators
in
terms.
levels
of
parentheses.
literal.
2-17
Evaluation
A
value
of
Expressions
single-term
of the term
A
reduced
expression,
involved.
multiterm
expression,
to a single value,
as
i.
Each
5.
is
29,
e.g.,
follows:
BETA,
ENTRY-EXIT,
computed
result
always
result
10"1/2
Division
by
on
the
25*IO+A/B,
is
truncated
to
evaluated.
to
32 bits,
Arithmetic
operations
are performed
from
that
multiplication
and
division
are
subtraction,
e.g., A+B*C
is evaluated
as
Division
of
the
whereas
takes
*, L'SYMBOL,
BETA+IO,
Every expression
is computed
the rightmost
24 bits.
The
.
term
e.g.,
is
the
value
of
the
and
then
left
to
right
except
done before
addition
and
A+(B*C),
not
(A+B)*C.
expression.
yields
an integer
result;
any fractional
is
dropped.
E.g.,
1/2"10
yields
a zero
yields
5.
zero
is
permitted
and
Parenthesized
multiterm
subexpressions
of
the
terms
in the expression,
e.g., in
the term CON-10
is evaluated
first and
the
computing
the final value
of the expression.
yields
zero
portion
result,
result.
are processed
before
the
rest
the expression
A+BETA*(CON-10),
resulting
value
is
used
in
Negative
values
are carried
in twos complement
form.
Final values
of
expressions
are the rightmost
24 bits of the results.
Intermediate
results
have a range
of -231 through
231-1.
However,
the value
of an expression
before truncation
must be in the range -224 through
22_-i or the results
will
be meaningless.
A negative
result
is considered
to be
a
3-byte
positive
value.
NOTE:
In A-type
address
is
truncated
on
the
constant.
Absolute
and
constants,
the full 32-bit
final expression
left
to fit the specified
or implied
length
Relocatable
Expressions
An expression
relocation.
is
An expression
relocation.
is called
The
two
characteristics
2-18
types
from
called
of
result
of the
absolute
relocatable
expressions,
the
term
if
or
its
if
absolute
terms
value
its
and
composing
is
value
unaffected
depends
relocatable,
them.
by
upon
take
program
program
on
these
Absolute
Expression:
combination
arithmetic
relocatable
reference.
permitted
An
symbol,
any of
As
indicated
between
absolute
expression
(RT)--alone
terms
following
An absolute
expression
can be an
of absolute
terms.
An absolute
the self-definlng
in
Figure
2-3,
absolute
term can
term or any
be
a
non-
terms,
or the length
attribute
all arithmetic
operations
are
terms.
is absolute,
even
though
or
in
combination
with
it
may
absolute
contain
terms
relocatable
AT--under
the
conditions.
i.
There
must
be
an
even
number
of
relocatable
terms
in
the
ex-
pression.
The
relocatable
terms
must
be
paired.
Each
pair
of
terms
must
have
the same relocatability,
i.e., they appear
in the same control section
in this assembly
(see "Program
Sectioning
and
Linking,"
Section
3).
Each palr must consist
of terms with opposite
signs.
The paired
terms do not
have
to
be
contiguous,
e.g.,
RT+AT-RT.
No relocatable
tion.
Thus,
The pairing
relocatability)
a multiply
However,
or
divide
opera(RT-RT)*10
is valid.
of relocatable
terms
(with opposite
signs
and
the
cancels
the effect
of relocation
since both symbols
be relocated
by the same amount.
paired
terms
remains
constant,
Therefore
the value
represented
by
regardless
of
program
relocation.
same
would
the
For
example,
in the absolute
expression
A-Y+X,
A is an absolute
term, and X and
Y are relocatable
terms with the same relocatabillty.
If A
equals
50,
Y
equals
25, and X equals
10, the value of the expression
would be 35.
If X
and Y are relocated
by a factor of 100 their values
would
then be
125
and
110.
However,
the expression
would
still evaluate
as 35 (50-125+110135).
An
lute
absolute
expression
The following
term; X and Y
reduces
to a
single
absolute
value.
examples
illustrate
absolute
expressions.
A is an
are relocatable
terms with the same relocatability.
abso-
A-Y+X
A
A*A
X-Y+A
*-Y
(a reference
relocatable
same
to the location
counter
must be paired
with another
term from the same control
section,
i.e., with the
relocatabillty)
Relocatable
changes
by
Expressions:
A
relocatable
n if the program
in which
it
expression
is
one
appears
is relocated
whose
value
n bytes
away
2-19
from
must
its originally
assigned
have a positive
value.
area
of
storage.
All
relocatable
A
relocatable
expression
can
be a relocatable
expression
can contain
relocatable
terms--alone
or
absolute
terms--under
the following
conditions:
i.
There
2.
All
must
the
be
an
odd
relocatable
described
number
terms
in Absolute
3.
The
unpaired
term
4.
No
relocatable
of relocatable
but
one
must
expressions
term.
A relocatable
in
combination
with
terms.
be
paired.
Pairing
is
Expression.
must
term
not
can
be
directly
enter
into
preceded
a
by
a minus
multiply
sign.
or
divide
operation.
A
value
relocatable
is the value
represented
associated
relocatable
expression
of the odd
reduces
to
relocatable
by
the
absolute
terms
with it.
The
relocatabillty
term.
a single
relocatable
term,
adjusted
by
and/or
paired
attribute
is
value.
the
relocatable
that
of
This
values
the
terms
odd
For example,
in the expression
W-X+W-IO,
W and X are relocatable
terms
with
the
same
relocatabillty
attribute.
If initially
W equals
I0 and X
equals
5, the value of the expression
is 5.
However,
upon relocation
this
value
will change.
If a relocation
factor
of i00 is applied,
the value
of
the expression
is 105.
Note
that the
value
of
the
paired
terms,
W-X,
remains
constant
at 5 regardless
of relocation.
Thus,
the new value
of the
expression,
105, is the result
of the value of the odd term (W) adjusted
by
the values
of W-X and i0.
The
following
examples
illustrate
relocatable
absolute
term, W and X are relocatable
terms with
the
attribute,
Y
is a relocatable
term with a different
bute.
Y-32*A
W-X+Y
*
W-X+*
(reference
to
location
counter)
2-20
=F'1234'(literal)
A*A+W-W+Y
Y
expressions.
A is an
same
relocatability
relocatabillty
attri-
SECTION
S:
ADDRESSING
-- PROGRAM
SECTIONING
AND
LINKING
ADDRESSING
The IBM HTC addressing
technique
requires
the use of a base
register,
which
contains
the base address,
and a displacement,
which
is added
to the
contents
of the base register.
The
programmer
may
specify
a
symbolic
address
and request
the assembler
to determine
its storage
address
composed
of
a
base
register
and
a displacement.
The programmer
may rely on the
assembler
to perform
this service
for
him
by
indlcatin_
which
general
registers
are
available
for assignment
and what values
the assembler
may
assume
each contains.
The programmer
may use as many or as
few
registers
for this purpose
as he desires.
The only requirement
is that, at the point
of
reference,
a
register
containing
an
address
from the same control
section
is available,
and that this address
is less than or
equal
to
the
address
of
the item to which the reference
is being made.
The difference
between
t_e two addresses
may not exceed
4095 bytes.
ADDRESSES
-- EXPLICIT
AND
IMPLIED
An address
is composed
of a displacement
plus the contents
register.
(In
the
case
of
RX
instructions,
the contents
register
are also used to derive
the address
in the machine.)
The
programmer
writes
displacement
and
the
base
addresses
a base register
may
He
address.
writes
an implied
address
by specifying
an
The assembler
has the facility
to
select
REGISTER
order
absolute
a
base
or relocatable
register
and
explicit
address
from an
(i) what base registers
The
programmer
conveys
USING
and DROP assembler
INSTRUCTIONS
a
base
an index
an
explicit
address
by
specifying
the
register
number.
In
designating
explicit
not be combined
with
a
relocatable
symbol.
compute
a
displacement,
thereby
generating
an
implied
address,
provided
that it has been informed
are available
to it and (2) what each
contains.
this
information
to
the
assembler
through
the
instructions.
BASE
of
of
to
use
symbols
in
the
operand
statements,
the programmer
must (i) indicate
a USING
statement,
that one or more general
as base registers,
(2) specify,
by means
of
enable
programmers
as
operands
of
of base
registers
field
to
use
machineand
the
of machine-instruction
to the assembler,
by means
of
registers
are available
for use
the USING
statement,
what value
3-1
each base register contains, and (3) load each base register
he has specified for it.
--
The
available
Use
Base
Address
USING instruction
for use as base
Register
indicates
registers.
general
registers
also states
the
are
base
address
values
that
the assembler
may assume
will be in the registers
at
object
time.
Note that a USING
instruction
does
not
load
the
registers
specified.
It is the programmer's
responsibility
to see that the specified
base
address
values
are
placed
into
the registers.
Suggested
loading
methods
are
described
in
the
subsection
"Programming
with
the
USING
Instruction."
A reference
to any name in a control
section
cannot
occur
in
a
machine
instruction
or
an
S-type
address
constant
before
the USING
statement
that makes
that
name
addressable.
The
format
of
the
USING
instruction
statement
is:
Name
Operation
Operand
USING
From
se-
2-17
expressions
of the form
r2,r3,...,r16
quence
symbol
v,rl,
or
blank
Operand
v must be an absolute
or relocatable
expression.
negative
number
whose
absolute
value
does
not exceed
224 . No
permitted.
Operand
specifies
a value
that
the
assembler
It may
literals
can
use
be a
are
as
base
address.
The
other
operands
must
be
absolute
expressions.
The
operand
rl specifies
the general
register
that can be
assumed
to
contain
the
base
address
represented
by
operand
v.
Operands
r2, r3, r4, . .
specify
must
3-2
registers
that can be assumed
to contain
v+4096,
.,
respectively.
The values
of the operands
rl,
be between
0 and 15.
For example,
the statement:
v+8192,
r2, r3,
v+12288,
. . ., r16
Name
I!
Operation
IOporand
USING
*, 12,13
tells
the assembler
it may assume
that the current
value
of
the
location
counter
will be in general
register
12 at object
time, and that the current
value
of
the
location
counter,
incremented
by 4096, will be in general
register
13 at object
time.
If the programmer
changes
the value
in a base register
currently
being
used,
and wishes
the assembler
to compute
displacement
from this value,
the
assembler
must be told 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+I000
is the value in register
9.
Name
Operation
Operand
USING
ALPHA,9
USING
ALPHA+IO00,9
If
the programmer
can use general
register
conditions:
has to refer
0 as a base
I.
The value
of operand
v must
zero or simply
relocatable.
2.
Register
The
assembler
0 must
be
assumes
be
specified
that
regardless
of
the
value
operand
v were absolute
or
that
subsequent
registers
4096,
8192, etc.
as
either
absolute
operand
rl.
register
of operand
relocatable
specified
bytes
to
contains
Replacing
2.
Loading
register
the
new
0 in
register
the
or
zero.
relocatable
Therefore,
v, it calculates
displacements
zero.
The
assembler
also
in the same USING
statement
NOTE:
If register
0 is used as a base
register,
the
relocatable,
despite
the
fact
that
operand
v may be
program
can be made relocatable
by:
i.
of storage,
he
the
following
USING
with
as if
assumes
contain
program
is
relocatable.
not
The
statement.
a relocatable
value.
3-3
3.
DROP
--
Base
Register
available
register
The
format
of the
Name
Operation
Operand
A se-
DROP
Up to 16 absolute
expressions
of the
form rl, r2,
r3,...,r16
quence
symbol
or
blank
that
DROP
The expressions
indicate
general
registers
previously
named
in a USING
statement
that are now unavailable
for
base
addressing.
The
following
statement,
for
example,
prevents
the assembler
from using
registers
7 and
ii:
Name
Operation
Operand
DROP
7,11
It is not necessary
to use a DROP
statement
being
used is changed
by a USING
statement;
nor
at the end of the source
program.
when
the
base
are DROP statements
A register
available
again
instruction
PROGRAMMING
as
The
often
WITH
made
unavailable
by
a
DROP
by a subsequent
USING
instruction.
THE
USING
can
address
needed
be
made
INSTRUCTION
USING
(and DROP)
instructions
may be used
as needed,
to indicate
the general
registers
anywhere
that
in a program,
are
available
for
use
as
base
registers
and the base address
values
the assembler
may
assume
each contains
at execution
time.
Whenever
an address
is
specified
in
a machine-instruction
statement,
the assembler
determines
whether
there
is an available
register
containing
a suitable
base address.
A register
is
considered
available
for a relocatable
address
if it
was
specified
in
a
USING
instruction
to have a relocatable
value.
A register
with an
value
is
available
only for absolute
addresses.
In either
case,
address
is considered
suitable
only if it is less
than
or
equal
address
of the item to which
the reference
is made.
The difference
absolute
the base
to
the
between
the
the
3-4
two
addresses
may
not
exceed
4095
bytes.
In
calculating
base
Operation
Operand
BEGIN
BALR
USING
2,0
*,2
END
BEGIN
FIRST
LAST
In
the preceding
sequence,
the BALR instruction
loads register
2 with
the address
of the first storage
location
immediately
following
In
this
case,
it
is
the
address
of
the
instruction
named
FIRST.
The USING
instruction
indicates
to
the
assembler
that
register
2
contains
this
location.
When
employing
this
method,
the
USING
instruction
must
immediately
follow
the
BALR
instruction.
No
other
USING
or
load
instructions
of FIRST.
are
required
if the
location
named
LAST
is within
4095
bytes
In Figure
3-1, the BALR and LM instructions
load registers
2-5.
The
USING
instruction
indicates
to
the
assembler
that these registers
are
available
as base registers
for addressing
a maximum
of 16,384
consecutive
bytes
of
storage,
beginning
with the location
named HERE.
The number
of
addressable
bytes may be increased
or
registers
designated
by
the
USING
address
constants
specified
in the DC
Name
Operation
BEGIN
HERE
BASEADDR
FIRST
decreased
by altering
the
number
and LM instructions
and the number
instruction.
of
of
Operand
BALR
USING
LM
B
DC
2,0
HERE,2,3,4,5
3,5,BASEADDR
FIRST
A(HERE+4096,HERE+8192,HERE+I2288)
LAST
END
Figure
3-1.
Multiple
BEGIN
Base
Register
Assignment
3-5
RELATIVE
ADDRESSING
Relative
addressing
is the technique
of
addressing
instructions
and
data
areas
by
designating
their
location
in
relation
to the location
counter
or to some symbolic
location.
This type of addressing
is always
in
bytes,
never
in bits, words,
or instructions.
Thus,
the
expression
*+4
specifies
an
address
that is four bytes
greater
than the current
value
of
the location
counter.
In
the
sequence
of
instructions
shown
in
the
following
example,
the
location
of
the
CR
machine
instruction
can be
expressed
in two ways, ALPHA+2
or BETA-4,
because
all of the
mnemonics
in
the example
are for 2-byte
instructions
in the RR format.
Name
Operation
Operand
ALPHA
LR
CR
BCR
AR
3,4
4,6
1,14
2,3
BETA
PROGRAM
It
SECTIONING
is
AND
often
LINKING
convenient,
sections.
The sections
object
program.
The
multisectioned
programs
programs
or program
Sectioning
written
without
program
need not
sections,
which
or
necessary,
to write
a large
may be assembled
separately,
then combined
assembler
provides
facilities
for
and
symbolically
linking
separately
program
in
into one
creating
assembled
sections.
a program
is
optional,
and
many
programs
can
best
be
sectioning
them.
The programmer
writing
an unsectioned
concern
himself
with the subsequent
discussion
of
program
are called
control
sections.
He need not employ
the CSECT
instruction,
which
is
used
to
identify
the
control
sections
of
a
multisection
program.
Similarly,
he
need
not concern
himself
with
the
discussion
of symbolic
linkages
if his program
neither
requires
a
linkage
to
nor
receives
a linkage
from another
program.
He may, however,
wish to
identify
the program
and/or
specify
a tentative
starting
location
for
it,
both of which may be done by using
the START instruction.
He may also want
to
employ
the
dummy
section
feature
obtained
by
using
the DSECT
instruction.
NOTE:
Program
sectioning
and
linking
is
closely
related
to
the
specification
of
base registers
for each control
section. _ Sectioning
and
linking
examples
are
provided
under
the
heading
"Addressing
External
Control
Sections."
3-6
CONTROL
SECTIONS
The
concept
of program
sectioning
is a consideration
at coding
time,
assembly
time, and load time.
To the programmer,
a program
is
a
logical
unit.
He
may want to divide
it into sections
called
control
sections;
if
so, he writes
it in such a
way
that
control
passes
properly
from
one
section
sections
to
in
another
storage.
regardless
A control
relocated,
independently
impairing
the operating
the CSECT
instruction.
starting
location,
the
control
section.
of
the relative
section
is a block
physical
position
of coding
that
of
can
the
be
of other coding,
at load time without
altering
or
logic of the program.
It is normally
identified
by
However,
if it is desired
to
specify
a
tentative
START instruction
may be used to identify
the first
To the assembler,
there is no such thing as a program;
instead,
there
is
an assembly,
which
consists
of one or more control
sections.
(However,
the terms
assembly
and
program
are
often
used
interchangeably.)
An
unsectioned
program
is treated
as a single
control
section.
To the linkage
editor,
there are no programs,
only control
sections
that must be fashioned
into a load module.
The output
from the assembler
is called
an object
module.
It contains
data
required
for
linkage
editor
processing.
The
external
symbol
dictionary,
which
is part of the object
module,
contains
information
the
linkage
editor
needs
in order to complete
cross-referenclng
between
control
sections
as
it
combines
them into an object
program.
The linkage
editor
can take control
sections
from various
assemblies
and combine
them properly
with
the
help
of
the
corresponding
control
dictionaries.
Successful
combination
of
separately
assembled
control
sections
depends
on
the
techniques
used to provide
symbolic
linkages
between
the control
sections.
Whether
the
programmer
writes
an unsectioned
program,
a multisection
program,
or part of a multisection
program,
he still knows what
eventually
will be entered
into storage
because
he has described
storage
symbolically.
He
may
not
know
where
each section
appears
in storage,
but he does know
what storage
contains.
There is no constant
relationship
between
control
sections.
Thus, knowing
the location
of one control
section
does not make
another
control
section
addressable
by relative
addressing
techniques.
The programmer
must be aware that there is a limit to external
symbol
dictionary
entries.
The total number
of control
sections,
dummy sections,
unique
symbols
in EXTRN and WXTRN statements,
V-type
address
constants,
and
external
dummy sections
must not exceed
255.
Certain
constants
may
cause
a
symbol
to
be
counted
twice:
e.g., external
symbols
in V-type
address
constants
(unless
they are
explicitly
defined
in
an
EXTRN
or
WXTRN
statement),
and
external
dummy
sections
implicitly
address
constants
and corresponding
DSECT
statements.
statements
are
described
in this section;
V-type
and
Section
5 under
"Operand
Subfield
4:
Constant."
defined
by Q-type
EXTRN
and
WXTRN
Q-type
constants
in
3-7
Control
Section
Location
Assignment
Control
sections
can be intermixed
because
the
assembler
provides
a
location
counter
for
each
control
section.
Locations
are assigned
to
control
sections
as if the sections
are placed
in storage
consecutively,
in
the same order as they first occur in the program.
Each
control
section
subsequent
to the first begins
at the next available
double-word
boundary.
FIRST
CONTROL
The
SECTION
first
control
section
of
program
has
the
following
special
properties:
I.
START
--
Its initial
location
absolute
value,
if the
It contains
the
has been altered
Start
counter
value
may
be
specified
START
instruction
is used.
literals
of the program,
by LTORG
statements.
The
their
an
positioning
Assembly
unless
as
format
of
the
START
give a
It may
first
instruction
Name
Operation
Operand
Any
symbol
or blank
START
name
to
the
first
also be used to specify
control
section
of
statement
is
as
(or
an
the
follows:
self-defining
term,
or blank
If
a symbol
names the START instruction,
the symbol
is established
as
the name of the control
section.
If not, the control
section
is considered
to be unnamed.
All subsequent
statements
are assembled
as
part
of
that
control
section.
This
continues
until
a CSECT instruction
identifying
a
different
control
section
or a DSECT
instruction
is encountered.
A
CSECT
instruction
named
by
the
same
symbol
that names a START
instruction
is
considered
to identify
the
continuation
of
the
control
section
first
identified
by
the
START.
Similarly,
an unnamed
CSECT
that occurs
in a
program
initiated
by
an
unnamed
START
is
considered
to
identify
the
continuation
of the unnamed
control
section.
The
symbol
in
the
represents
the address
length
attribute
of i.
3-8
name
of
field
the
is
first
a valid
relocatable
symbol
byte
the
section.
of
control
whose
value
It has
The
assembler
uses
the
self-definlng
term
specified
by
the
operand
as
the
initial
location
counter
value
of the Program.
This value should
be
divisible
by eight.
For example,
either
of the following
statements
could
be
used
to
assign
the
name
PROG2
to the first control
section
and to
indicate
an initial
assembly
location
counter
value
of
2040.
If
the
operand
is
omitted,
the assembler
sets the
of the program
at zero.
The location
counter
boundary
when the value
of the START operand
Name
Operation
Operand
PROG2
PROG2
START
START
2040
X'7F8'
Note:
cause
Control
CSECT
Identify
Control
The CSECT
instruction
a
control
section.
The
follows:
not be
to be
identifies
format of
the
the
preceded
by
assembled.
beginning
or the
CSECT
instruction
Operation
Operand
Any
symbol
or blank
CSECT
Not used;
be blank
If a symbol
name of the
location
counter
value
at the next doubleword
divisible
by
eight.
names
the CSECT
control
section;
instruction,
otherwise
continuation
statement
is
of
as
is established
is considered
to
as
be
should
the symbol
the section
unnamed.
All statements
following
the CSECT are assembled
control
section
until a statement
identifying
a different
is encountered
(i.e.,
another
CSECT or a DSECT
instruction).
The symbol
in the name field is a valid relocatable
represents
the address
of the first byte of the control
length
attribute
of i.
Several
CSECT
will
First
Section
Name
the
initial
is set
is
not
statements
with
the
same
name
as part
control
symbol
section.
may
of
that
section
whose
value
It has
a
appear
within
program.
The first is considered
to identify
the beginning
of the
control
section;
the rest identify
the resumption
of the section.
Thus, statements
from
different
control
sections
may be interspersed.
They are properly
assembled
(aSsigned
contiguous
storage
locations)
as long as the statements
3-9
First
All
control
Control
machine
sections
are
identified
by
the
appropriate
CSECT
Section
instructions
and
many
assembler
instructions
have
to
belong
to a control
section.
If such an
instruction
precedes
the
first
CSECT
instruction,
the assembler
will
consider
it to belong
to an unnamed
control
section
(also referred
to as private
code),
which will be the first
(or only)
control
section
in the module.
do
The following
instructions
will not cause
not have to belong
to a control
section:
Common
Dummy
Macro
Control
to
happen,
since
they
Sections
Conrol
Sections
Definitions
Conditional
Comments
COPY
DXD
EJECT
ENTRY
EXTRN
ICTL
this
Assembly
(depends
on the
Instructions
copied
code)
ISEQ
OPSYN
PRINT
PUNCH
REPRO
SPACE
TITLE
WXTRN
No
other
assembler
instruction,
since START,
in the program.
or
machine
if used, must
An
involuntary
unnamed
trouble
if literals
are used.
fact,
that unless
he codes an
instructions
initiate
the
can
first
precede
control
a START
section
control
section
at the beginning
can cause
Then the programmer
must
be
aware
of
the
LTORG
statement
in each control
section
where
he
uses literals,
literals
will be assembled
in the first control
section,
which
will in this case
be
the
involuntary
section.
If
that
control
section
does
not
establish
addressability
(through
USING),
an
addressability
error will be the result.
Therefore
statements
like
EQU
should
not be placed
before
the first CSECT or the START instruction.
Resumption
accomplished
one
unnamed
3-10
of
through
control
an
unnamed
unnamed
section.
control
section
at
CSECT
statements.
A program
Of course,
it is possible
later
points
can
be
can contain
only
to write
a program
--
contain
CSECT or START
control
section.
Identlfy
A dummy
not
part
describing
storage.
Dummy
section
statements.
It will
then
be
assembled
Section
represents
of the object
the layout
of
(It is assumed
control
section
program.
A dummy
an area of storage
that the storage
that
is assembled
but
is
section
is a convenient
means
of
without
actually
reserving
the
is reserved
either
by some other
Name
Operation
Operand
A vari-
DSECT
Not used;
be blank
able symbol
or ordinary
symbol
The symbol
represents
the
should
is a valid
relocatable
symbol
whose
section.
It has a length
attribute
value
of i.
Program
statements
belonging
to dummy
sections
may
be
interspersed
throughout
the
program
or may be written
as a unit.
In either
case,
the
appropriate
DSECT instruction
should
precede
each set of statements.
When
multiple
DSECT
instructions
with the same name are encountered,
the first
is considered
to initiate
the dummy section
and the rest
to
continue
it.
All assembler
language
instructions
may occur within
dummy sections.
Symbols
that
name statements
in a dmmmy section
may be used in USING
instructions.
Therefore,
they may
be
used
in
program
elements
(e.g.,
machlne-lnstructlons
and data definitions)
that specify
storage
addresses.
An example
illustrating
the use of a
dummy
section
appears
subsequently
under
"Addressing
Dummy
Sections."
Note___._!
Symbols
that name statements
in a dummy
section
may be used in Atype address
constants
only when they are paired
with
another
symbol
from
the
same
dummy
section
in
an
absolute
expression.
(See "Absolute
and
Relocatable
Expressions",
Section
2.)
For
example,
if
X
and
B
name
statements
in the same dummy section,
C DC A(B-X)
would
be valid,
but C DC
A(X) would be Invalld--yielding
a relocatability
error.
DUMMY
the
SECTION
relative
location
LOCATION
locations
counter
is
ASSIGNMENT:
of
named
always
A
program
set
to
location
counter
elements
in
zero
the
at
is used
a dummy
beginning
to
determine
section.
of
the
The
dummy
3-11
section, and the location values assigned to symbols that name statements
in the dummysection are relative to the initial
statement in the section.
ADDRESSING
DUMMY
SECTIONS:
The
programmer
may
wish
to
describe
the
format
of
an area whose storage
location
will not be determined
until
the program
is executed.
He can describe
the format
of the area in
a
dummy
section,
and
he
can
use
symbols
defined
in the dummy
section
as the operands
of
machine
instructions.
To effect
references
to the storage
area,
he
does
the following:
Provides
a USING
statement
specifying
both
a
general
register
that
the
assembler
can assign
to the machine-lnstructlons
as a
base register
and
a
value
from
the
dummy
section
that
the
assembler
may assume
the register
contains.
i.
to
The
the
Ensures
that the same
of the storage
area.
register
values
assigned
to symbols
initial
statement
of the
which
refer
to names defined
refer
to
storage
locations
register.
in
is
defined
section.
loaded
with
in a dummy
Thus, all
the
actual
address
section
are relative
machine-instructions
will,
at
address
execution
time,
loaded
into the
An example
is
shown
in
the
following
coding.
Assume
that
two
independent
assemblies
(assembly
i and assembly
2) have been loaded
and are
to be executed
as a single
overall
program.
Assembly
i is an input routine
that
places
a record
in a specified
area of storage,
places
the address
of
the input
area containing
the record
in general
register
3, and branches
to
assembly
2.
Assembly
2 processes
the record.
The
coding
shown
in
the
example
is from assembly
2.
The input area is described
in assembly
2 by the DSECT control
section
named
INAREA.
Portions
of
the
input
area
(i.e.,
record)
that
the
programmer
wishes
to work with are named
in the DSECT
control
section
as
shown.
register
section,
INAREA.
The
assembler
instruction
USING
INAREA,3
designates
general
3 as the base register
to be used in addressing
the DSECT
control
and
that general
register
3 is assumed
to contain
the address
of
Assembly
I, during
execution,
loads
the actual
beginning
the
input
area
in
general
register
3.
Because
the symbols
DSECT
section
are defined
relative
to the initial
statement
in
the address
values
they represent,
will,
at the time of program
be the actual
storage
locations
of the input area.
3-12
address
of
used in the
the section,
execution,
Name
Operation
Operand
ASMBLY2
BEGIN
CSECT
BALR
USING
2,0
*,2
USING
CLI
BE
INAREA,3
INCODE,C'A'
ATYPE
MVC
MVC
WORKA,INPUTA
WORKB,INPUTB
ATYPE
WORKA
WORKB
INAREA
INCODE
INPUTA
INPUTB
DS
DS
CL20
CL18
DSECT
DS
DS
DS
CLI
CL20
CLI8
END
The
actually
following
addressed:
programmer
described
by
example,
must
ensure
that
the dummy section
which
illustrates
a section
of code in his program
which
references
it.
Consider
how
a dmmny
section
should
is
the
no____tbe
3-13
Name
Operation
TEST
CSECT
HALF
CNOP
DS
DS
FULL
Operand
2,4
CL2
F
END
AREA
HALF
FULL
DSECT
DS
DS
CL2
F
Thus
FULL.
FULL
is
properly
aligned
without
skipping
any
bytes
between
section,
the location
of
FULL
be the same as the location
of
Note:
CNOP
To
EXTERNAL
DUMMY
External
allowing
the
and
then at
correct
this
SECTIONS
example
(ASSEMBLER
change
the
instruction
to CNOP
0,4.
F ONLY)
dummy
sections
facilitate
communication
between
programs
by
programmer
to define
work areas in several
different
programs
execution
to combine
them into one block
of storage
accessible
to each program.
Several
different
programs
may
be
assembled
together,
each
with
one or more external
dummy
sections
and after
the linkage
editor
processes
these programs,
the programmer
can allocate
storage
for the dummy
sections
in one block.
External
dummy sections
are defined
through
the use
of the DXD
instruction
or
a
DSECT
in
combination
with
a
Q-type
DC
instruction.
In
order
to allocate
the correct
amount
of storage
when the
program
below,
is executed,
within
one of
DXD
DEFINE
--
the
the
EXTERNAL
The
external
DXD instruction
dummy section;
computes
the
3-14
amount
of
programmer
programs.
DUMMY
must
use
CXD
instruction,
described
SECTION
(also referred
to
when
the assembler
storage
the
required
and
as a Pseudo
encounters
the
Register)
defines
a DXD instruction,
alignment
and
passes
an
it
this
information
to
the
dummy
external
the
sections.
The
will compute
the total length
for the DXD instruction
is:
format
Name
Operation
Operand
DXD
Duplication
factor,
type, length,
constant
symbol
of
The symbol
in the name field is a symbol
that usually
appears
as
a
Q-type
constant
in
the operand
field of a DC statement
later in the program.
It
has a length
attribute
of i.
The operand
form and alignment
are
the
same
as
that described
for the DS instruction.
If more than one external
dummy
section
with the same name is encountered
by the linkage
editor,
it
uses
the
largest
section
in computing
total length;
if two or more
identically
named
external
dummy
sections
have
different
boundary
alignments,
the
linkage
editor
uses
the
most
restrictive
alignment
in computing
total
length.
An external
dummy
section
is
generated
by
a
Q-type
address
constant
which references
a DSECT name.
CXD-
CUMULATIVE
LENGTH
EXTERNAL
DUMMY
The
CXD
instruction
allocates
storage
which will contain
the sum of
sections
when the program
is executed.
editor.
The instruction
format
is:
SECTION
a four-byte
the lengths
This sum
Name
Operation
Operand
Any symbol
or blank
CXD
Must
The
CXD
programs
the name
The
instruction
may
are being combined,
field has a length
following
example
be
full-word
of
all
is supplied
how
area in
dummy
linkage
blank
appear
anywhere
within
it may appear
in each
attribute
of 4.
shows
aligned
external
by the
external
a program,
program.
dummy
sections
or
The
if several
symbol
in
may
be
used.
3-15
ROUTINE
Name
Operation
Operand
ALPHA
BETA
OMEGA
DXD
DXD
CXD
2DL8
4FL4
DC
DC
Q(ALPHA)
Q(BETA)
ROUTINE
Name
Operation
Operand
GAMMA
DELTA
DXD
DXD
5D
10F
DC
DC
Q (GAMMA)
Q (DELTA)
ROUTINE
Name
Operation
Operand
EPSILON
DXD
4H
DC
Q(EPSILON)
storage
the C_
then
of
3-16
allocate
the
amount
the sum of
instruction
storage
that
is
the individual
lengths
will be
labeled
OMEGA.
Routine
A can
specified
in
the
CXD
location
,J
COM
-- DEFINE
The COM
storage
that
linked
and
BLANK
COMMON
CONTROL
assembler
instruction
may be referred
to by
loaded
Appearances
resumption
of the
for
execution
as
SECTION
identifies
independent
one
of
a
COM
statement
blank common
control
and reserves
assemblies
overall
program
after
section
the
initial
When several
assemblies
are loaded,
each designating
section,
the
amount
of
storage
reserved
is equal to
control
section
The format
is:
Name
Operation
Operand
COM
Blank
se-
quence
symbol
blank
and
the
indicate
a common
the longest
Name
the
control
common
The common
area may be broken
up into subfields
through
use of the
DC assembler
instructions.
Names
of subfields
are defined
relative
beginning
of the common
section,
as in the DSECT
control
section.
to
establish
since the COM
the
following
example,
established
relative
to
PDQ
one
or
It is necessary
statement
within
COM
XYZ
a common
area of
that
have
been
addressabillty
statement
itself
addressability
to
the
the named statement
XYZ.
Operation
Operand
L
USING
MVC
XYZ,I
PDQ(16),=4C'ABCD'
COM
DS
DS
16F
16C
No instructions
assembled.
Data can
DS
to
relative
to
a
named
cannot
have a name.
In
common
area
of
storage
is
I, =A(XYZ)
or constants
appearing
in a common
control
section
are
only be placed
in a
common
control
section
through
3-17
execution
assembler
of the program.
A blank
language
instructions.
common
control
If the assignment
of common
storage
is done
independent
assembly,
reference
to
a location
results
in the same location
being
referenced.
control
section
is assembled,
the initial
value
set to zero.
SYMBOLIC
section
may
include
any
LINKAGES
Symbols
may be defined
in one module
and referred
to in another,
thus
effectlng
symbolic
linkages
between
independently
assembled
program
sections.
The linkages
can be effected
only if the assembler
is
able
to
provide
information
about the linkage
symbols
to the linkage
editor,
which
resolves
these
linkage
references
at load time.
The assembler
places
the
necessary
information
in the external
symbol
dictionary
on the basis
of the
linkage
symbols
identified
by e.g.,
the ENTRY and EXTRN
instructions.
Note
that
these symbolic
linkages
are described
as linkages
between
independent
modules;
more
specifically,
they
are
linkages
between
independently
assembled
control
sections.
In
the
module
where
the
name),
it must also be identified
assembler
instruction
unless
statement.
It is identified
as
means
that
another
module
may
operation
or a data reference.
the control
dictionary.
linkage
symbol
is defined
(i.e.,
used as a
to the assembler
by means
of
the
ENTRY
the
symbol
is the name of a CSECT or START
a symbol
that names
an entry
point,
which
use that symbol
in order
to effect
a branch
The assembler
places
this
information
in
Similarly,
the module
that uses a symbol
defined
in some other module
must identify
it by the
EXTRN
or
WXTRN
assembler
instruction.
It
is
identified
as
an
externally
defined
symbol
(i.e.,
defined
in another
module)
that is used to effect
linkage
to the
point
of
definition.
The
assembler
places
this information
in the external
symbol
dictionary.
Another
way
address
constant.
to
The
obtain
symbolic
subsection
"Data
linkages,
Definition
is
by using
Instructions"
the V-type
in Section
5 contains
the details
pertinent
to writing
a V-type
address
constant.
It
is sufficient
here to note that this constant
may be considered
an indirect
linkage
point.
It is created
from an externally
defined
symbol,
but that
symbol
does not have to be identified
by an EXTRN
or WXTRN
statement.
The
V-type
address
constant
may be used for external
branch
references
(i.e.,
for effectlng
branches
to other programs).
It may not be used for external
data references
(i.e.,
for referring
to data in other programs).
ENTRY
-The
one
3-18
source
IDENTIFY
ENTRY
ENTRY-POINT
instruction
module
and
SYMBOL
identifies
referenced
by
linkage
other
symbols
modules.
that
are
defined
in
ENTRY
A se-
One
quence
symbol
or
b iank
or
more
reloca-
table symbols,
separated
by
commas,
that also
appear
as statement names
A source
module
may contain
a maximum
of
symbols
which
are not defined
(not appearing
invalid,
will also count towards
this maximum
i00
ENTRY
as statement
of i00 ENTRY
The symbols
in the ENTRY operand
field may
be
used
other
programs.
An
ENTRY
statement
operand
may
not
defined
in a dummy section
or in
a
blank
common
control
following
points
to
example
identifies
the program.
Name
--
statements
named
Operation
Operand
ENTRY
SINE,COSINE
Note:
Labels
entry points
to
statements.
EXTRN
the
of START
a module.
IDENTIFY
EXTERNAL
SINE
and
symbols.
names),
symbols.
ENTRY
although
as
operands
by
contain
a symbol
section.
The
COSINE
as
entry
treated
as
by
ENTRY
SYMBOL
The
EXTRN
instruction
identifies
linkage
symbols
used by one source
module
but identified
in another
module.
Each
external
symbol
must
be
identified.
This
includes
symbols
that refer
to control
section
names.
The format
of the EXTRN
statement
is:
Name
"A
se-
quence
symbol
or
blank
Operation
Operand
EXTRN
One
or
more
reloca-
table
symbols,
separated
by commas
3-19
The
symbols
statements
attribute
used
some
of
the
operand
field
in
the
module
where
an external
symbol
is
The following
as
operands
other module.
Name
under
in
may
the
i.
not
EXTRN
example
identifies
three
in the module
where
they
appear
statement
Operand
EXTRN
EXTRN
RATEBL,PAYCALC
WITHCALC
An example
that employs
the
EXTRN
instruction
"Addressing
External
Control
Sections."
Note 2:
When
paired.
Each
relocatability
Addressin_
constant
does
not
external
symbols
are used in
external
symbol
must
be
attribute.
External
A common
address
way
Control
for
the
is.
name
The
external
symbols.
appear,
but they are
Operation
Note i:
A V-type
EXTRN
statement.
as
have
appears
of
length
They
defined
are
in
subsequently
to be
identified
an expression
they may
considered
as
having
by
an
not
be
a unique
Sections
a program
to
link
to
an
external
control
section
is
to:
Create
a V-type
symbol.
I.
For
3-20
constant
coding
address
example,
might
to
be used:
link
to
the
control
with
the
name
register
section
named
of
and
the
branch
SINE,
the
external
to
the
following
Name
Operation
Operand
MAINPROG
BEGIN
CSECT
BALR
USING
2,0
*,2
L
BALR
3,VCON
1,3
DC
END
V(SINE)
VCON
An
external
BEGIN
symbol
naming
data
may
be
referred
i.
Identify
the external
symbol
with
create
an address
constant
from the
2.
Load the
for base
For
RATETBL,
used:
example,
which
is
constant
into
addressing.
in
to
add
another
a general
Name
Operation
Operand
MAINPROG
BEGIN
CSECT
BALR
US ING
2,0
*,2
EXTRN
RATETBL
L
USING
A
4,RATEADDR
RATETBL,4
3,RATETBL
DC
END
A(RATETBL)
BEGIN
RATEADDR
the
EXTRN
symbol.
register,
to register
3 the
control
section,
to as
and
follows:
instruction,
use
the
and
register
contents
of a data area named
the following
coding
might
be
3-21
-The
IDENTIFY
WXTRN
WEAK
statement
EXTERNAL
SYMBOL
has
same
the
format
as
the
EXTRN
statement.
It
is
used to identify
weak external
references.
The only difference
between
a
weak
(WXTRN)
and a strong
(EXTRN
or V-type
constant)
external
reference
is
that the automatic
library
call mechanism
of the linkage
editor
or
loader
is not effective
for symbols
that are identified
in WXTRN
statements.
The automatic
library
call mechanism
searches
the call library
for any
unresolved
external
references.
If it finds any of these references,
it
includes
the module
where
the reference
occurs
in the load module
produced
by the linkage
editor
or loader.
Refer
to OS Loader
and Linkage
Editor
for
a full description
of the automatic
library
call mechanism.
The
format
of
the
WXTRN
instruction
is:
Name
Operation
Operand
WXTRN
One
se-
quence
symbol
or blank
Note:
If
instruction,
3-22
or
more
reloca-
table symbols,
separated
by
COrneas
a
V-type
address
constant
the
automatic
library
call
is
identified
by
a
WXTRN
mechanism
is suppressed
for it.
SECTION
4 :
HACHINE-INSTRUCTIONS
This section
discusses
the coding
of the
machine-lnstructions
represented
in
the
assembler
language.
The
reader
is
reminded
that the
functions
of each machlne-lnstructlon
are discussed
in
the
principles
of
operation
manual
(see Preface).
MACHINE-ZNSTRUCTION
STATEMENTS
Machlne-lnstructlons
guage
statements.
The
actual
machlne-lnstruction
SI_ andSS.
Within
each
may be represented
symbolically
as assembler
lansymbolic
format
of each varies
according
to the
format,
of which
there are five:
RR,
RX,
RS,
basic format,
further
variations
are possible.
The
symbolic
format
of a machine-instructlon
is similar
to, but does
not duplicate,
its actual
format.
Appendix
C
illustrates
machine
format
for the five classes
of instructions.
A mnemonlc
operation
code is written
in the operation
field,
and one or more operands
are wrltten
in the operand
field.
Comments
may
be
appended
to a machlne-instructlon
statement
as
previously
explained
in Section
i.
Any machine-instruction
statement
may be
named
by
a
symbol,
which
other
assembler
statements
can use as an operand.
The value attribute
of
the symbol
is the address
of the leftmost
byte assigned
to
the
assembled
instruction.
The
length
attribute
of
the
symbol
depends
on the basic
instruction
format,
as follows:
Basic
RR
RX
RS
S
Sl
SS
RI
R
Format
Instruction
Length
2
4
4
4
4
6
4
2
Alignment
Attribute
and
Checking
All machine-instructions
are aligned
automatically
by the assembler
on
half-word
boundaries.
If any
statement
that
causes
information
to
be
assembled
requires
alignment,
the bytes skipped
are filled
with hexadecimal
zeros.
All
expressions
that
specify
storage
addresses
are checked
to
ensure
that they refer
to appropriate
boundaries
for
the
instructions
in
which
they
are used.
Register
numbers
are also checked
to make sure that
they specify
the proper
registers,
as follows:
i.
Floating-point
O, 2,
4,
or 6.
instructions
must
specify
floatlng-point
registers
4-1
Double-shift,
specify
an
OPERAND
FIELDS
Some
operands
full-word
multiply,
even-numbered
general
and
divide
register
in
instructions
must
the first
operand.
AND SUBFIELDS
symbolic
operands
are
written
as
are
written
as
a
field followed
a
by
single
one or
field,
and
two subfields.
other
For
example,
addresses
consist
of
the
contents
of
a
base
register
and
a
displacement.
An operand
that specifies
a base and displacement
is written
as
a
displacement
field
followed
by a base register
subfield,
as follows:
40(5).
In the RX format,
both
an
index
register
subfield
and
a
base
register
subfield
are written
as follows:
40(3,5).
In the SS format,
both
a length
subfield
and a base register
subfield
are
written
as
follows:
40(21,5).
RS, SI, and
of specifyThe second
Appendix
C
shows two types of addressing
formats
for RX,
SS instructions.
In each case,
the first type shows
the method
ing an address
explicitly,
as a base register
and displacement.
type
of
indicates
For example,
the following
be
how
Whereas
represented
In order
observed:
i.
2.
to
specify
a load
symbolic
an
implied
address
multiple
instruction
operands:
explicit
implied
(RS
as
an
expression.
format)
may
have
either
address
address
The base
used.
use
implied
register
An explicit
base
implied
address.
addresses,
assembler
register
the
instructions
designation
following
(USING
must
rules
and
not
DROP)
S2 may
must
must
accompany
be
be
the
For example,
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
instruction)
that
general
register
12 currently
contains
a
relocatable
value of 4096
and
is
available
as
a
base
register.
The
following
example
shows
a
machine-instruction
statement
as it would be
written
in assembler
language
and as it would be assembled.
Note that
the
value
of
D2
is
the
difference
between
7400
and
4096 and that X2 is
assembled
as zero, since it was
omitted.
The
assembled
instruction
is
presented
4-2
in
hexadecimal:
Assembler statement:
ST
4,FIELD
Assembled instruction:
Op.Code
R1
4
50
X2
0
B2
C
D2
CE8
An address
may
be
specified
explicitly
as
displacement
(and index register
for RX instructions)
in the first column
of Table 4-i.
The
address
may
implied
the two
address
storage
by
the
addresses
separately;
an
address
is used
Table
4-1.
Address
Specification
Explicit
RX
D2 (X2, B2)
D2(,B2)
D2 (B2)
DI(BI)
D1 (L1, BI)
DI(L,BI)
D2 (L2, B2)
SI
SS
or
shown
in
by the
implied
address
for the other.
Type
RS
formats
required
Address
may
the
SS
be
base
register
and
by the formats
shown
be
specified
as
an
second
column.
instructions
used
for
one,
Observe
that
are
presented
while
an
explicit
Details
Implied
Address
S2(X2)
S2
S2
S1
SI(LI)
Sl(L)
$2(L2)
enclose
within
a
subfield
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
that are separated
by a comma and enclosed
by
parentheses,
the
following
rules
apply:
If both
lo
subfields
parentheses
L
L
.
If
must
are
also
2,48(4,5)
2 ,FIELD
the
first
be
subfield
32(16,5),FIELD2
32(,5),FIELD2
in
the
separating
comma
is
the
and
the
omitted.
(implied
separates
it
from
theses
must also be
MVC
MVC
omitted,
the
address)
sequence
the
second
written.
(implied
subfield
omitted,
is written.
comma
The
that
paren-
length)
4-3
If
the
second
subfield
in
the
separates
it from the first
theses
must be written.
MVC
MVC
Fields
32(16,5),FIELD2
FIELDI(16),FIELD2
and
subfields
in
sequence
subfield
(implied
a symbolic
is
must
omitted,
be
the
operand
may
EXPLICIT
AND
that
paren-
be
represented
either
depending
on what
the field
consisting
of one term
or
a
Refer
to
Appendix
C for a
Note:
Blanks
may not appear
in an operand
unless
provided
by
self-defining
term or a character
literal.
Thus, blanks
may
between
fields
and the comma separators,
between
parentheses
etc.
--
The
address)
by
absolute
or
by
relocatable
expressions,
requires.
(An expression
has been defined
as
series
of
arithmetically
combined
terms.)
detailed
description
of field requirements.
LENGTHS
comma
omitted.
a
character
not intervene
and
fields,
IMPLIED
The
length
field
in SS instructions
can be explicit
or implied.
imply
a length,
the programmer
omits a length
field from the operand.
omission
indicates
that the length
field is either
of the following:
l.
To
The
The length
attribute
ment,
if an explicit
of the expression
specifying
the
displacebase and displacement
have been written.
The length
attribute
address,
if the base
of the expression
and displacement
specifying
the
have been implied.
effective
In
either
case, the length
attribute
for an expression
is the length
of the leftmost
term in the expression.
The value of L'* is the length
of
the
instruction
in all non-llteral
machine
instruction
operands
and in the
CCW assembler
instruction.
In all other uses its value will be I.
By
operand
implied
contrast,
as
an
length.
an explicit
length
is written
by the
absolute
expression.
The
explicit
programmer
in
length
overrides
Whether
the length
is explicit
or implied,
it is always
length.
The
value
inserted
into
the
length
field
of
instruction
is
one
less
than
the
effective
length
in
instruction
statement.
Note:
zero or
If
a
one.
length
field
To summarize,
the
specified
explicitly
by
or may be implied
by the
4-4
of
zero
is desired,
length
required
in
the formats
shown in
formats
shown in the
the
length
may
an
the
the
be
the
any
effective
assembled
machine-
stated
as
an
SS
instruction
may
be
the first column
of Table
4-2
second
column.
Observe
that
4-2.
Explicit
Details
of Length
Length
Specification
Implied
DI(LI,BI)
SI(LI)
DI(L,BI)
SI(L)
D2(L2,B2)
$2(L2)
SS instruction
be
used for
in
SS
formats
arepresented
one, while
an explicit
Instructions
Length
DI(,B1)
Sl
DI(,Bi)
Sl
D2(,B2)
S2
MACHINE-INSTRUCTION
MNEMONIC
CODES
The mnemonic
operation
codes (shown
in Appendix
D) are designed
to
be
easily
remembered
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:
Verb[Modifier]
[Data
Type]
[Machine
Format]
types
Mnemonic
codes for functions
involving
data
by letters
that correspond
to those
for the
usually
data
indicate
types
in
the data
the
DC
assembler
instruction
(see Section
5).
Furthermore,
letters
U and W have
been
added
to
indicate
short
and
long,
unnormallzed
floating-polnt
operations,
respectively.
For example,
AE indicates
Add Normalized
Short,
whereas
AU indicates
Add Unnormallzed
Short.
Where
applicable,
full-word
fixed-point
data is implied
if the data type is omitted.
The
letters
R and I are added to
RR and SI machine
instruction
formats.
Short
in
the
RR
format.
Functions
types
imply
the
MACHINE-INSTRUCTION
The
format.
employed
SS
format.
EXAMPLES
examples
that follow
are grouped
according
to
machine-instruction
They illustrate
the various
symbolic
operand
formats.
All symbols
in
the
examples
must be assumed
to be defined
elsewhere
in the
4-5
same assembly.
be
assumed
to
All symbols
that specify
register
numbers
be equated
elsewhere
to absolute
values.
Implied
addressing,
control
USING
assembler
instruction
are
the
and
lengths
must
section
addressing,
and the function
not considered
here.
For discussion
of
of
these considerations
and for examples
of coding
sequences
that
illustrate
them,
the reader
is referred
to Section
3, "Program
Sectioning
and Linking"
and "Base Register
Instructions."
RR
Format
Name
Operation
Operand
ALPHA1
ALPHA2
BETA
GAMMA1
GAMMA2
LR
LR
SPM
SVC
SVC
1,2
REGI,REG2
15
250
TEN
The
values,
ALPHA2
values.
RX
operands
of
ALPHA1,
which
are categorized
as
and
GAMMA2
are
symbols
BETA,
and
absolute
that
GAMMA1
are
expressions.
are
equated
decimal
The
elsewhere
self-defining
operands
of
to absolute
Format
Name
Operation
Operand
ALPHAI
ALPHA2
L
L
L
L
L
L
L
L
1,39(4,10)
REGI, 39 (4,TEN)
2, ZETA (4)
REG2, ZETA (REG4)
BETA1
BETA2
GAMMAI
GAMMA2
GAMMA3
LAMBDAI
2, ZETA
KEG2, ZETA
2,-F' i000'
3,20(,5)
Both ALPHA
instructions
specify
explicit
addresses;
REGI and
TEN
are
absolute
symbols.
Both
BETA instructions
specify
implied
addresses,
and
both use index registers.
Indexing
is omitted
from the GAMMA
instructions.
GAMMA1
and GAMMA2
specify
implied
addresses.
The second
operand
of
GAMMA3
is a literal.
LAMBDAI
specifies
no indexing.
4-6
RS
Format
Name
Operation
Operand
ALPHAI
ALPHA2
ALPHA3
ALPHA4
ALPHA5
BXH
BXH
BXH
SLL
SLL
Z,2,20(14)
REG1,REG2,20(REGD)
REGI,REG2,ZETA
REG2,15
REG2,0(15)
Whereas
ALPHAI
and ALPHA2
specify
explicit
addresses,
ALPHA3
specifies
an implied
address.
ALPHA4
is a shift instruction
shifting
the contents
of
REG2
left
15
bit
positions.
ALPHA5
is a shift instruction
shifting
the
contents
of REG2 left by the value contained
in general
register
15.
RI
Format
Name
Operation
Operand
ALPHAI
ALPHA2
BETA
AHI
AHI
AHI
REGI,X'I234'
2,C'AB'
REG2,TEN
The operands
of ALPHAI
and ALPHA2
are self-defining
values
categorized
as absolute
expressions.
The operand
of BETA is a
is equated
elsewhere
to an absolute
value.
which
are
symbol
which
SI Format
Name
Operation
Operand
ALPHA1
ALPHA2
BETAI
BETA2
CLI
CLI
CLI
CLI
40(9),X'40'
40(REG9),TEN
ZETA,TEN
ZETAjC'A'
The
instructions
ALPHA
instructions
specify
implied
specify
explicit
addresses,
whereas
the
BETA
addresses.
4-7
S Format
Name
Operation
Operand
GAMMA1
GAMMA2
GAMMA3
GAMMA4
SlO
SIO
SI0
SI0
40(9)
0(9)
40(0)
ZETA
The
GAMMAI,
GAMMA2,
and
GAMMA3
instructions
specify
explicit
addresses.
The GAMMA4
instruction
specifies
an implied
address.
The GAMMA2
instruction
specifies
a displacement
of zero.
The GAMMA3
instruction
does
not specify
a base register.
SS Format
Name
Operation
Operand
ALPHA1
ALPHA2
ALPHA3
ALPHA4
BETA
GAMMA1
GAMMA2
GAMMA3
GAMMA4
AP
AP
AP
AP
AP
MVC
MVC
MVC
MVC
40(9,8) ,30(6,7)
40 (NINE, REG8), 30(L6,7)
FIELD2, FIELD1
FIELD2 (9), FIELD1 (6)
FIELD2 (9), FIELD1
40(9,8) ,30(7)
40 (NINE,REG8)
,DEC(7)
FIELD2, FIELD1
FIELD2 (9) ,FIELD1
ALPHA1,
ALPHA2,
GAMMA1,
and
addresses.
ALPHA3
and
GAMMA3
addresses.
ALPHA4
and
GAMMA4
addresses.
BETA
specifies
an
length
for FIELD1;
both addresses
EXTENDED
MNEMONIC
GAMMA2
specify
explicit
lengths
and
specify
both
implied
length
and implied
specify
explicit
length
and
implied
explicit
length
for FIELD2
and an implied
are implied.
CODES
shown
The
in
allowable
Figure
4-1,
extended
together
mnemonic
codes and their operand
with their
machine-instruction
formats
are
equivalents.
Unless
in
of
otherwise
noted,
the
RX format.
the
extended
all
extended
Note
that
mnemonics
mnemonics
shown
the
only
difference
and
those
of
between
their
are
for
instructions
the
operand
Nachine-instruction
fields
equivalents
is the absence
of the RI field and the comma that separates
it
from the rest of the operand
field.
The extended
-memonic
list,
like
the
machine-instruction
list,
shows
explicit
address
formats
only.
Each
address
can also be specified
as an implied
address.
Extended
Code
Meaning
Machine-Instruction
D2(X2,B2)
Branch
BR
NOP
NOPR
R2
D2(X2,B2)
R2
Branch
Unconditional
(RE
No Operation
No Operation
(RE format)
Used
BH
BL
BE
BNH
BNL
BNE
After
Compare
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
Used
After
BO
BP
BM
BZ
BNP
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
BNM
BNZ
D2(X2,B2)
D2(X2_B2)
Used
After
Branch
Branch
on
on
High
Low
Branch
Branch
Branch
on
on
on
Equal
Not High
Not Low
Branch
on
Not
Equal
Instructions
Branch
Branch
Branch
Branch
Branch
Branch
Branch
on Overflow
on Plus
on Minus
on Zero
on Not Plus
on Not Minus
on Not Zero
Test
Under
Branch
Branch
Branch
Branch
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
D2(X2,B2)
Figure
4-1.
Extended
the
it
following
is to be
format)
BC
15,D2(X2,B2)
BCR
BC
BCR
15,R2
0,D2(X2,B2)
O,R2
Instructions
Arithmetic
BO
BM
BZ
BNO
In
monics,
program.
Unconditional
Mask
2,D2(X2,B2)
4,D2(X2,B2)
8,D2(X2,B2)
13,D2(X2,B2)
11,D2(X2,B2)
7,D2(X2,B2)
BC
BC
BC
BC
BC
BC
BC
I,D2(X2,B2)
2,D2(X2,B2)
4,D2(X2,B2)
8,D2(X2,B2)
13,D2(X2,B2)
11,D2(X2,B2)
7,D2(X2,B2)
BC
BC
BC
BC
1,D2(X2,B2)
4,D2(X2,B2)
8,D2(X2,B2)
14,D2(X2,B2)
Instructions
if Ones
if Mixed
if Zeros
if Not Ones
Mnemonic
BC
BC
BC
BC
BC
BC
Codes
examples,
which
assumed
that the
illustrate
symbol
GO
the use of
extended
is defined
elsewhere
in
mnethe
4-9
Name
Operation
Operand
B
B
BL
40(3,6)
40(,6)
GO(3)
GO
4
BL
BR
4-10
SECTION
5:
ASSEMBLER
INSTRUCTION
STATEMENTS
Just as machine
instructions
are used to request
the computer
to
perform
a
sequence
of operations
during
program
execution
time, so assembler
instructions
are requests
to the assembler
to
perform
certain
operations
during
the
assembly.
Assembler-instruction
statements,
in contrast
to
machlne-instruction
statements,
do not usually
cause
machine-instructions
to be included
in the assembled
program.
Some, such as
no
instructions
but
do cause storage
areas
to be set
and other data.
Others,
such as EQU
and
SPACE,
are
assembly
time;
they generate
nothing
in the assembled
effect
on the location
counter.
The
following
is
Symbol
Definition
EQU
Equate
Operation
OPSYN
Data
DC
a list
of
assembler
instructions.
Instruction
Symbol
Code Definition
Equate
Operation
Instruction
Code (Assembler
F only)
Definition
Instructions
Define
Constant
DS
Define
Storage
Program
Sectionin B and Linkin i Instructions
START Start Assembly
CSECT
Identify
Control
Section
CXD
Cumulative
Length
of External
Dummy
Section
(Assembler
F only)
DSECT
Identify
Dummy
Section
DXD
Define
External
Dummy Section
(Assembler
F only)
ENTRY
Identify
Entry-Polnt
Symbol
EXTRN Identify
External
Symbol
WXTRN
Identify
Weak External
Symbol
(Assembler
F only)
COM
Identify
Blank Common
Control
Section
Base Register
Instructions
USING Use Base Address
Register
DROP
Drop Base Address
Register
Listin_
TITLE
EJECT
SPACE
PRINT
Control
Instructions
Identify
AssemblyOutput
Start New Page
Space Listing
Print Optional
Data
5-1
Prosram
ICTL
ISEQ
PUNCH
REPRO
ORG
LTORG
CNOP
COPY
END
Control
Instructions
Input Format
Control
Input Sequence
Checking
Punch a Card
Reproduce
Following
Card
Set Location
Counter
-
Begin Literal
Pool
Conditional
No Operation
Copy Predefined
Source
Coding
End Assembly
SYMBOL
DEFINITION
EQU
EQUATE
--
INSTRUCTION
SYMBOL
Name
Operation
Operand
A variable
EQU
An
expression
symbol
or
ordinary
symbol
Any
The
expression
symbols
appearing
The symbol
relocatability
length
attribute
the
expression.
length
attribute
the
in
in
be absolute
previously
or relocatable.
defined.
and
The
of
the
of
expression.
The
immediate
illustrate
EQU
instruction
is
used to equate
data,
or
other
arbitrary
values.
how this can be done:
Name
Operation
REG2
TEST
EQU
EQU
5-2
the operand
field can
the expression
must be
symbols
The
to register
following
I
2
(general
register)
data_
numbers,
examples
expressions
Thus, in
the programmer
can
then use the symbols
statement:
and
the
Name
Operation
Operand
FIELD
EQU
ALPHA-BETA+GAMMA
equate
symbols
as operands
in
to
freplace
of
FIELD
is defined
as ALPHA-BETA+GAMMAand
may be used in place of it.
Note,
however,
that ALPHA,
BETA,
and GAMMA must all be
previously
defined.
If
the final result
of the expression
is negative,
it is treated
as if it were
positive,
i.e., the low-order
24 bits of the 2's complement
is used.
The
statement.
assembler
OPERATION
CODE
OPSYN
-The
EQUATE
OPSYN
assigns
DEFINITION
length
attribute
of
in
an
EQU
to
INSTRUCTION
OPERATION
CODE
instruction
is
(ASSEMBLER
used
to
F ONLY)
define
a machine
mnemonic
operation
code as equivalent
to another
also used to preventthe
assembler
from recoEnizing
OPSYN
instruction
has two formats:
Name
Operation
Operand
Any
OPSYN
A machine
or
extended
instruc-
ordinary
symbol,
tion mnemonic
code,
an extended
mne-
except
an
assembler
monic
code, or
operation
code
operation
code
fined
OPSYN
In
this
format,
the OPSYN
the operation
code in the operand
The
symbol
in
the
name
field
extended
mnemonic
operation
code.
takes precedence.
mnemonic
operation
code.
It
is
an operation
code.
The
an
de-
by a previous
instruction
instruction
assigns
all the properties
of
field
to the symbol
in
the
name
field.
can
be
a previously
defined
machine
or
In
this
case,
the
latest
definition
5-3
Name
A machine
extended
or
mne-
Operation
Operand
OPSYN
Blank
monic
operation code
w
In this
recognizing
format,
the
Only
ICTL
and
code
instruction
in
the
instructions
on
(F) Programmer's
DEFINITION
There
(DC)
operation
information
Assembler
DATA
0PSYN
and OPSYN
Additional
"0S
the
....
use
of
prevents
name
the
assembler
from
field.
may
precede
the
0PSYN
an
OPSYN
instruction.
instruction
is
contained
in
Guide."
INSTRUCTIONS
are
Define
two data
Storage
definition
instruction
statements:
Define
Constant
(DS).
These
statements
are
used
to enter
data constants
into storage,
to
define
and reserve
areas of storage,
and to specify
the contents
of channel
command
words.
The statements
can
be
named
by
symbols
so
that
other
program
statements
can refer to the generated
fields.
The DC instruction
is presented
first and discussed
in more detail
than
the
DS
instruction
because
the
DS
instruction
is
written
in
the
same
format
as the DC
instruction
instruction
vary.
DC --
can
DEFINE
The DC
specify
the
and
information
treatment
of
that
the
DC
the statements
CONSTANT
instruction
is used to provide
constant
one constant
or a series
of constants.
data
in
A variety
storage.
It
of constants
can
be
specified:
fixed-point,
floating-point,
decimal,
hexadecimal,
character,
and
storage
addresses.
(Data constants
are generally
called
constants
unless
they are created
from storage
addresses,
in
which
case
they
are
called
address
constants.)
The
format
of the DC instruction
statement
is as follows:
Name
Operation
Operand
Any symbol
or blank
DC
below,
separated
5-4
by
each
a comma
Each
operand
constant,
constant(s).
and fourth
consists
of
four
subfields:
the
first
three
describe
the
and
the
fourth
subfield
provides
the nominal
value(s)
for the
The first and third subfields
can be omitted,
but the
second
must be specified.
Note that nominal
value(s)
for more than one
constant
can
be
specified
in
the
fourth
subfield
for
most types of
constants.
Each constant
so specified
must
be
of
the
same
type;
the
descriptive
subfields
that precede
the nominal
value apply
to all of them.
No blanks
can occur
within
any
of
the
subfields
(unless
provided
as
characters
in a character
constant
or a character
self-defining
term),
nor
can they occur between
the subfields
of
an
operand.
Similarly,
blanks
cannot
occur
between
operands
and
the
commas
that separate
them when
multiple
operands
are being
specified.
The
sequence:
1
Dupllcation
Factor
subfields
of
each
2
Type
DC
operand
written
in
the
following
Modifiers
Although
the constants
specified
characteristics,
each
operand
can
For example,
in a DC instruction
with
might
specify
four decimal
constants,
and the third a character
constant.
are
Nominal
Value(s)
within
one operand
must have the same
specify
a different
type of constant.
three
oparands,
the
first
operand
the second
a floating-point
constant,
The
symbol
that names
the DC instruction
is the name of the constant
(or first constant
if the instruction
specifies
more than
one).
Relative
addressing
(e.g.,
SYMBOL+2)
can be used to address
the various
constants
if
more
than one has been specified,
because
the number
of bytes
allocated
to
each constant
can be determined.
The
address
value attribute
of
of
the
leftmost
the symbol
naming
the
DC
instruction
byte
(after
alignment)
of the first,
is
the
or only,
constant.
The length
attribute
depends
on
two
things:
the
type
of
constant
being defined
and the presence
of a length
specification.
Implied
lengths
are
assumed
for
the
various
constant
types in the absence
of a
length
specification.
If more than one constant
is
defined,
the
length
attribute
is
the
length
in
bytes
(specified
or implied)
of the first
constant.
Boundary
alignment
also varies
according
to the type of constant
being
specified
and the presence
of a length
specification.
Some constant
types
are
only aligned
to a byte boundary,
but the DS instruction
can be used to
force any type of word boundary
alignment
for
them.
This
is
explained
under
"DS -- Define
Storage."
Other constants
are aligned
at various
word
boundaries
(half,
full,
or
double)
in
the
absence
of
a
length
specification.
If
length
is specified,
no boundary
alignment
occurs
for
such constants.
5-5
Bytes
that must be skipped
in order to align
the field at
the
proper
boundary
are
not
considered
to be part of the constant.
In other words,
the location
counter
is incremented
to reflect
the proper
boundary
(if
any
incrementing
is necessary)
before
the address
value
is established.
Thus,
the symbol
naming
the constant
will not receive
a value
attribute
that
is
the
location
to
Any bytes
skipped
in aligning
be assembled
are not zeroed.
zeroed;
of a skipped
bytes
skipped
byte.
to align
Appendix
F summarizes,
constants
that is presented
LITERAL
literals
statements
that do not cause information
Bytes skipped
to align a DC statement
are
a DS
statement
in
chart
form,
in this section.
DEFINITIONS:
The reader
is
as machine-instruction
operands
description
of the DC operand
for the
All
subsequent
operand
specifications
the only difference
being:
i.
The
2.
Multiple
literal
The
5.
S-type
7.
preceded
operands
may
duplication
not
address
factor
method
are
an
be
Signed
or unsigned
express
scale and
Q-type
address
Subfield
i:
may
constants
may
constants
Duplication
the
appear
information
concerning
the
discussion
referred
him to
a literal
to writing
of
the
operand.
literals,
sign.
specified.
terms must be used
modifier
values.
be
not
not
to
express
the
zero.
be
specified.
self-defining
modifiers.
may
zeroed.
of writing
applicable
equal
not
decimal
exponent
Examples
of
literals
instruction
discussion.
Operand
by
not
reminded
that
(in Section
2)
Unsigned
decimal
self-defining
duplication
factor
and length
4.
is
are
be
throughout
terms
specified
the
must
in
be
used
to
the
DC
literals.
balance
of
Factor
The
duplication
factor
may be omitted.
If specified,
constant(s)
to be generated
the number
of times indicated
by
The
factor
may
be
specified
either
by an unsigned
decimal
it causes
the
the
factor.
self-defining
term or by a positive
absolute
expression
that is enclosed
by
parentheses.
The
duplication
factor
is
applied
after
the constant
is assembled.
All
symbols
in the expression
must be previously
defined.
Note that a duplication
factor
literal
and achieves
the same result
5-6
of
as
zero
is
permitted
except
it would
in a DS instruction.
in
a
A DC
instruction
dictionary
Note:
location
with
entries.
zero
duplication
factor
will
See "ForclngAlignment"
under
"DS
If
duplication
is
counter
reference,
duplication
Operand
is
incremented
Subfield
The
the type
constant
specified
Code
2:
specified
the value
by
for an address
of the location
the length
of
the
not
produce
control
-- Define
Storage."
constant
counter
operand.
Type
type subfield
defines
the type of constant
being
specified.
From
specification,
the assembler
determines
how it is to interpret
the
and translate
it into the appropriate
machine
format.
The type is
by a slngle-letter
code as shown in Figure
5-1.
Type
of
Constant
Machine
Character
Hexadecimal
B
F
H
I
Binary
Fixed-point
Fixed-point
ASCII
E
D
Floating-point
Floating-polnt
Short floating-polnt
Long floatlng-point
Floating-point
P
Z
A
Y
S
Decimal
Decimal
Address
Address
Address
Extended
floating-point
format;
words
(Assembler
F only)
Packed
decimal
format
Zoned decimal
format
Address
Address
Address
5-1.
Further
discussion
Constant."
Operand
8-bit
Format
C
X
Figure
containing
a
used in
each
code
for
each
character
each
hexadecimal
Signed,
flxed-polnt
binary
Signed,
fixed-polnt
binary
8-blt ASCII code for each
Value
of address;
Value
of address;
Base register
and
digit
format;normally
format;normally
character
format;
normally
format;
normally
a full
a half
word
word
a full word
a double
word
normally
two
normally
a full word
normally
a half word
displacement
value;
a half
double
word
Space reserved
for external
symbol
addresses;
each
address
normally
a full word
Value of address;
a full 16-bit
halfword
Space reserved
for dummy
section
offset
(AsseWDier
only)
.Type
Codes
for
Constants
information
about
of
the
constants
Subfield
3:
these
constants
themselves
under
is
provided
in
"Operand
Subfield
the
4:
Modifiers
Modifiers
describe
the length
in bytes
desired
for
a
constant
(in
contrast
to
an
implied
length),
and
the
scaling
and exponent
for the
constant.
If multiple
modifiers
are written,
they
must
appear
in
this
sequence:
length,
scale,
exponent.
Each is written
and used as described
in the following
text.
LENGTH
MODIFIER:
This
decimal
self-defining
is written
term
or
parentheses.
Any symbols
The value
of n represents
for
the
constant.
The
as Ln, where
n
is
either
a positive
absolute
expression
an
unsigned
enclosed
by
in the expression
must
be
previously
the number
of bytes
of storage
that are
maximum
value permitted
for the length
defined.
assembled
modifiers
supplied
for the various
types of constants
is summarized
in
Appendix
F.
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
modifier
may be specified
for any type of constant.
However,
no
boundary
alignment
will be provided
when a length
modifier
is given.
Use
of
a length
modifier
DC
will
generate
a 7-byte
may
truncation.
For
example:
C'ABCDXYZ'
constant,
DC
cause
whereas
CL6'ABCDXYZ'
will
generate
a 6-byte
constant
and cause Z to be lost.
Truncation
of C,
X, B, Z, A, Y, and P constants
is not flagged
as an error.
However,
F,
H,
E,
D,
and
L
constants
will
be
flagged
if significant
bits are lost.
Finally,
each type of constant
has an imposed
or
natural
length
modifier
range
limit.
Appendix
F
shows
truncation
of significant
digits.
modifier
range for each constant.
which
constants
It
also
shows
can
the
be
flagged
for
allowable
length
Bit-Length
Specification:
The length
of a constant,
in bits,
is specified
by L.n, where
n is specified
as stated
above and represents
the
number
of
bits
in
storage
into which
the constant
is to be assembled.
The value
of
n may exceed
eight and is interpreted
to mean an integral
number
of
bytes
plus
so
many
bits.
For example,
L.20 is interpreted
as a length
of two
bytes
plus four bits.
Assembly
of the first or only constant
with
bit-length
specification
starts
on a byte boundary.
The constant
is placed
in the high or low order
end
of
the
field depending
on the type of constant
being
specified.
The
constant
is padded
or truncated
to fit the field.
If the assembled
length
does not leave the location
counter
set at a byte boundary,
and another
bit
length
constant
does
not
immediately
follow
in the same statement,
the
remainder
of the last byte used is filled
with
zeros.
This
leaves
the
location
counter
set at the next byte boundary.
Figure
5-2 shows a fixedpoint
constant
with a specified
blt-length
of 13, as coded,
and as it would
appear
in storage.
Note that the constant
has been padded
on the
left
to
bring
it to its designated
13-bit
length.
5-8
As
coded:
Operation
Operand
DC
FL.13'579'
In storage:
byte
byte
byte
padding[
_010010'00011000
579
Figure
cause
5-2.
The
the
fill
Bit-Length
implied
entire
Specification
5-3
As
Constant)
length
of BLCON is two bytes.
two bytes
to be referenced.
When bit-length
specification
constants
(see
Operand
Subfield
constant
in the llst is assembled
Figure
(Single
illustrates
is used
in
4: Constant
starting
at
reference
association
following),
the
next
to
BLCON
would
with
multiple
each succeeding
available
bit.
this.
coded:
Name
Operation
Operand
BLMCON
DC
FL.I0'161,21,57'
In
storage:
byte
byte
byte
Ipadding
I paddin_
I .-"-,
"--"_'
byte
byte
padd+g
I
'_"'-'!
' 00101000_i0000010101000011100100
161
Figure
5-3.
21
Bit-Length
57
fill
Specification
(Multiple
Constants)
The symbol
used as a name entry in a DC assembler
the
length
attribute
of
the
first constant
in the
implied
length
of BLMCON
in Figure
5-3 is two bytes.
instruction
takes
on
list; therefore,
the
5-9
field
If duplication
is specified,
occupied
by the duplicated
filling
occurs
constant(s).
once
at
the
end
of
the
When
bit-length
specification
is
used in association
with multiple
operands,
assembly
of the constant(s)
in each succeeding
operand
starts
at
the next available
bit.
Figure
5-4 illustrates
this.
As
coded:
Name
Operation
Operand
BLMOCON
DC
FL.7'9'
In
byte
,CL.10'AB',XL.14'C4'
storage:
byte
byte
byte
byte
1 0o000
o001
A plus
first two
bits of B
Figure
5-4.
Bit-Length
Specification
(Multiple
Operands)
In Figure
5-4, three different
types of constants
have been specified,
one
to
an
operand.
Note that the character
constant
'AB' which
normally
would
occupy
16 bits is truncated
on the right
to
fit
the
10-bit
field
designated.
by all the
Note that
constants.
filling
occurs
only
at
the
end
of
the
field
occupied
Scale
Modifier:
This
modifier
is
written
as
Sn, where
n is either
a
decimal
value
or an
absolute
expression
enclosed
by
parentheses.
All
symbols
in
the
expression
must be previously
defined.
The decimal
selfdefining
term or the parenthesized
expression
may be preceded
by a sign; if
none is present,
a plus sign is assumed.
The
maximum
values
for
scale
modifiers
are summarized
in Appendix
F.
A
scale
modifier
may
be
point
(E, D, L) constants
only.
internal
scaling
that is desired,
Scale
Modifier
for Fixed-Point
Constants:
power
of two by which the constant
must be
converted
to
its
binary
representation.
5-10
the
been
of a
decimal
number
by
a
power
of
i0
causes
the
decimal
point
to
move,
multiplication
of a binary
number
by a power of two causes
the binary
point
to
move.
This
multiplication
has the effect
of moving
the binary
point
away from its assumed
position
in the binary
field_
the
assumed
position
being
to the right of the rlghtmost
position.
Thus,
the
scale
modifier
indicates
either
of the following:
(1) the
number
of binary
positions
to be occupied
by the fractional
portion
of
the
binary
number,
or (2) the number
of binary
positions
to be deleted
from the
integral
portion
of
the binary
number.
A positive
scale of x shifts
the
integral
portion
of the number
x binary
positions
to
the
left,
thereby
reserving
the
rightmost
x binary
positions
for the fractional
portion.
A
negative
scale shifts
the integral
portion
of
the
number
right,
thereby
deleting
rightmost
integral
positions.
If
a
scale
modifier
does not
accompany
a
flxed-polnt
constant
containing
a
fractional
part,
the
fractional
part is lost.
In
all
of scaling),
rounding
is
cases
where
rounding
reflected
positions
occurs
in the
are
lost
because
of
in the leftmost
bit of the
rightmost
position
saved.
scaling
(or
lost
portion.
the
lack
The
Scale
Modifier
for
Floating-Point
Constants:
Only
a
positive
scale
modifier
may be used with a
floating-point
constant.
It
indicates
the
number
of
hexadecimal
positions
that the fraction
is to be shifted
to the
right.
Note that this shift amount
is in terms of
hexadecimal
positions,
each
of
which
is
four
binary
positions.
(Aposltive
scaling
actually
indicates
that the
point
is
to
be
moved
to
the
left.
However,
a
floatingi
point
constant
is
always
converted
to a fraction,
which
is hexadecimally
normalized.
The point
is assumed
to
be
at
the
left
of
the
leftmost
position
in the field.
Since the point cannot
be moved
left, the fraction
is shifted
right.)
an
Thus, scaling
that is
assembled
fraction
that
specified
for a floating-point
constant
provides
is
unnormalized,
i.e.,
contains
hexadecimal
zeros
in
the
leftmost
positions
of the fraction.
When the fraction
is
shifted,
the exponent
is adjusted
accordingly
to retain
the correct
magnitude.
When hexadecimal
positions
are lost, rounding
occurs
in the leftmost
hexadecimal
position
of the lost portion.
The rounding
is reflected
in the
rlghtmost
hexadecimal
position
saved.
EXPONENT
MODIFIER:
This
modifier
is written
as
En,
where
is
either
decimal
self-defining
term or an absolute
expression
enclosed
by
parentheses.
Any
symbols
in
the expression
must be previously
defined.
The
decimal
value
or the parenthesized
expression
may be preceded
by a sign;
if
none is present,
a plus sign is assumed.
An exponent
modifier
may be used with fixed-point
(F, H) and floatingpoint
(E, D, L) constants
only.
The modifier
denotes
the power
of
i0
by
which
the constant
is to be multiplied
before
its conversion
to the proper
internal
format.
5-11
This modifier
is not to be confused
with the exponent
of the
constant
itself,
which
is specified
as part of the constant
and is explained
under
"Operand
Subfield
4:
Constant."
The
exponent
modifier
affects
each
constant
in
the
operand,
whereas
the
exponent
written
as part of the
constant
only pertains
to that constant.
Thus, a constant
may be specified
with an exponent
of +2, and an exponent
modifier
of
+5
may
precede
the
constant.
In effect,
the constant
has an exponent
of +7.
The
range
for the exponent
modifier
is -85 through
+75.
However,
if
there
is an exponent
in the constant
itself
(see "Floating-Point
Constants
-E,
D,
and
L"
under
"Operand
Subfield
4: Constant")
the sum of that
exponent
and the exponent
modifier
must be within
the
range
-85
+75.
Thus,
an
exponent
modifier
of -40 together
with an exponent
of -47 would
not
be
permitted.
One further
limitation
is
in
the
implied
length
of
Arithmetic"
in IBM "System/360
Operand
Subfield
This
subfields
4:
Constant
subfield
supplied
the constant
(or constants)
that
precede
it.
A data constant
(any type
described
except
A,
by
the
Y, S, Q,
and V) is enclosed
by apostrophes.
An address
constant
(type A, Y,
S,
Q,
or
V) is enclosed
by parentheses.
To specify
two or more constants
in the
subfield,
the constants
must be separated
by commas
and the entire
sequence
of
constants
must
be
enclosed
by
the
appropriate
delimiters
(i.e.,
apostrophes
or
parentheses).
Thus,
the
format
for
specifying
the
constant(s)
is one of the following:
Single
Constant
'constant'
Multiple
Constants*
'constant,...,constant'
(constant,...jconstant)
(constant)
*Not
permitted
for
character,
hexadecimal,
and
binary
constants.
All constant
types except
character
(C), hexadecimal
(X), binary
(B),
packed
decimal
(P),
and
zoned
decimal
(Z),
are aligned
on the proper
boundary,
as shown in Appendix
F, unless
a length
modifier
is
specified.
In
the
presence
of a length
modifier,
no boundary
alignment
is performed.
If an operand
specifies
more than one
constant,
any
necessary
alignment
applies
to
the
first
constant
only.
Thus,
for an operand
that provides
five full-word
constants,
the
first
would
be
aligned
on
a
full-word
boundary,
and the rest would
automatically
fall on full-word
boundaries.
length
The
total
storage
times
the number
factor
(if
present)
first
constant.
If
requirement
is derived
5-12
of
requirement
constants
in
of
an operand
is the product
of the
the operand
times
the
duplication
of the
storage
If
an
address
constant
contains
location
counter
reference,
the
location
counter
value that is used is the storage
address
of
the
first
byte
the
constant
will occupy.
Thus,
if several
address
constants
in the
same instruction
refer to the location
counter,
the value
of
the
location
counter
varies
from constant
to constant.
Similarly,
if a single
constant
is specified
(and it is a location
counter
reference)
with
a
duplication
factor,
the
constant
is duplicated
with a varying
location
counter
value.
The
examples.
following
text
describes
each
of
the
constant
types
and
provides
Character
Constant
-C:
Any of the valid 256 punch combinations
can be
designated
in a character
constant.
Only one
character
constant
can
be
specified
per
operand.
Since
multiple
constants
within
an operand
are
separated
by commas,
an attempt
to specify
two character
constants
results
in interpreting
the comma separating
them as a character.
Special
consideration
must
be given to representing
apostrophes
ampersands
as characters.
Each single
apostrophe
or ampersand
desired
a character
in the constant
must be represented
by a pair of apostrophes
ampersands.
Only one apostrophe
or ampersand
appears
in storage.
The
maximum
length
alignment
is performed.
Double
apostrophes
or
of a character
constant
is 256 bytes.
No boundary
Each
character
is
translated
into
one
byte.
double
ampersands
count as one character.
If no
length
modifier
is given,
the size in bytes
of the
equal
to the number
of characters
in the constant.
provided,
the result
varies
as follows:
If
i.
the
number
length,
and
as
or
of
as many
characters
rlghtmost
in
the
bytes
character
constant
If a length
modifier
constant
and/or
exceeds
bits
as
the
is
is
specified
necessary
are
dropped.
o
If
the
the
In
the
number
excess
of
characters
rightmost
following
bytes
example,
the
is
length
Name
Operation
Operand
FIELD
DC
C'TOTAL
However,
blanks
appear
in
in
this
storage
next
to
example,
the
less
and/or
right
the
of
than
bits
the
are
attribute
IS
of
FIELD
with
is
length,
blanks.
12:
ii0'
length
the
specified
filled
attribute
is 15,
and
three
zero:
5-13
Name
Operation
Operand
FIELD
DC
CLI5'TOTAL
In
the
next
characters
byte.
example,
appear
in
the
the
length
attribute
operand.
The
Name
Operation
Operand
FIELD
DC
C'TOTAL
but
Note
there
IS
Operation
Operand
FIELD
DC
3CL4'ABCDE'
generated
constant
would
hand,
the
FIELD
is
ampersands
12,
although
count
as
only
13
one
&&10'
Name
The
of
two
IS
ii0'
four
has
been
specified,
be:
ABCDABCDABCD
On
the
four,
the
ABCDE
ABCDE
other
generated
Note
that
Character
the
above
instead
of
Hexadecimal
of
the
constant
constant
explicit
length
would
had
have
been
specified
as
six
instead
of
been:
ABCDE
Name
ASCII
if
constant
C
the
the
same
constant
could
be
specified
as
Operation
Operand
MVC
AREA(12),z3CL4'ABCDE'
Constant
--
I:
This
constant
type
constant
except
that
EBCDIC.
Appendix
A specifies
Constant
--
X:
A hexadecimal
is
a literal.
identically
the
an ASCII
character
these codes.
constant
consists
of
same
set
one
is
or
as
used
more
hexadecimal
digits,
which are 0-9 and A-F.
Only one hexadecimal
can be specified
per operand.
The maximum
length
of a hexadecimal
is 256 bytes
or 512 hexadecimal
digits
when
specified
using
an
length
attribute
(for example,
HEX DC XL256'FF').
However,
due to
_....
the assembler's
syntax
restriction
allowing
only two continuation
input
statement,
the maxlmum
length
of an implicitly
specified
operand
(X'FFFFFF',
etc.)
is176
digits
when normal
statement
are used.
lines per
hexadecimal
boundaries
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, while
the rlghtmost
four bits
contain
the
odd
(first)
digit.
No
boundary
alignment
is performed.
If
no length
modifier
is given,
half the number
of hexadecimal
digits
hexadecimal
zero
is
added
to
an
modifier
is
given,
If the
length,
l.
the
number
the
constant
the
in
odd
is handled
implied
length
of the constant
is
the
constant
(assuming
that
a
number
of digits).
If a length
as
of hexadecimal
digit pairs
exceeds
the
specified
necessary
leftmost
bits
(and/or
bytes)
are dropped.
If the number
of
hexadecimal
digit
pairs
specified
length,
the necessary
bits
(and/or
the left and filled
with hexadecimal
zeros.
An eight-dlglt
the
bit
pattern
example
would
set
hexadecimal
of
a
full
the first and
Operation
Operand
TEST
DS
DC
OF
X'FFOOFF00'
The DS instruction
DS--Deflne
Symbol.)
l's
The
into
Name
sets
the
is
less
than
the
bytes)
are added
to
constant
provides
a convenient
binary
word.
The constant
in
third bytes of a word to l's:
Name
(See
follows:
location
counter
next example
uses a hexadecimal
constant
bits 24 through
31 of register
5.
Operation
Operand
IC
5,=X'FF'
to
a full
as
In the following
example,
the digit A is dropped,
decimal
digits
are specified
for a length
of two bytes:
way
to
set
the following
word-boundary.
a literal
because
and
five
inserts
hexa-
5-15
Name
Op e r and
ALPHACON
The
bytes.
factor.
constant
resulting
constant
is
6F4E,
which
occupies
the
specified
two
It
is
duplicated
three
times,
as requested
by the duplication
If it
had
merely
been
specified
as
X'A6F4E',
the
resulting
would
have a hexadecimal
zero in the leftmost
position.
0A6F4EOA6F4EOA6F4E
Binary
enclosed
operand.
Constant
-B:
A
binary
constant
is written
in apostrophes.
Only one binary
constant
can be
Duplication
and length
can be specified.
The
a binary
constant
is
256
bytes.
The implied
length
of
a
binary
constant
is
occupied
by
the
constant
including
any
padding
truncation
takes place
on the left.
The padding
bit
The
constant.
following
example
BCON would have
Operation
0perand
BCON
BTRUNC
BPAD
DC
DC
DC
B'II011101'
BLI'100100011'
BLI'I01'
would
assemble
with
the
leftmost
the
number
of
bytes
necessary.
Padding
or
used is a 0.
used
to
of i.
Name
BTRUNC
bit
designate
truncated,
as
binary
follows:
00100011
BPAD
would
assemble
with
five
zeros
as
padding,
as
follows:
00000101
Fixed-Point
Constants
decimal
number,
which
The number
can
integral
and
follows:
l.
5-16
-- F and H:
can be followed
fixed-point
by a
decimal
be an integer,
a fraction,
or
fractional
portions).
The
a mixed
format
constant
is written
as a
exponent
if
desired.
number
(i.e.,
one with
of
the constant
is as
The number
is written
as a signed
or unsigned
decimal
value.
The
decimal
point
can be placed
before,
within,
or after
the
number.
If
it
is
omitted,
the
number
is assumed
to be an integer.
A
positive
sign is assumed
if
an
unsigned
number
is
specified.
Unless
a scale
the
fractional
Modifiers."
modifier
portion
accompanies
a mixed number
or
fraction,
is lost, as explained
under "Subfield
3:
The
exponent
is
optional.
If
specified,
it
is
written
immediately
after
the
number
as
En, where
n is an optionally
signed
decimal
self-deflnlng
term specifying
the exponent
of
the
factor
i0.
The exponent
may be in the range
-85 to +75.
If an
unsigned
exponent
is specified,
a
plus
sign
is
assumed.
The
exponent
causes
the value of the constant
to be adjusted
by the
power of i0 that it specifies
before
the constant
is converted
to
its binary
form.
The exponent
may exceed
the
permissible
range
for
exponents,
provided
that
the
sum of the exponent
and the
exponent
modifier
does
not
exceed
that
range.
The number
is converted
to a binary
number,
and scaling
is
performed
if
specified.
The
binary
number
is then rounded
and assembled
into the
proper
field,
according
to the specified
or implied
length.
The
resulting
number
will
not
differ
from the exact value by more than one in the last
place.
If the value of the number
exceeds
the length
specified
or implied,
the sign is lost, the necessary
leftmost
bits are truncated
to
the
length
of
the
field,
and the value
is then assembled
into the whole
field.
Any
duplication
factor
that
is
present
is
applied
after
the
constant
is
assembled.
A negative
number
is carried
in
2's
complement
form.
An implied
length
of four bytes is assumed
for a full-word
(F) and two
bytes
for a half-word
(H), and the constant
is aligned
to the proper
fullword or half-word
if a length
is not specified.
However,
any length
up
to
and
including
eight bytes can be specified
for either
type of constant
by
a length
modifier,
in which
case no boundary
alignment
occurs.
Maximum
and
constants
are:
minimum
values,
Length
Ma____x
Mi__n_n
263'1
-263
4
2
1
231-1
215-1
27-1
23 -i
21 -i
0
-231
-215
-27
-23
-21
-i
.4
.2
.i
A
below.
exclusive
field
of
three
full-words
is
The location
attribute
of CONWRD
of
scaling,
generated
from
is the
address
for
fixed-point
the statement
shown
of
the
leftmost
byte
of
the first word,
and the length
attribute
is 4, the implied
length
for a full-word
fixed-point
constant.
The
expression
CONWRI>+4
could
be
used to address
the second
constant
(second
word)
in the field.
5-17
Name
Operation
Operand
CONWRD
DC
3F'658474'
The
next
statement
containing
a negative
order
to reserve
six
causes
the
generation
constant.
Notice
that
bits for the fractional
Name
Operation
Operand
HALFCON
DC
HS6'-25.46'
scaling
portion
of
two-byte
The
next
constant
(3.50)
is multiplied
by i0 to the power
being
converted
to its binary
format.
The scale modifier
reserves
for the fractional
portion.
Name
Operation
Operand
FULLCON
DC
HSI2'3.50E-2'
The
Name
The
modifier
The four
same
constant
could
be
specified
as
field
in
-2 before
12
bits
a literal:
Operation
Operand
AH
7,=HSI2'3.50E-2'
final
example
specifies
three constants.
requests
four bits for the fractional
portion
bits are provided
whether
or not the fraction
Name
Operation
Operand
THREECON
DC
FS4'I0,25.3,100'
Notice
that
of
each
exists.
the scale
constant.
Floatin_-Point
Constants
-E_
D_
and
L: A floating-point
constant
is
written
as a decimal
number.
As an option
a decimal
exponent
may
follow.
The number
may be an integer,
a fraction,
or a mixed
number
(i.e.,
one with
integral
and
fractional
portions).
The
format
of
the constant
is as
follows:
5-18
The number
is written
as a signed
or unsigned
decimal
value.
The
decimal
point
can be placed before,
within,
or after the
number.
If
it
is
omitted,
the
number
is assumed
to be an integer.
A
positive
sign is assumed
if an unsigned
number
is specified.
i,
The exponent
is optional.
If
specified,
it
is
written
diately
after
the number
as En, where n is an optionally
decimal
value specifying
the exponent
of the factor
I0.
unsigned
range of
above.
exponent
is
specified,
the exponent
is
explained
plus
under
immesigned
If
an
sign is assumed.
The
"Exponent
Modifier"
The
external
format
for a floatlng-point
number
has two parts:
the
portion
containing
the
exponent,
which
is
sometimes
called
the
characteristic,
followed
by the portion
containing
the fraction,
which
is
sometimes
called
the
mantissa.
Therefore,
the
number
specified
as
a
floating-point
constant
must
be converted
to a fraction
before
it can be
translated
into the proper
format.
Figure
5-5 shows
the external
format
of
the three
types of floating-point
constants.
%H/)_
7 _'Lf)ATJNF,
POINT
NIJMBE
R IE)
_Z_Ar_AL
TF_BTI(_
O
LONG
F[
OATING
POINT
NUMBER
(Dt
? 811
S
CHARAC.
568_T
FRACTION
78
F TENDED
63
FLOATING
POINT
NUMBER
4L)
[[ 7 ,T
/
H,GHo
.... o
CH_RAC
TERISTIC
Figure
FRACTION
__
0
11281T
l
7
LowO.oE...t_ OF
1128_T
FRACTION
5-5.
1
63
53
Floating-Point
External
Formats
5-19
Thus,
the
format.
In
signed
is the
exponent
machine
exponent
product
is also
format
altered
before
being
floating-point
translated
number
also
has
into
two
machine
parts,
and signed
fraction.
The quantity
expressed
by this
of the fraction
and the number
16 raised
to the power
the
number
of the
exponent.
The exponent
is translated
into its binary
equivalent
in
excess
64
binary
notation
and the fraction
is converted
to a binary
number.
Scaling
is performed
if specified;
if not,
the
fraction
is
normalized
(leading
hexadecimal
zeros are removed).
Rounding
of the fraction
is then performed
according
to
the specified
or implied
length,
and the number
is stored
in
the proper
field.
The resulting
number
will
not
differ
from
the
exact
value
by
more
than
one
in
the
last place.
Within
the portion
of the
floatlng-point
field allocated
to the fraction,
the
hexadecimal
point
is
assumed
tQ
be
to
the
left
of
the leftmost
hexadecimal
digit,
and the
fraction
occupies
the leftmost
portion
of the
field.
Negative
fractions
are carried
in true representation,
not in the two's complement
form.
An
implied
length
of four bytes
is assumed
for a short
(E) constant
and eight
bytes for a long
(D)constant
An implied
length
of 16 bytes
is
assumed
for
an
extended
(L)
constant.
The constant
is aligned
at the
proper
word
(E) or double
word
(D and
L)
boundary
if
a
length
is
not
specified.
However,
any length
up to and including
eight bytes
(E and D)
or 16 bytes
(L) can be specified
boundary
alignment
occurs.
by
a length
modifier.
Any
of
the following
statements
could be used
positive,
full-word,
floatlng-point
constant;
the
instruction
statement
with
a
literal
operand.
constants
contain
an exponent
modifier.
Name
Operation
Operand
DC
DC
DC
DC
DC
AE
E'46.415'
E'46415E-3'
E'+464.15E-I'
E'+.46415E+2'
EE2'.46415'
In
this
to specify
last
is
Note that
case,
46.415
as a
a
machinethe last two
6,'EE2'.46415'
_----
The following
constants.
5-20
would
each
be
generated
as
double-word
no
floating-point
Operation
l Operand
DE+4'+46,-3.729,+473'
DC
FLOAT
Decimal
Constants
-- P and Z:
A decimal
constant
is written
as a signed
or
unsigned
decimal
value.
If the sign is omitted,
a plus sign is assumed.
The decimal
point may be
written
wherever
desired
or
may
be
omitted.
Scaling
and exponent
modifiers
may not be specified
for decimal
constants.
The maximum
length
of a decimal
alignment
is performed.
constant
is
16
bytes.
No
word
boundary
The placement
of a decimal
point in the definition
does not affect
the
assembly
of
the
constant
in
any
way
because,
unlike
flxed-point
and
floatlng-po!nt
constants,
a decimal
constant
is not converted
to its binary
equivalent.
The fact that a decimal
constant
is an integer,
a fraction,
or
a mixed
number
is
not
pertinent
to
its
generation.
Furthermore,
the
decimal
point
is
not
assembled
into
the constant.
The programmer
may
determine
proper
decimal
point
alignment
either
by
defining
his
data
so
that
the
point
is aligned
or by selecting
machine-lnstructions
that will
operate
on the data properly
(i.e., shift it for purposes
of alignment).
If zoned decimal
format
is specified
(Z), each decimal
digit
is translated
into one byte.
The translation
is done according
to
the
character
set
shown
in Appendix
A.
The rightmost
byte contains
the sign as well as
the rightmost
digit.
For packed
decimal
format
(P), each pair
of
decimal
digits
is
translated
into one byte.
The rightmost
digit
and the sign are
translated
into the rightmost
byte.
The bit configuration
for
the
digits
is
identical
to the configurations
for the hexadecimal
digits
0-9 as shown
in Section
3 under "Hexadecimal
Self-Definlng
Value."
For both packed
and
zoned
decimals,
a plus sign is translated
into the hexadecimal
digit
C, and
a minus
sign into the digit D.
If
an
even
number
of packed
decimal
digits
is specified,
one digit
will be left unpaired
because
the righCmost
digit
is paired
with
the
sign.
Therefore,
in
the
leftmost
byte,
the leftmost
four bits will be set to
zeros
and the rightmost
four bits will contain
the odd (first)
digit.
If no
length
modifier
is the number
of bytes
the
format,
sign, and possible
a length
modifier
is given,
is
given,
the
implied
length
for
either
constant
constant
occupies
(taking
into
account
addition
of zero bits for packed
decimals).
the constant
is handled
as follows:
the
If
l.
If the constant
requires
fewer bytes
than
the
necessary
number
of bytes is added
decimal
format,
the decimal
digit zero is
byte.
For
packed
decimals,
the bits of
to zero.
the
length
specifies,
to the left.
For zoned
placed
in
each
added
each added byte are set
5-21
If the constant
requires
more bytes
than
the
length
the
necessary
number
of
leftmost
digits
or pairs
dropped,
depending
on which
format
is specified.
Examples
Name
of decimal
constant
Operation
Operand
DC
DC
DC
DC
P'+1.25'
Z'-543'
both
follow.
specifies
both packed
and zoned
decimal
conapplies
to each constant
in the first operand
constant).
Note that
a
literal
could
not
operands.
Name
Operation
Operand
DECIMALS
DC
PL8'+25.8,-3874,
+2.3',Z'+80,-3.72'
The
Name
last
specifies,
digits
is
Z'79.68'
PL3'79.68'
The following
statement
stants.
The length
modifier
(i.e., to each packed
decimal
specify
definitions
of
example
Operat
illustrates
the
use
of
a packed
decimal
literal.
ion
UNPK
Address
Constants:
An
lated
into a constant.
OUTAREA,
address
Address
constant
is a storage
address
that is
constants
can be used for initializing
transbase
registers
to
facilitate
the
addressing
of
storage.
Furthermore,
they
provide
a means of communicating
between
control
sections
of a multisection
program.
However_
storage
addressing
and control
section
communication
are
also dependent
on the use
of
the
USING
assembler
instruction
and
the
loading
of registers.
Coding
examples
that illustrate
these considerations
are
provided
in Section
3 using
"Programming
with the USING
Instruction."
An address
constant,
unlike
other types of constants,
is
enclosed
in
parentheses.
If two or more address
constants
are specified
in an operand,
they
are
separated
by
commas,
and
the
entire
sequence
is enclosed
by
parentheses.
There
are five types of address
constants:
A, Y, S, Q and
V.
A relocatable
address
constant
may not be specified
with bit lengths.
5-22
Complex
Relocatable
Expressions:
A complex
relocatable
expression
can only
be used to specify
an A-type
or Y-type
address
constant.
These expressions
contain
two or more unpaired
relocatable
terms and/or
negative
relocatable
terms in addition
to any absolute
or paired
relocatable
terms that
may
be
present.
A
complex
relocatable
expression
might
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.
A-Type
Address
Constant:
This
constant
is
specified
as an absolute,
relocatable,
or
complex
relocatable
expression.
(Remember
that
an
expression
may
be single
term or multiterm.)
The value of the expression
is calculated
to 32 bits as explained
in Section
2 with one exception:
the
maximum
value of the expresslonmay
be 231-1.
The value
is then truncated
on
the left,
if necessary,
to the specified
or implied
length
of the field
and assembled
into the rightmost
bits of the field.
The implied
length
of
an
A-type
constant
is four bytes,
and alignment
is to a full-word
boundary
unless
a length
is specified,
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 .i to 4 bytes may be used for an absolute
expression,
while
a
length
of
only
3 or 4 may be used for a relocatable
or complex
relocatable
expression.
In the following
named
ACON
contains
Note that there
is a
location
counter
fourth
constant.
specified
as
examples,
the
field
generated
from
the
statement
four
constants,
each of which occupies
four bytes.
location
counter
reference
in one.
The value
of
the
will
be
The second
literals
(i.e.,
the address
of the first byte allocated
to the
statement
shows
the
same
set
of
constants
address
constant
llterals).
Name
Operation
Operand
ACON
DC
LM
A(108,LOP,END-STRT,*+4096)
4,7,-A(108,LOP,END-STRT,*+4096)
Note:
When
instruction
the location
above,
the
first
of
Y-Type
byte
Address
the
counter
reference
occurs
in a literal,
as in
value of the location
counter
is the address
the LM
of the
instruction.
Constant:
A Y-type
address
constant
the A-type
constant.
It too is specified
as an
complex
relocatable
expression.
The
value
calculated
to 32 bits as explained
in
Section
value
of the expression
may be only 215-1.
The
has
much
in
common
with
absolute,
relocatable,
or
of
the
expression
is also
2.
However,
the
maximum
value
is then truncated,
if
necessary,
to
the
specified
or implied
length
of the field and assembled
into the rightmost
bits of the field.
The
implied
length
of
a
Y-type
constant
is
two
bytes,
and alignment
is to a half-word
boundary
unless
a
length
is specified,
in which
case no alignment
will
occur.
The
maximum
length
of a Y-type
address
constant
is two bytes.
If length
specification
5-23
is used,
complex
a length
expression
Warning:
avoided
32,767
Specification
of relocatable
Y-type
address
in programs
destined
to be executed
on machines
bytes
of storage
capacity.
In any case Y-type
constants
System/360
should
not
control.
be
used
in programs
W-Type
Y-type
by the
Address
Constant:
except
that maxlmum
Y-type.
S-Type
address
Address
Constant:
The S-type
in base-dlsplacement
form.
The
i.
.
constant
As
an
may
be
absolute
A W-type
value
can
specified
or
in
relocatable
to
be
for
a
relocatable
expression.
constant
as opposed
address
constant
two
constants
should
be
having
more
than
relocatable
address
executed
address
be 215
or
under
Operating
is identical
with
the
to the 215-1 allowed
is used
to
store
an
ways:
expression,
As two absolute
expressions,
the first
displacement
value
and
the
second,
e.g.,
S(BETA)
of
which
the
base
represents
register,
the
e.g.,
s (4o0 (13)).
The address
value
represented
by
the
expression
in
(i)
will
be
converted
by
the assembler
into the proper
base register
and displacement
value.
An S-type constant
is assembled
as a half word
and
aligned
on
a
half-word
boundary.
The
leftmost
four
bits
of the assembled
constant
represents
the
base
register
designation,
the
remaining
12
bits
the
displacement
value.
type
If
length
specification
is used,
only
address
constants
may not be specified
be
specified.
S-
Q-Type
Address
Constant
(Assembler
F
only):
This
constant
is
used
to
reserve
storage
for the offset
of an external
dummy
section.
This offset
is added
to the address
of the block
of storage
allocated
to external
dummy
sections
to access
the desired
section.
The constant
is
specified
as
a
relocatable
symbol
which
has
been
previously
defined
in a DXD or DSECT
statement.
The implied
lengt h of a Q-type
address
constant
is
four
bytes
and
boundary
alignment
is
to
a full-word;
a length
of 1-4 bytes may be
spec_fled.
No bit length
specification
is permitted
in a Q-type
constant.
In
the following
example
the constant
VALUE has been previously
defined
in
a DXD or DSECT
statement.
To access
VALUE
the value
of A is added
to
the
base address
of the block of
Q-type
address
constants
may
5-24
storage
not be
allocated
specified
for external
in literals.
dummy
sections.
Name
Operation
Operand
DC
Q (VALUE)
V-Type
Address
Constant:
This constant
is used to reserve
storage
for the
address
of an external
symbol
that is used for effectlng
branches
to
other
programs.
The constant
may not be used for external
data references
within
an
overlay
program.
The constant
is specified
as one relocatable
symbol,
which
neednot
be identified
by an EXTRN
statement.
Whatever
symbol
is
used
is
assumed
to be an external
symbol
by virtue
of the fact that it is
supplied
in a V-type
address
constant.
To suppress
the automatic
library
call mechanism
of the linkage
editor
for a constant
identified
in a V-type
address
constant,
the programmer
can
identify
it in a WXTRN
statement
(Assembler
F only).
Note that specifying
a symbol
as the operand
of a V-type
constant
does
not
constitute
a definition
of the symbol
for this assembly.
The implied
length
of a V-type
address
constant
is four bytes,
and
boundary
alignment
is
to
a
full-word.
A length
modifier
may be used to specify
a length
of
either
three or four bytes_
in
which
case
no
such
boundary
alignment
occurs.
In the following
example,
12 bytes will be reserved
because
there
are three symbols.
The value
of each assembled
constant
will be zero until
the program
is loaded.
It
must
be
emphasized
constant
of
length
less than 4 can and will be
but cannot
be handled
by the Linkage
Editor.
that
a
V-type
address
processed
by the Assembler
Operand
Name
VCONST
DS
-- DEFINE
I DC
Operation
V(SORT,MERGE,CALC)
STORAGE
The DS instruction
is used to reserve
areas of storage
and
to
assign
names
to those areas.
The use of this instruction
is the preferred
way of
symbolically
defining
storage
for work areas,
Input/output
areas,
etc.
The
size of a storage
area that can be reserved
by using
the DS instruction
is
limited
only by the maximum
value of the location
counter.
5-25
Name
Operation
Operand
Any symbol
or blank
DS
text
The format
of the DS operand
is identical
to that of the
DC
operand;
exactly
the same subfields
are employed
and are written
in exactly
the same
sequence
as
they
are
in
the
DC
operand.
Although
the
formats
are
identical,
there are two differences
in
the
specification
of
subfields.
They are:
i.
The specification
of data
(subfield
operand,
but it is mandatory
in a DC
specified,
it must be valid.
The maximum
hexadecimal
length
(X)
that
field
may be
types
4) is
operand.
optional
If the
in
a
constant
specified
for
character
is
65,535
bytes
rather
(C)
than
DS
is
and
256
bytes.
If a DS operand
specifies
a constant
in subfield
4, and no
length
is
specified
in
subfield
3, the assembler
determines
the length
of the data
and reserves
the appropriate
amount
of storage.
It does not
assemble
the
constant.
The ability
to specify
data and have the assembler
calculate
the
storage
area
that would
be required
for such data is a convenience
to the
programmer.
If he knows the general
format
of the data that will be placed
in the storage
area during
program
execution,
all he needs
to do is show it
as the fourth
subfield
in a DS operand.
The assembler
then determines
the
correct
amount
of storage
to be reserved,
thus relieving
the programmer
of
length
considerations.
If the DS instruction
is named by a symbol,
its value attribute
is the
location
of the leftmost
byte of the reserved
area.
The
length
attribute
of
the
symbol
is
the
length
(implied
or explicit)
of the type of data
specified.
Should the DS have a series
of operands,
the
length
attribute
for
the symbol
is developed
from the first item in the first operand.
Any
positioning
required
for aligning
the storage
area to the
proper
type
of
boundary
is done before
the address
value
is determined.
Bytes skipped
for
alignment
are not set to zero.
Each
field
type
(e.g.,
hexadecimal,
character,
floating-point)
is
associated
with certain
characteristics
(these
are summarized
in
Appendix
F).
The
associated
characteristics
will determine
which
field-type
code
the programmer
selects
for the DS operand
and
what
other
information
he
adds, notably
a length
specification
or a duplication
factor.
For example,
the E floating-polnt
field and the F flxed-point
field both have an implied
length
of
four
bytes.
The
leftmost
byte
is
aligned
to a full-word
5-26
boundary.
Thus, either
code could be
specified
if
it
were
desired
to
reserve
four
bytes of storage
aligned
to a full-word
boundary.
To obtain
a length
of eight bytes,
one could specify
either
the E
or
F
field
type
with
a length
modifier
of eight.
However,
a duplication
factor
would have
to be used to reserve
a larger
area,
because
the
maximum
length
specification
for either
type is eight bytes.
Note also that specifying
length
would
cancel
any special
boundary
alignment.
In contrast,
packed
and zoned decimal
(P and Z), character
(C),
hexadecimal
(X), and binary
(B) fields have an implied
length
of one byte.
Any
of these codes,
if used, would have to be accompanied
by a length
modifier,
unless
Just one byte is to be reserved.
Although
no alignment
occurs,
the
use of
C
and
X
field
types
permits
greater
latitude
in
length
specifications,
the maximum
for either
type being 65,535
bytes.
(Note that
thls differs
from the maximum
for these types in a DC instruction.)
Unless
a fleld
of one byte is desired,
either
the length
must be
C,
X,
P,
Z, or B field types,
or else the data must be
fourth
subfleld),
so that the assembler
can calculate
the
DS
To define
four
statements
might
10-byte
fields
be as follows:
and
one
Name
Operation
Operand
FIELD
AREA
DS
DS
4CLI0
CLI00
Although
FIELD
preceding
definition
attribute
of
i0.
machlne-instruction
Additional
100-byte
specified
specified
length.
field,
the
for the
(as the
respective
might
have
been specified
as one 40-byte
field,
the
has the advantage
of providing
FIELD
with
a
length
This
would
be
pertinent
when
using
FIELD as an SS
operand.
examples
of DS
statements
are
shown
below:
Name
Operation
Operand
ONE
DS
TWO
DS
THREE
DS
CL80(one
80-byte
field,
length
attribute
of 80
80C(80
one-byte
fields,
length
attribute
of one
6F(six
full words,
length
attribute
of four)
FOUR
DS
FIVE
DS
D(one double
word,
length
attribute
of eight)
4H(four
half-words,length
attribute
of two)
5-27
Note:
ADS
statement
causes
the
zeros.
No
assumption
should
area.
Special
Uses
of
the
storage
area
be made as
to be
to the
reserved
contents
but
of
not
set
to
the reserved
DuplicationFactor
FORCING
ALIGNMENT:
The location
counter
can be forced
to
a
double-word,
full-word,
or half-word
boundary
by using
the appropriate
field type (e.g.,
D,
F, or H) with a duplication
factor
of zero.
This method
may be used to
obtain
boundary
alignment
that
otherwise
would
not
be
provided.
For
example,
the
following
statements
would
set the location
counter
to the
next double-word
boundary
and then reserve
storage
space
for
a
128-byte
field
(whose
leftmost
byte would
be on a double-word
boundary).
Name
ARF_A
......
1 0peratiOnDS
DS
J0D_Operand
CL128
DEFINING
FIELDS
OF AN AREA:
ADS
instruction
with a duplication
factor
of
zero can be used to assign
a name to an area of
storage
without
actually
reserving
the area.
Additional
DS and/or
DC instructions
may then be used
to reserve
the area and
assign
names
to
fields
within
the
area
(and
generate
constants
if DC is used).
area
For
for
example,
processing
Positions
Positions
5-10
11-30
Positions
Positions
Positions
31-36
47-54
55-62
assume
that 80-character
and that each record
has
Payroll
Employee
Date
records
are to be read
the following
format:
into
an
Number
Name
Gross Wages
Withholding
Tax
The following
example
illustrates
how DS
assign
a name to the record
area, then define
allocate
the
storage
for
them.
Note that
instructions
might
the fields
of
the
the first statement
be used to
area
and
names
the
entire
area by defining
the symbol
RDAREA;
the
statement
gives
RDAREA
a
length
attribute
of 80 bytes,
but does not reserve
any storage.
Similarly,
the
fifth
statement
names a slx-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.
5-28
Name
Operation
Operand
RDAREA
PAYNO
DS
DS
DS
NAME
DATE
DAY
DS
DS
DS
MONTH
YEAR
DS
DS
DS
GROSS
FEDTAX
DS
DS
DS
0CLgO
CL4
CL6
CL20
OCL6
CL2
CL2
CL2
CLIO
CL8
CL8
CLI8
LISTING
CONTROL
INSTRUCTIONS
The
listing
control
instructions
are" used to identify
an assembly
listing
and assembly
output
cards,
to provide
blank
lines
in
an
assembly
listing,
and to designate
how much detail
is to be included
in an assembly
listing.
In no case are instructions
or constants
generated
in the
object
program.
Listing
control
statements
with the exception
of PRINT are not
printed
in the listing.
NOTE:
TITLE,
SPACE,
and EJECT
statements
will not
appear
in
the
source
listing
unless
the
statement
is
continued
onto another
card.
Then the
first
card of the statement
is printed.
However,
any of these three
types
of
statements,
if generated
as macro
instruction
expansion,
will never be
listed
regardless
of continuation.
TITLE
--
The
listing
statement
IDENTIFY
ASSEMBLY
OUTPUT
TITLE instruction
enables
the
and
assembly
output
cards.
is as follows:
programmer
to identify
the
assembly
The format
of the TITLE
instruction
Name
Operation
Operand
Special,
TITLE
A sequence
of characters,
enclosed
in
apostrophes
sequence
or variable
symbol
or
blank
The
name
alphabetic
name field
or
are
field
may
numeric
punched
contain
characters
into columns
special
symbol
in any
73-76
combination.
of all the
of
from
The
output
one
to
contents
of
cards
for
four
the
the
5-29
program
except
those
produced
instructions.
Only the first TITLE
special
symbol
or a variable
all subsequent
TITLE statements
blank.
by
the
statement
symbol
in the
must contain
PUNCH
and
REPRO
assembler
in
a
program
may
have
a
name field.
The
either
a sequence
name field
symbol
or
of
a
The
operand
field may contain
up to i00 characters
enclosed
in apostrophes.
Special
consideration
must be given to
representing
apostrophes
a1_
ampersands
as characters.
Each single
apostrophe
or ampersand
desired
as a character
in the constant
must be represented
by a pair of apostrophes
or ampersands.
contents
of
assembly
in
storage
of each page
The
the
of
llsting.
A program
may contain
more
statement
provides
the
heading
follow
it, until
another
TITLE
statement
causes
the
listing
heading
than
one
TITLE
statement.
Each
TITLE
for
pages
in the assembly
listing
that
statement
is
encountered.
Each
TITLE
to
be
advanced
to a new page
(before
the
is printed).
For
to
appears
the top
example,
appear
in
if
the
following
statement
is
the
first
TITLE
statement
a program:
Name
Operation
Operand
D_
PGMI
TITLE
I 'FIRST
then
PGMI is punched
into
heading
appears
at the top
If
the
following
Name
statement
occurs
EJECT
Operand
TITLE
'A NEW
The sequence
77-80.
--
The
the
top
number
START
NEW
EJECT
instruction
of
a new
of
the
cards
(columns
73-76)
and this
page:
PGMI FIRST HEADING.
in
the
program:
HEADING'
output
cards,
HEADING.
cards
same
in
the
but
output
each
following
deck
is
page
contained
in
to appear
at
PAGE
page.
causes
This
separate
routines
in
the
instruction
statement
is as
5-30
later
Operation
HEADING'
the
next
instruction
program
follows:
of
the
provides
line
listing.
The
listing
convenient
format
of
way
the
to
FTECT
Name
Operation
A sequence
symbol
or
blank
EJECT
If
I Operand
used;
Not
should
be
I blank
the
line
before
the
EJECT
statement
appears
at
the
bottom
of
page,
the EJECT statement
has no effect.
Two EJECT statements
may be used
in succession
to
obtain
a
blank
page.
A
TITLE
instruction
followed
immediately
by
an
EJECT instruction
will produce
a page with nothing
but
the operand
entry
(if any) of the TITLE instruction.
Text
following
the
EJECT
instruction
will begin at the top of the next page.
SPACE
--
SPACE
LISTING
The
SPACE
instruction
listing.
The
format
of
is used
the
SPACE
to
insert
one
instruction
Name
Operation
Operand
A sequence
symbol
or blank
SPACE
A decimal
blank
or
more
statement
value
blank
is
as
lines
in
the
follows:
or
A
decimal
value
is
used to specify
the number
of blank
lines to be
inserted
in the assembly
listing.
A blank operand
causes
one blank
line to
be inserted.
If this value exceeds
the number
of lines
remaining
on
the
listing
page,
the
statement
will
have
the
same
effect
as
an EJECT
statement.
PRINT
--
The
listing.
0PTIONALDATA
PRINT
instruction
is used to
control
The format
of the PRINT instruction
Name
Operation
0perand
A sequence
symbol
or
blank
One
The
following
i.
to
printing
statement
of
is:
the
assembly
three
operands
one
to
three
operands
groups
in any sequence:
ON
A listing
may
include
an
operand
from
each
of
the
is printed.
5-31
OFF
No
listing
is printed.
GEN
All statements
printed.
NOGEN
Statements
generated
by macro-instructions
are not
printed
with
the exception
of
MNOTE,
which
will
print
regardless
of
NOGEN.
However,
the macroinstruction
itself
will appear
in the listing.
3.
DATA
Constants
4.
NODATA
Only the
listing.
generated
are
printed
leftmost
by
out
eight
macro-instructions
in
full
bytes
are
in
the
are
listing.
printed
on
the
A program
may
contain
any
number
of
PRINT
statements.
A
PRINT
statement
controls
the printing
of the assembly
listing
until another
PRINT
statement
is encountered.
Each option
remains
in effect
until
the corresponding
opposite
option
is specified.
is
Until
assumed:
the
first
statement
(if
any)
is
encountered,
the
following
Operand
Name
I 0peratlOnpRINT
For
example,
Name
appears
in
if
the
ON,NODATA,GEN
statement:
Operation
Operand
DC
XL256'00'
a program,
256
bytes
of
zeros
l!ime
-- ...........
OperationPRINT
is
the
bytes
of
PRINT
statement
to appear
are printed
in the assembly
5-32
last
zeros
are
assembled.
If
the
statement:
OperandDATA
before
the DC statement,
listing.
However,
if:
all
256
Operation
i
Operand
I Name
to appear
before
the DC
in the assembly
listing.
Whenever
an
continues
according
is
last
The
Thus
operand
to its
hierarchy
i.
ON
2.
GEN
3.
DATA
with
the
of print
and
Name
omitted,
it
specification.
control
is
statements
statement,
assumed
to be
only
unchanged
eight
and
is:
OFF
and
NOGEN
and
NODATA
following
statement
nothing
would
be
printed.
Operation
I Operand
PRINT
PROGRAM
CONTROL
OFF_DATA,GEN
INSTRUCTIONS
The program
control
instructions
are used to specify
the
end
of
an
assembly,
to
set
the
location
counter
to a value or word boundary,
to
insert
previously
written
coding
in the program,
to specify
the
placement
of
literals
in storage,
to check the sequence
of input cards,
to indicate
statement
format,
and to punch a
card.
Except
for
the
CNOP
and
COPY
instructions,
none of these assembler
instructions
generate
instructions
or
constants
in the object
program.
ICTL
--
INPUT
FORMAT
CONTROL
The
ICTL instruction
allows
the programmer
to alter
the normal
format
of his source
program
statements.
The
ICTL
statement
must
precede
all
other
statements
in
the
source
program
and may be used only once.
The
format
of the ICTL instruction
statement
is as follows:
5-33
Name
Operation
Operand
Blank
ICTL
1-3
declmal
defining
the form
Operand
always
be
specifies
specified,
assumed
+5.
The
specifies
the
begin
column
of
self-
values
b,e,c
of
the
source
statement.
It must
specified,
and
must
be
within
1-40,
inclusive.
Operand
e
the
end
column
of the source
statement.
The end column,
when
must be within
41-80,
inclusive;
when
not
specified,
it
is
to
be
column
71.
after
The
the
end
end
column
column
card
is
a
continuation
card.
Operand
c specifies
the continue
column
of
the source
statement.
The continue
column,
when specified,
must be
within
2-40
and must be greater
than b.
If the continue
column
is not specified,
or if column
80 is specified
as the end column,
the assembler
assumes
that
there
are
no
continuation
cards,
and all statements
are contained
on a
single
card.
The
operand
forms
b,,c
and
If no ICTL statement
is used in
assumes
that i,
71,
and
16
zre
respectively.
end
continuation
specified.
cards
designates
specified,
are
recognized
b,
the
the
are
invalid.
source
begin,
program,
the
end, and continue
the begin
column
it
is
assumed
because
the
as column
25.
to
be
column
continue
column
assembler
columns,
Since
71.
the
No
is
not
Operand
Name
ISEQ
___I
--
INPUT
OperatiOnicTL
SEQUENCE
25
CHECKING
Name
Operation
Operand
Blank
ISEQ
Two
decimal
defining
the form
5-34
self-
values
l,r;or
of
blank
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
equal
to
or
greater
than
operand
i.
Columns
to be checked
must not be
between
the begin and end columns.
Sequence
checking
begins
statement.
Comparison
of
internal
collating
sequence.
higher
than
the
preceding
with
the
first
card
following
adjacent
cards
makes
use
of
the
(See Appendix
A.)
Each card checked
the
ISEQ
eight-bit
must
be
card.
An
ISEQ
statement
with
a
blank
operand
terminates
the operation.
(Note
that this ISEQ statement
is also sequence
checked.)
Checking
may
be
resumed
with another
ISEQ statement.
Sequence
checking
is only
performed
on statements
contained
source
program.
Statements
inserted
by the COPY
assembler-instruction
generated
by a macro-instruction
are not checked
for sequence.
Also
definitions
in a macro library
are not checked.
PUNCH
--
PUNCH
The
punched
many
PUNCH
the
or
macro-
A CARD
PUNCH
into
in
assembler-instruction
a card.
One
PUNCH
statements
may
be
causes
statement
used
as
are
the
data
produces
one
necessary.
Name
Operation
Operand
A sequence
symbol
or
blank
PUNCH
i to
80
enclosed
trophes
in
The
the
operand
punched
format
to be
card.
As
is:
characters
in
apos-
Using
character
representation,
the operand
is written
as a string
of
up to 80 characters
enclosed
in
apostrophes.
All
characters,
including
blank,
are
valid.
The
position
immediately
to
the right of the left
apostrophe
is
regarded
as
column
one
of
the
card
to
be
punched.
Substitution
is
performed
for
variable
symbols
in the operand.
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 a pair of apostrophes
or ampersands.
Only
one
apostrophe
or
ampersand
appears
in
storage.
PUNCH
statements
may
occur anywhere
within
a program,
except
before
macro
definitions.
They may
occur
within
a
macro
definition
but
not
between
the
end of a macro definition
and the beginning
of the next macro
definition.
If a PUNCH statement
occurs
before
the first control
section,
the
resultant
card will precede
all other cards
in the object
program
card
deck;
otherwise
identification
in
place.
No
sequence
number
or
5-35
REPRO
--
REPRODUCE
FOLLOWING
CARD
one
punched
definition.
card.
The
REPRO
instruction
may
REPRO
statements
that occur
before
statements
composing
the
first
or only control
which
precede
all other cards of the object
deck.
Name
Operation
Operand
A sequence
symbol
or
blank
REPRO
Blank
valid
The line to be
characters.
continuing
to column
ORG
SET
through
i of the
LOCATION
reproduced
Characters
may contain
may
be
column
80 of the line.
card to be punched.
any
combination
entered
starting
Column
i of
the
of
up
in column
line
cards
to
80
1 and
corresponds
COUNTER
is used to
alter
the
setting
control
section.
The format
of
Name
Operation
Operand
A sequence
symbol
or
blank
0RG
The
location
counter
is
set
operand.
If the operand
is omitted,
next available
(unused)
location
for
An
ORG
statement
cannot
beginning
of the control
section
invalid
if it appears
less than
control
section.
relocatabie
pression
Any
symbols
in the expression
unpaired
relocatable
symbol
must be
which
the ORG statement
appears.
5-36
section
will punch
The format
is:
not
all
of
the
location
the ORG instruction
ex-
or blank
previously
defined.
same control
section
to the value
of the
the location
counter
that control
section.
be
used
in which
500 bytes
expression
is
set
in
to
The
in
the
the
to
specify
a location
below
the
it
appears.
The
following
is
from the beginning
of the current
Name
byte
If
it
in
the
is
Operat ion
Operand
ORG
*-500
desired
current
Name
to
reset
control
the
section,
Operation
location
the
counter
following
to
the
statement
next
available
would
be
used:
Operand
ORG
If
previous
purpose
statement
of
such
ORG
statements
of
redefining
with an omitted
statements
and
have
reduced
the
location
portion
of the current
operand
can then be used
restore
the
location
counter
counter
for
control
section,
to terminate
the
to
its
highest
an ORG
effects
setting.
Note:
Through
use of the ORG statement
two instructions
may
be
given
same
location
counter
values.
In such a case the second
instruction
not always
eliminate
the effects
of the first
instruction.
Consider
following
example:
ADDR
In
this
example
the value of
of ADDR during
linkage
editing.
--
the
will
the
DC
A(LOC)
ORG *-4
DC
C wBETAt
LTORG
the
BEGIN
LITERAL
(BETA)
will
be
destroyed
by
the
relocation
POOL
Name
Operation
Operand
Symbol
or Blank
LTORG
Not
pool.
Used
The
symbol
represents
the
address
It has a length
attribute
of i.
of
the
first
byte
of
the
literal
5-37
The literal
pool is organized
into
four
segments
within
which
the
llterals
are
stored
in order of appearance,
dependent
on the divisibility
properties
of their object
lengths
(dup
factor
times
total
explicit
or
implied
length).
The
first
segment
contains
all literals
whose
object
length
is a multiple
of
eight.
Those
remaining
literals
with
lengths
divisible
by
four
are
stored
in the second
segment.
The third segment
holds
the remaining
even-length
literals.
Any literals
left over have
odd
lengths
and are stored
in the fourth
segment.
Since
each
literal
pool
begins
at
a
double-word
boundary,
this
guarantees
that all segment
one literals
are double-word,
segment
two fullword,
and segment
three half-word
aligned,
with
no
space
wasted
except,
possibly,
at the pool origin.
Literals
indicated
by
MVC
SH
LM
IC
AD
A(12),'3F'I'
3,mH'2 '
0,3,ffi2F'l,2'
in the
eight,
segments
etc.,
2,mXLI'I'
2,'D'2'
Special
statement
where_
Addressin_
Consideration
Any
literals
used
after
the
last LTORG
statement
in a program
are
placed
at the end of the first control
section.
If
there
are
no
LTORG
statements
in a program,
all literals
used in the program
are placed
at the
end
of
the
first
control
section.
In these circumstances
the programmer
must ensure
that the first control
section
is
always
addressable.
This
means
that
the base address
register
for the first control
section
should
not be changed
through
usage
in
subsequent
control
sections.
If
the
programmer
does
not
wish
to reserve
a register
for this purpose,
he may
place
an LTORG statement
at
the
end
of
each
control
section
thereby
ensuring
that all literals
appearing
in that section
are addressable.
Duplicate
Literals
If
duplicate
literals
occur within
the range controlled
by one LTORG
statement,
only one literal
is stored.
Literals
are considered
duplicates
only if their
specifications
are identical.
A literal
will be stored,
even
if
it
appears
to
duplicate
another
literal,
if it is an A-type
address
constant
containing
any reference
to the location
counter.
The following
examples
illustrate
literals,
if
the
placement
of each
statement.
X'FO'
Both
C'O'
5-38
are
stored
stores
by the
pairs
of
same LTORG
XL3'O'
Both
are
stored
Both
are
stored
HL3'0'
A(*+4)
A(*+4)
X'FFFF'
Identical;
the
first
is
stored
X'FFFF'
CNOP
--
CONDITIONAL
NO
OPERATION
format
of
the
CNOP
instruction
statement
Name
Operation
Operand
A sequence
symbol
or
blank
CNOP
Two
been
Any symbols
previously
absolute
pressions
form b,w
used in
defined,
the
expressions
in
of
the
is as
follows:
exthe
operand
field
Operand
b
specifies
at
which
byte
in
a
word or double
location
counter
is to be set; b can be 0, 2, 4, or 6.
Operand
w
whether
byte b is in a word
(w-4) or
double
word
(w-8).
The
pairs of b and w are valid:
must
have
word
the
specifies
following
5-39
b,w
Specifies
0,4
2,4
0,8
2,8
4,8
6,8
Beginning
of a word
Middle
of a word
Beginning
of a double
word
Second
half-word
of a double-word
Middle
(third half-word)
of a double-word
Fourth
half-word
of a double-word
Figure
5-6 shows the
pairs
specifies.
Note
double-word.
position
in a double
word
that
each
of
that both
0,4 and 2,4 specify
two locations
Double
Word
Word
Half
Byte
Half
Word
Byte
Byte
0,4
0,8
Half
Byte
2,4
2,8
Figure
5-6.
Assume
boundary.
CNOP
that
Then
Name
has
Word
Word
Byte
no
effect;
Word
Half
Byte
Byte
0,4
4,8
Word
Byte
2,4
6,8
Alignment
the
the
location
CNOP
counter
instruction
is
in
currently
this
Operation
Operand
CNOP
BALR
0,8
2,14
it
these
in a
is merely
printed
in
the
aligned
at
a double-word
sequence:
assembly
listing.
However,
this
sequence:
Name
Operation
CNOP
B_ALR
causes
three
branch-on-conditlons
aligning
the
BALR
instruction
follows:
5-40
Operand
6,8
2,14
(no-operations)
to
at the last half-word
be
in
generated,
a double-word
thus
as
Name
After
the
double-word
COPY
Operation
0perand
BCR
BCR
BCR
BALR
0,0
0,0
0,0
2,14
BALR
instruction
boundary,
-- COPY
thereby
PREDEFINED
is generated,
ensuring
SOURCE
an
the
unbroken
location
counter
instruction
is
at
flow.
CODING
Name
Operation
Operand
Blank
COPY
One
from
The
a library
format
of
and
the
symbol
The operand
is a symbol
that identifies
a partitioned
data set
member
to
be
copied
from
either
the
system
macro
library
or a user library
concatenated
to it.
Inserting
code in the library
to be
copied
later
is
performed
by
the
IEBUPDAT
or
IEBUPDTE
routines,
details
of which
are
covered
in the "OS Utilities."
The
statement
END,
is
assembler
inserts
is
encountered.
ICTL,
ISEQ,
If identical
brought
into
program
via COPY
ICTL
instructions
Section
7.)
END
MACRO,
--
END
The
COPY
the
are
the requested
coding
immediately
after
The requested
coding
may not contain
or MEND
statements
program
the
any
COPY
COPY,
statements.
are
each
processed
using
in
the program.
encountered,
time.
All
the coding
they
statements
included
the standard
format
regardless
(For a further
discussion
of
request
in the
of
COPY
any
see
ASSEMBLY
END
instruction
terminates
the
assembly
of
a program.
It may
also
designate
a point in the program
or in a separately
assembled
program
to
which
control
may
be
transferred
after
the program
is loaded.
The END
instruction
must always
be the last statement
in
the
source
program.
A
literal
may not be used.
If an external
symbol
is used in the expression,
the
value
of
the
expression
must
be O.
5-41
The
format
of the
END
instruction
statement
Name
Operation
Operand
Blank
END
relocatable
pression
The operand
specifies
the point
when
loading
is
complete.
This
instruction
in the program,
as shown
as
follows:
exblank
to which
control
may
be
transferred
point
is
usually
the first machinein the following
sequence
Operand
Operation
NAME
AREA
BEGIN
or
is
CSECT
DS
BALR
USING
50F
2,0
*,2
END
BEGIN
Note:
Editing
errors
in
system
macro
definitions
(macro
definitions
included
in a macro library)
are discovered
when the macro
definitions
are
read from the macro library.
This occurs
after
the END statement
has
been
read.
They
will
therefore
be
flagged
after
the END statement
If the
programmer
does not know which of his system
macros
caused
an error,
it
is
necessary
to
punch
all
system
macro
definitions
used in the program,
including
inner macro definitions,
and insert
them in the source
program
as
programmer
macro
definitions,
since
programmer
macro
definitions
are
flagged
in-line.
To
aid
in debugging
it is advisable
to test all macro
definitions
as programmer
macro
definitions
before
incorporating
them
in
the
5-/,2
library
as
system
macro
definitions
PART
II --
THE
MACRO
LANGUAGE
SECTION
6:
INTRODUCTION
SECTION
7:
HOW
TO
PREPARE
SECTION
8:
HOW
TO
WRITE
MACRO
SECTION
9:
HOW
TO
WRITE
CONDITIONAL
SECTION
i0:
EXTENDED
TO
THE
MACRO
MACRO
FEATURES
LANGUAGE
DEFINITIONS
INSTRUCTIONS
OF
THE
ASSEMBLY
MACRO
INSTRUCTIONS
LANGUAGE
SECTION
The
Operating
System/360
6:
macro
INTRODUCTION
language
TO
is
an
THE
MACRO
LANGUAGE
extension
of
the
Operating
System/360
assembler
language.
It provides
a convenient
way to
generate
a desired
sequence
of assembler
language
statements
many times
in
one
or
more
programs.
The macro-deflnltion
is written
only once, and a
single
statement,
a macro-instruction
statement,
is
written
each
time
a
programmer
wants
to generate
the desired
sequence
of
statements.
This facility
simplifies
the coding
of programs,
reduces
programming
errors,
and ensures
that standard
sequences
of
used
to accomplish
desired
functions.
the chance
of
statements
are
An additional
facility,
called
conditional
assembly,
allows
one
to
code
statements
which
may
or
may
not
be
assembled,
depending
upon
conditions
evaluated
at assembly
time.
These conditions
are usually
tests
of
values,
which may be defined,
set, changed,
and tested
during
assembly.
The
conditional
assembly
facilty
may
be
used
without
using
macroinstruction
statements.
THE
MACRO-INSTRUCTION
A
STATEMENT.
macro-instructlon
statement
(hereafter
is a source
program
statement.
The
assembler
language
statements
for
instruction.
The generated
statements
assembler
language
statement.
Macro
cards
of
-instructions
a test
Three
positional,
instructlons
instruction
can
a macro-instruction)
be tested
by
placing
them
a
sequence
of
the same macrollke
any
other
before
the
assembly
program.
types
of
keyword,
permit
in
a
macro-instructlons
may
be
written.
They
are
and mlxed-mode
macro-instructlons.
Positional
macro-
the programmer
fixed
order.
to
write
the
operands
Keyword
macro-instructlons
programmer
to write the operands
of
a
order.
Mixed-mode
macro-instructions
features
of both positional
and
keyword
macro-instructlon.
THE
called
assembler
generates
each
occurrence
of
are then processed
of
a
macropermit
the
macro-instruction
in
a
variable
permit
the
programmer
to use the
macro-instructions
in
the
same
MACRO-DEFINITION
A
macro-definltion
with:
(i)
the mnemonic
instruction,
and
(2)
when the macro-instruction
Every
statement,
is
a set of
statements
that
provides
the
assembler
operation
code
and
the
format
of
the
macrothe sequence
of statements
the assembler
generates
appears
in the source
program.
macro-deflnition
a
macro-instruction
consists
of
prototype
a
macro-definition
header
statement,
one
or more model
6-1
statements,
instructions,
assembly
The macro-definition
header and trailer
statements indicate
assembler the beginning and end of a macro-definitlon.
The macro-lnstructlon
prototype statement specifies
operation code and the type of the macro-lnstructlon.
to the
the mnemonic
The MNOTEinstruction
can be used to generate an error messagewhen
the rules for writing a particular macro-lnstructlon are violated.
The conditional assembly instructions may be used to vary the sequence
of statements generated for each occurrence of a macro-instructlon.
Conditional
assembly instructions
may also be used outside macrodefinitions,
i.e., amongthe assembler language statements in the program.
THE
MACRO
LIBRARY
The
same
macro-definition
may
be
made
available
to more
than one
source
program
by placing
the macro-definition
in the macro
library.
The
macro
library
is a collection
of macro-deflnitions
that can be used by all
the
assembler
language
programs
in
an
installation.
Once
a
macrodefinition
has
been placed
in the macro
library
it may be used by writing
its corresponding
macro-lnstructlon
in a source
program.
Macro-definitions
must be in the system macro
library
under
the same name as
the
prototype.
The
procedure
for
placing
macro -definitions
in
the
macro
library
is
described
in the Utilities
publication.
SYSTEM
AND
PROGRAMMER
A macro-definitlon
MACRO-DEFINITIONS
included
in a
source
deck
_cro-deflnltlon,
One residing
in a macro
library
definition.
There is no difference
in function.
included
a
system
becomes
6-2
in a macro library,
macro -definition
a programmer
is
called
programmer
is called
a system
macroIf a programmer
macro
is
it becomes
a system
macro-deflnltion,
is
punched
and included
in a source
macro-deflnition.
and
deck
if
it
are
to
handled
differently.
In
the statements
in error.
be expanded
the
same,
but
syntax
programmer
macros,
error messages
are
In
system
macros,
however,
error
messages
cannot
be
associated
with the statement
in error because
macros
are located
and edited
after the entire
source
deck has
been
Therefore,
the
error
messages
are
associated
with
Because
of
the difficulty
of finding
syntax
a macro-deflnltion
should
be run
and
"debugged"
before
it is placed
in a macro
library.
SYSTEM
MACRO
the
END
errors
as
a
these
read.
statement.
in system
programmer
macros,
macro
INSTRUCTIONS
The
macro-instructions
that correspond
to macro-deflnltions
prepared
by IBM are called
system
macro-instructlons.
System
macro-instructlons
are
described
in "OS Supervisor
Services
and Macro
Instructions,"
and "OS
Data
Management
Macro
Instructions."
VARYING
THE
GENERATED
STATEMENTS
Each
time
a
macro-lnstructlon
appears
in the source
program
it is
replaced
by
the
same
sequence
of
assembler
language
statements.
Conditional
assembly
instructions,
however,
may be used to vary the number
and format
of the generated
statements.
VARIABLE
SYMBOLS
A variable
symbol
values
by either
the
a macro-deflnltion
to
instruction,
variable
values
assigned
to
symbols
the programmer
A variable
through
seven
Elsewhere,
two
Types
is a type
of
symbol
that
is
assigned
different
programmer
of the assembler.
When the assembler
uses
determine
what statements
are
to
replace
a
macrosymbols
in the model
statements
are replaced
with the
them.
By
changing
the values
assigned
to variable
can vary parts of the generated
statements.
symbol
is written
as an
ampersand
letters
and/or
digits,
the first of
ampersands
must be used to represent
of Variable
followed
by
which must be
an ampersand.
from
one
a letter.
Symbols
writes
Values
to
Variable
Symbolic
parameters
a macro-instruction.
are
Symbols
assigned
values
by
the
programmer
each
time
he
6-3
Systemvariable
it
symbols
are
a macro-instruction.
processes
SET symbols
are
assigned
conditional
assembly
instructions.
Global
SET
assigned
values
values
by
by
the
the
assembler
programmer
by
each
means
time
of
Symbols
The values
assigned
to SET symbols
in one macro-definition
may be used
to
vary
the
statements
that appear
in other macro-deflnltlons.
All SET
symbols
used for this purpose
must be defined
by the programmer
as
global
SET
symbols.
All other SET symbols
(i.e.,
those which may be used to vary
statements
that appear
in the same macro-definitlon)
must be defined
by the
programmer
as local SET symbols.
Local SET symbols
and the other
variable
symbols
(that
is,
symbolic
parameters
and system
variable
symbols)
are
local variable
symbols.
Global
SET symbols
are global
variable
symbols.
ORGANIZATION
OF THIS
PART
OF
THE
PUBLICATION
Sections
7
and
8
describe
the
basic
definitions
and for writing
macro-lnstructions.
Section
instructions.
describes
the
rules
for
rules
writing
for
preparing
conditional
macro-
assembly
Section
i0
describes
additional
features
of
the
macro
language,
including
rules
for
defining
global
SET symbols,
preparing
keyword
and
mlxed-mode
macro-deflnitlons,
and writing
keyword
and
mlxed-mode
macroinstructions.
Appendix
contains
a reference
Examples
of
the
features
remainder
of
the
publication.
particular
features.
However,
versatility
of these features.
6-4
of
summary
of
the
entire
macro
language.
the
language
appear
throughout
the
These
examples
illustrate
the
use of
they
are
not
meant
to
show
the
full
SECTION
A macro-definltlon
consists
i.
A macro-definition
2.
A macro-instruction
Zero
or
more
conditional
4.
7:
MACRO-DEFINITIONS
statement.
statements,
A macro-definition
PREPARE
statement.
prototype
model
TO
of:
header
assembly
HOW
COPY
statements,
MEXIT,
MNOTE,
trailer
statement.
Except
for MEXIT,
MNOTE,
and conditional
assembly
instructions,
section
of the publication
describes
all of the statements
that may
to
prepare
macro-definitions.
scribed
in Section
9.
MEXIT
Section
i0.
PUNCH
or
instructions.
and
Conditional
assembly
MNOTE
instructions
Macr0-definitions
appearing
in a
and
REPRO
statements
and all
be
this
used
instructions
are
are
described
dein
source
program
must appear
before
all
statements
which
pertain
to the first
control
section.
Specifically,
only
the
listing
control
instructions
(EJECT,
PRINT,
SPACE,
and TITLE),
OPSYN,
ICTL, and ISEQ instructions,
and
comments
statements
can occur before
the macro-definitions.
All
but
the
ICTL and OPSYN instruction
can appear
between
macro-definitions
if there
is
more
than
one
definition
in
the source
program.
Conditional
assembly,
substitution,
and
macro
definitions.
A
maximum
sequence
symbols
cannot
macro-deflnition
cannot
appear
number
of continuation
cards for
be
used
in
front
of
or
between
within
a macro-definition
and
macro-definition
statement
the
is
two.
MACRO
-- MACRO-DEFINITION
HEADER
The
macro-deflnltion
header
statement
macro-deflnition.
It must
be
the
first
definition.
The
Name
format
of
this
statement
The
beginning
of a
every
macro-
is:
Blank
-- MACRO-DEFINITION
definition.
the
in
Operand
Operatlon
Blank
MEND
indicates
statement
macro-definition
It
can
appear
TRAILER
trailer
only
once
statement
within
indicates
the
a macro-definltion
end
of
and
a macromust
be
7-1
the
last
statement
in
every
macro-definition.
The
format
of
this
statement
is:
Name
Operation
Operand
MEND
Blank
se-
quence
symbol
or
blank
MACRO
INSTRUCTION
The
PROTOTYPE
macro-lnstructlon
prototypestatement)
of
all
the
second
prototype
specifies
the
macro-instructlons
that
statement
statement
of
statement
mnemonic
refer
every
to
Operand
One
symbolic
symbol
or
The
It
format
the
format
must
of
be
this
separated
The
symbolic
name
field
description
parameters
and
of
are
operands
symbolic
by
or
used
of
com-
blank
in
the
sym-
parameters
mas,
the
macro-deflnition
corresponding
parameters
appears
to
represent
macro-instruction.
under
"Symbolic
Parameters"
in
section.
The
contain
name
a
The
in
The
mnemonic
code
of
in
all
The
commas.
the
the
operand
code
as
field
there
following
statement
operation
field
are
is
an
may
no
not
in
listed
in
contain
symbolic
example
is
that
must
macro-definitlon
instruction
If
prototype
macro-instructlons
operation
another
assembler
of
may
be
blank,
or
it
may
parameter.
symbol
appear
The
field
symbolic
must
7-2
the
macro-definitlon.
more
bolic
parameter
or blank
by
called
and
is:
Operation
this
the
code
macro-deflnitlon.
Name
the
(hereafter
operation
of
be
the
the
to
to
same
as
operation
this
the
program
code
that
macro-definition.
or
mnemonic
of
operation
machine
or
G.
200
parameters,
mnemonic
refer
source
Appendix
the
prototype
symbolic
parameters
comments
statement.
may
separated
not
appear.
Name
Operation
Operand
&NAME
MOVE
&TO,&FROM
Statement
used
Part
Format
The prototype
statement
for assembler
language
I of this publication.
programmer
of operands
may be written
in a format
different
from that
statements.
The normal
format
is described
in
The alternate
format
described
here allows
the
to write
an operand
on each line,
and comments
in the statement.
and
allows
the
interspersing
In
the
alternate
format,
as
in
the
normal
format,
the name and
operation
fields
must appear
on the first llne of
the
statement,
and
at
least
one
blank must follow
the operation
field on that line.
Both types
of statement
formats
may be used in the same prototype
statement.
The
rules
for
If an
after
field
i.
using
the
alternate
statement
format
are:
operand
is followed
by a comma and a blank,
and the
column
the
end column
contains
a nonblank
character,
the operand
may be continued
on the next line starting
in the
continue
column.
More
than
one
operand
may
appear
on
the
Comments
operand,
may appear
after the blank
that indicates
up to and including
the end column.
If
the
next
line
starts
after
the
continue
column,
the
information
entered
on the next line is considered
comments,
and
the operand
field
is
considered
terminated.
Any
subsequent
continuation
lines are considered
comments.
The
following
examples
illustrate:
(i) the normal
(2) the alternate
statement
format,
and (3) a combination
formats.
same
the
line.
end
of
an
statement
format,
of both statement
7-3
Name
Operation
NAMEI
OPI
NAME2
OP2
Oper and
Comment
s!
......
X I
X I
OPERANDI,
OPERAND2,
X t
X ]
TE
NAME3
OP3
. ,w-4
STATEMENT
OPERANDI,
FORMAT
THIS
IS
i-J
A COMB
X!
OPERAND2,0PERAND3,OPERANX
D4,0PERAND5
INATION
OF
BOTH STATEMENT
FORMATS
MODEL
_X
STATEMENTS
Model
statements
are
the
macro-definition
statements
from
which
the
desired
sequences
of assembler
language
statements
are generated.
Zero or
more model
statements
may follow
the prototype
statement.
A
model
statement
consists
of
one
to four fields.
They are, from left to right,
the
name,
operation,
operand,
and comments
fields.
The
generated
statement
Model
ampersands,
statement
fields
and
blanks
as
Instruction
0perands"
in
must follow
the
macro-instruction
Section
rules
to the
blanks
for paired
operands
fields
in the
to
separate
apostrophes,
(see
"Macro-
8).
Though
model
statements
must
follow
the
normal
continuation
card
conventions,
statements
generated
from model
statements
may have more
than
two
continuation
lines.
Substituted
statements
may not have blanks
in any
field
except between
paired
apostrophes.
They may not have leading
blanks
in the name field.
Name
Field
The
name
field
may be blank
or it may contain
an ordinary
symbol,
a
variable
symbol,
or a sequence
symbol.
It may
also
contain
an
ordinary
symbol
concatenated
with
a
variable
symbol
or
a
variable
symbol
concatenated
with one or more other variable
symbols.
Variable
symbols
may not appear
ICTL,
ISEQ,
or
OPSYN
statements.
substituted
for a variable
symbol.
7-4
in
the
The
name field
characters
of ACTR,
COPY,
END,
* and .* may not be
L_
Operation
Field
The operation
field may contain
a machine
instruction
listed
in Section
5 (except
END,
instruction,
an
ICTL, ISEQ, OPSYN,
assembler
or PRINT),
a macro
instruction,
or variable
symbol.
It may also contain
an
symbol
concatenated
with
a variable
symbol
or
a
variable
concatenated
with one or more other variable
symbols.
Variable
symbols
Macro
Instructions
Macro
prototypes
The
following
be used
to
generate
instructions:
ACTR
AGO
AIF
ANOP
GBLA
GBLB
GBLC
ICTL
MEXIT
MNOTE
OPSYN
PRINT
COPY
CSECT
DSECT
END
I SEQ
LCLA
LCLB
LCLC
MACRO
MEND
REPRO
SETA
SETB
SETC
START
symbols
may also be used outside
of macro-definltions
operation
codes with the preceding
restrictions.
The
use
of
Variable
replaced
Operand
COPY
instructions
symbols
by
their
in
the
is
llne
described
following
under
a REPRO
"COPY
to
generate
Statements".
instruction,
will
not
values.
Field
The
However,
ICTL,
not
Variable
mnemonic
be
may
ordinary
symbol
operand
field may
variable
symbols
ISEQ,
Comments
The
or OPSYN
contain
ordinary
symbols
may
not be used in the
or
variable
operand
field
symbols.
of COPY,
instructions.
Field
comments
substitution
field.
Only
field
may
contain
any
is
performed
for variable
generated
statements
will be
combination
symbols
printed
of
characters.
appearing
in the
in the listing.
No
comments
7-5
SYMBOLIC
PARAMETERS
A symbolic
parameter
is a type of variable
symbol
that
is
assigned
values
by the
programmer
when
he
writes
a macro-instruction.
The
programmer
may vary statements
that are generated
for each occurrence
of
a
macro-instruction
by varying
the values
assigned
to symbolic
parameters.
A
symbolic
parameter
consists
of an ampersand
followed
by
through
seven letters
and/or
digits,
the first of which
must be
a
Elsewhere,
two ampersands
must be used to represent
an ampersand.
The
symbolic
The
programmer
parameter.
following
&READER
&A23456
&X4F2
The
are
not
valid
following
symbolic
are
invalid
(first
(first
as
the
first
characters
is not an ampersand)
after ampersand
is not
a letter)
of
parameters:
parameters:
the
in
The
following
is
an
symbolic
parameters
statement.
in
the
Header
& NAME
& NAME
Symbolic
parameters
the macro-instruction
character,
model
i.e.,
statement
blank,
must
ampersand)
other
appear
than
in
the
that
the
macro-definitlon.
Name
7-6
four
symbolic
character
character
statement
of
&SYS
symbolic
prototype
Prototype
Model
Model
Model
Model
Trailer
use
&LOOP2
&N
&$4
CARDAREA
&256B
&AREA2456
&BCD%34
&IN AREA
Any
should
from one
letter.
example
model
of
a macro-definltion.
statements
appear
Operation
Operand
MACRO
MOVE
ST
L
ST
L
MEND
&TO,&FROM
2,SAVE
2,&FROM
2,&TO
2,SAVE
in model
statements
that correspond
to
are replaced
the symbolic
Note
in
the
prototype
by the characters
parameters.
In the following
the
&TO,
MOVE
macro-instruction
and &FROM,
respectively,
correspond
of the MOVE
Name
Operation
Operand
HERE
MOVE
FIELDA,FIELDB
Any occurrence
of
model
statement
will
FIELDB,
respectively.
source
program,
the
generated:
Operation
Operand
HERE
ST
L
ST
L
2,SAVE
2,FIELDB
2,FIELDA
2,SAVE
The example
below illustrates
another
operands
different
from those in the
Name
Operation
Operand
Macro
LABEL
MOVE
IN,OUT
Generated
Generated
Generated
Generated
LABEL
ST
L
2,SAVE
2,OL_
2,1N
2,SAVE
ST
L
If a symbolic
parameter
statement,
it is not replaced
instruction.
Concatenating
Parameters
Symbolic
FIELDB
of
&NAME,
the symbolic
parameters
&NAME,
&TO, and &FROM
in
a
be
replaced
by
the
characters
HERE, FIELDA,
and
If the preceding
macro-lnstructlon
were
used
in
a
following
assembler
language
statements
would
be
Name
using
and
to the symbolic
parameters
prototype
statement.
appears
by the
Parameters
in
the
comments
field
corresponding
characters
with
Other
Characters
or
instruction
of
a
model
of the macro-
Other
Symbolic
If
a
symbolic
parameter
in a model
statement
is immediately
preceded
or
followed
by
other
characters
or
another
symbolic
parameter,
the
characters
that
correspond
to the symbolic
parameter
are combined
in the
generated
statement
with
the
other
characters
or
the
characters
that
7-7
correspond to the
concatenation.
other
symbolic
parameter.
The macro-definition,
macro-lnstruction,
the following example illustrate
these rules.
Name
This
is
called
Operation Operand
Header
Prototype
Model
Model
Model
Model
Trailer
MACRO
&NAME MOVE
&NAME ST&TY
L&TY
ST&TY
L&TY
MEND
&TY,&P,&TO,&FROM
2,SAVEAREA
2,&P&FROM
2,&P&TO
2,SAVEAREA
Macro
HERE
MOVE
D,FIELD,A,B
STD
LD
STD
LD
2, SAVEAREA
2, FIELDB
2, FI ELDA
i2_,SAVEAREA
Generated HERE
Generated
Generated
Generated
process
The
statements
following
illustrate
Name
Header
macro
these
definition,
rules.
macro-lnstructlon,
Operation
Operand
MACRO
MOVE
ST
L
ST
L
MEND
&P,&S,&RI,&R2
&RI,&S.(&R2)
&RI,&P.B
&RI,&P.A
&RI,&S.(&R2)
Prototype
Model
Model
Model
Model
Trailer
&NAME
&NAME
Macro
HERE
MOVE
FIELD,SAVE,2,4
Generated
Generated
Generated
Generated
HERE
ST
L
ST
L
2, SAVE (4)
2,FIELDB
2,FIELDA
2, SAVE (4)
and
generated
The
symbolic
parameter
&P
is
used
in
the second
and third model
statements
to vary part of the 0perand
field of each of
the
corresponding
generated
statements.
The
characters
FIELD
of
the
macro-lnstruction
correspond
to &P.
Since &P is to be concatenated
with a
letter
(i.e.,
B
and
A)
in each of the statements,
a period
immediately
follows
&P in each
of the model
statements.
The period
does
not
appear
in
the
generated
statements.
Similarly,
symbolic
parameter
&S is used in the first and fourth
model
statements
to
vary
the
operand
fields
of
the corresponding
generated
statements.
&S is followed
by a period
in each of
the
model
statements,
because
it is to be concatenated
with a left parenthesis.
The period
does
not
appear
COMMENTS
in
the
generated
statements.
STATEMENTS
A model
consists
of
statement
may
an
asterisk
be a comments
in the begin
statement.
A
comments
statement
column,
followed
by comments.
The
comments
statement
is used
by
the
assembler
to
generate
an
assembler
language
comments
statement,
just as other model
statements
are used by the
assembler
to
generate
assembler
language
statements.
No variable
symbol
substitution
is performed.
The
programmer
may
also
write
comments
statements
in
a
macrodefinition
which
are
not
to be generated.
These
statements
must have a
period
in the begin
column,
iu,nediately
followed
by
an
asterisk
and
the
comments.
7-9
The first
statement in the following
example will be used by the
assembler to generate a commentsstatement; the second statement will
not.
Name
I 0peration
I Operand
* THIS STATEMENT
WILL BE GENERATED
.*THIS ONEWILLNOTBE GENERATED
NOTE: To get a truly
representative
sampling of the various language
componentsused effectively
in writing macro- instructions
the programmer
may list
all or selected macro-instructions from the SYSI.GENLIBor the
SYSI.MACLIBby using the IEBPTPCHsystem utility
covered in the "OS
Utilities"
manual.
COPY
STATEMENTS
COPY statements
may be used to copy model statements
and MEXIT,
and conditional
assembly
instructions
into a macro-definition,
just
may
be
used
outside
macro-definitions
to copy source
statements
assembler
language
program.
The
format
of
this
statement
MNOTE,
as they
into an
is:
Name
Operation
Operand
Blank
COPY
symbol
The operand
is a symbol
that identifies
a partitioned
data set
member
to
be
copied
from
either
the
system
macro
library
or a user library
concatenated
to it.
The symbol
must not
be
the
same
as
the
operation
mnemonic
of
a definition
in the macro
library.
Any statement
that may be
used in a macro-definition
MEND,
COPY,
and prototype
may be part
statements.
of
the
copied
coding,
except
MACRO,
When
considering
statement
positions
within
a
program
the
code
included
by a COPY instruction
statement
should
be considered
rather
than
the
COPY
itself.
For
example
if a COPY statement
in a macro-deflnition
brings
in global
and local definition
statements,
it may appear
immediately
after
the
must come
prototype
statement.
However,
since global
definition
statements
before
local definition
statements,
if global
and
local
defini-
tion statements
are
contains
the COPY,
also specified
the COPY must
tion
the
7-10
statements
and
explicit
explicitly
in the macro-definition
occur between
the explicit
global
local
definition
statements.
which
defini-
SECTION
The
format
of
a macro-instruction
8:
HOW
Operation
Operand
Any symbol or
blank
Mnemonic
0-200 operands,
separated
by
operation
library.
the
the
code
of
MACRO-INSTRUCTIONS
commas.
WRITE
is:
Name
operation
code
TO
field contains
the
mnemonic
operation
a macro-definition
may
contain
a
symbol.
The
parameter
appears
in the name
appears
in the name field
of
mnemonic
operation
code of the macrocode must be the same as the mnemonic
in
the
source
program
or
in
the
macro
The
macro-definition
with the same mnemonic
operation
code is used by
assembler
to process
the macro-instructlon.
If a
macro-definltion
in
source
program
and
one
in the macro
library
have the same mnemonic
operation
code,
the
macro-definition
in
the
The placement
and order of the operands
determined
by
the
placement
and order of
operand
field of the prototype
statement.
MACRO-INSTRUCTION
source
in
the
program
is
used.
the
macro-lnstructlon
symbolic
parameters
in
OPERANDS
Any combination
of
instruction
operand
apostrophes,
parentheses,
observed.
up to 255
characters
may
be
used
as
a
macroprovided
that
the
following
rules
concerning
equal signs,
ampersands,
commas,
and
blanks
are
Paired
Apostrophes:
An operand
may contain
one or more quoted
strings.
quoted
string
is any sequence
of characters
that begins
and
ends
with
apostrophe
and contains
an even number
of apostrophes.
The
first
quoted
string
starts
with
the
first
operand.
Subsequent
quoted
strings
start with the first
the apostrophe
that ends the previous
quoted
string.
not
A
quoted
immediately
is
the
string
ends
followed
by
apostrophe
apostrophe
apostrophe
A
an
in the
after
that
is
8-1
immediately followed by a
(when L is preceded by any
is not
considered
in
in the following example,
operand.
Paired
Parentheses:
There must be an equal number
of left and right
theses.
The nth left parenthesis
must appear
to the left of the nth
parenright
parenthesis.
Paired
parentheses
are
a
left
parenthesis
and
a following
right
parenthesis
without
any other parentheses
intervening.
If
there
is
more
than
one
pair,
each
additional
pair is determined
by removing
any pairs
already
recognized
and reapplying
the above rule
for
paired
parentheses.
For instance,
in the following
example
the first and fourth,
the second
and
third,
and the fifth and sixth parentheses
are each paired
parentheses.
(A(B) C)D(E)
A
parenthesis
that
considered
in
determining
appears
paired
following
parenthesis
example
the
middle
between
paired
apostrophes
parentheses.
For
instance,
is not
is
in
not
the
considered.
('3'3
Equal ' Signs:
An
operand
or between
examples
illustrate
equal
paired
these
character
in an
The following
rules.
=F'32'
,C=D ,
E(F=G)
Ampersands:
sequence
of
The following
&&123&&&&
8-2
Except
as
noted
under
"Inner
MacroInstructions,"
each
consecutive
ampersands
must be an even number
of ampersands.
example
illustrates
this rule.
Commas:
A comma
between
paired
illustrates
this
indicates
the end of
an
operand,
apostrophes
or paired
parentheses.
rule.
unless
it
The
following
is
placed
example
following
are
valid
SYMBOL
A+2
123
X'I89A'
*
L'NAME
'TEN = i0'
'QUOTE
'COMMA
IS'''
The
following
W' NAME
5A) B
(15 B)
'ONE' IS
'i'
STATEMENT
are
IS
macro-instruction
IS
operands:
)'
,'
invalid
macro-instruction
(oddnumber
of apostrophes)
(number
of left parentheses
does
parentheses)
(blank not placed
between
paired
(blank not placed
between
paired
operands:
not
equal
number
of
right
apostrophes)
apostrophes)
FORMAT
Macro-lnstructions
may be written
using the same alternate
format
that
can be used to write
prototype
statements.
If this format
is used, a blank
does not always
indicate
the end
of
the
operand
field.
The
alternate
format
is
described
in Section
7, under
the subsection
"Macro-lnstruction
Prototype."
Unlike
prototype
statements,
macro-instructions
omitted
operands,
and
they can have consecutive
commas
or a
end
of
the
OMITTED
operand
can
have
comma at the
list.
OPERANDS
If an operand
that appears
in the prototype
statement
is omitted
from
the macro-lnstruction,
then the comma
that would have separated
it from the
next
operand
must
be
present.
If the last operand(s)
is omitted
from a
macro-instruction,
then the co=ma(s)
separating
the
last
operand(s)
from
the
next
previous
operand
may
be omitted.
The
following
example
shows
corresponding
prototype
statement.
a
macro-lnstructlon
The
macro-instruction
preceded
operands
by its
that
8-3
correspond to the third and sixth operands of the prototype statement are
omitted in this example.
Name
Operation
Operand
EXAMPLE
EXAMPLE
&A,&B,&C,&D,&E,&F
17,*+4,,AREA,FIELD(6)
Operation
MVC
MVC
OPERAND
A
THERE&C.
25,THIS
THERE25,
THIS
SUBLISTS
subllst
may
occur
as
the
operand
of a macro-instructlon.
Sublists
provide
the programmer
with
collection
of
macro-instructlon
operands
operand
in a collection
of operands.
a convenient
as a single
way to
operand,
refer
to
a
or a single
A sublist
consists
of one or more operands
separated
by
commas
enclosed
in
paired
parentheses.
The
entire
subllst,
including
parentheses,
is considered
to be one macro-lnstructlon
operand.
If
a macro-lnstruction
is written
each operand
of
the sublist
instruction
may be written
on
in
the
may be written
as many lines
alternate
on a separate
as necessary.
statement
line;
and
the
format,
the macro-
If &PI is a symbolic
parameter
in
a
prototype
statement,
and
the
corresponding
operand
of a macro-instructlon
is a subllst,
then &Pl(n)
may
be used in a model statement
to refer
to the nth operand
of
the
sublist,
where
n may have a value greater
than or equal
to i.
n may be specified
as
a
decimal
integer
or
any
arithmetic
expression
allowed
in
a
SETA
instruction.
(The SETA instruction
is described
in Section
9.)
If the nth
operand
is omitted,
then $Pl(n) would
refer
to a null character
value.
8-4
If the sublist notation is used but the operand is not a sublist, then
&PI(1)
refers
to
the
operand
and
&PI(2),
&PI(3),...
refer
to a null
character
value.
If an operand
has the form
(
),
it
is
treated
as
a
character
string
and not as a sublist.
For
example,
consider
the
instruction,
and generated
statements.
Name
Header
Macro
Generated
ADD
L
A
A
ST
Generated
Generated
Generated
The
parameter
referred
macro-
&NUM,®,&AREA
®,&NIYM(1)
®,&NUM(2)
®,&NUM(3)
®,&AREA
(A,B,C),6,SUM
6,A
6,B
6,C
6,SUM
replaces
&NUM(1)
Note:
When
referring
to an operand
the sublist
notation
must immediately
symbolic
the left
-definition,
operand
of the
macro-instruction
that
corresponds
to
symbolic
&NUM
is
a
sublist.
One
of
the
operands
in the sublist
is
to in the operand
field of three of
the
model
statements.
For
example,
&NUM(1)
refers
to
to symbolic
parameter
&NUM.
Therefore,
macro
OperationiOperand
_CRO
ADD
L
A
A
ST
Prototype
Model
Model
Model
Model
Trailer
following
parameter,
parenthesis
part
of
the
in a sublist,
follow
the
e.g., &NUM(1).
A period
and the last character
of
sublist
corresponding
the
sublist
is
A.
generated
the
last
statement.
left parenthesis
character
of
of
the
should
not be placed
between
the symbolic
parameter.
A period
may be used
between
these
two
characters
only
when
the
programmer
wants
to
concatenate
the left parenthesis
with the characters
that the symbolic
parameter
represents.
The following
example
shows
what
would
be
generated
if a period
appeared
between
the left parenthesis
and
the last character
of the symbolic
parameter
in the first
model
statement
of the above example.
8-5
Name
Operation]
Operand
ADD
L
&NUM,®,&AREA
®,&NUM.(1)
Macro
ADD
(A,B,C)
Generated
6,(A,B,C)(1)
Prototype
Model
The
statement.
symbolic
parameter
&NUM is used
The characters
(A,B,C)
of the
,6, SUM
in the operand
macro-lnstruction
&NUM.
Since &NUM is immediately
followed
by a period,
&NUM and
are replaced
by (A,B,C).
The period
does
not
appear
in
the
statement.
The
resulting
generated
statement
is
an invalid
language
statement.
INNER
MACRO
the period
generated
assembler
INSTRUCTIONS
A macro-lnstructlon
may be used as
a
model
statement
in
a
macrodefinition.
Macro
instructions
used as model
statements
are called
inner
macro
instructions.
to as
A macro-lnstruction
that is not
an outer macro-instructlon.
used
as
a model
statement
is
referred
The
rule
for
inner macro-instruction
parameters
is the same as that
for outer macro-lnstructions.
Any symbolic
parameters
used
in
an
inner
macro-lnstruction
are replaced
by the corresponding
characters
of the outer
macro-lnstructlon.
An operand
of an outer macro-lnstructlon
sublist
cannot
be passed
as a subllst
to an inner macro-instructlon.
used
The
macro-deflnltlon
corresponding
to an
to generate
the statements
that replace
the
&T.
The
The
inner
macro-instruction
characters
(X,Y,Z)
and
the previous
example.
inner
inner
example
contains
two symbolic
J of the macro-lnstruction
macro-instruction
macro-lnstructlon.
is used
as an
parameters,
correspond
the
is
inner
&S and
to &S
symbolic
The
assembler
then uses the macro-definltlon
that corresponds
to the
inner macro-lnstructlon
to generate
statements
to replace
the inner
macroinstruction.
The
fourth
through
seventh
generatedstatements
have been
generated
for the inner macro-lnstructlon.
8-6
Name
Header
Prototype
Model
Model
Model
Inner
Model
Trailer
Operation Operand
MACRO
COMP
SR
C
BNE
ADD
A
MEND
&U
K
Macro
&RI,&R2,&S,&T,&U
&RI,&R2
&RI,&T
&U
&S,12,&T
&RI,&T
10,11,(X,Y,Z),J,K
Generated
Generated
Generated
Generated
Generated
Generated
Generated
Generated K
SR
C
BNE
L
A
A
ST
A
i0,ii
10,J
K
12,X
12,Y
12,Z
12,J
10,J
OF
A
MACRO-INSTRUCTIONS
macro-definition
that
corresponds
to
an
outer
macro-instruction
may
contain
any
number
of
inner
macro-lnstructions.
The
outer
macroinstruction
is
called
a first level macro-instruction.
Each of the inner
macro-instructions
is called
a second
level macro-lnstruction.
The
macro-definltion
instruction
may
macro-instructions
The
upon
the
available.
number
that
corresponds
to
second
level
macro-
contain
any
number
of inner macro-instructions.
are called
third level macro
instructions,
etc.
of
levels
complexity
of
of
macro-instructions
the
macro-definition
that
and
may
the
be
These
used
amount
depends
of
storage
8-718-8
SECTION
9:
HOW
TO
WRITE
CONDITIONAL
ASSEMBLY
INSTRUCTIONS
The conditional
assembly
instructions
allow
the
programmer
to:
(i)
define
and
assign
values
to SET symbols
that can be used to vary parts
of
generated
statements,
and (2) vary the sequence
of
generated
statements.
Thus,
the programmer
can use these instructions
to generate
sequences
of statements
from the same macro-deflnition.
There are 13
conditional
assembly
instructions,
described
in
this
section.
The
other
three
instructions
-- GBLA,
GBLB, and GBLC -- are described
instructions
described
in this section
are:
LCLA
LCLB
LCLC
SETA
SETB
SETC
Where
its
use
the
within
subsequent
because
operand
The
of
which
are
assembly
i0.
The
of the conditional
assembly
instructions
is
all of them may be used
in
an
assembler
an
instruction
macro-definitions,
outside
the
macro-definitions
difference
is
in macrolanguage
differs
described
from
in
the
text
The LCLA,
initial
values
The
arithmetic,
The
SETB
use
i0
of
conditional
in Section
different
ANOP
AIF
AGO
ACTR
The
primary
use
definitions.
However,
source
program.
many
SETA,
SETB,
binary,
and
instruction
instructions
may
be
AGO,
to define
and
assign
and
SETC
instructions
may
be
used
to
assign
character
values,
respectively,
to
SET
symbols.
is
described
after
the SETA and SETC instructions,
the operand
field of the SETB instruction
fields
of the SETA and SETC instructions.
AIF,
used
and
ANOP
instructions
may
is a combination
be
used
of
in conjunction
the
with
sequence
symbols
to vary the sequence
in which
statements
are processed
by
the
assembler.
The
programmer
can
test
attributes
assigned
by
the
assembler
to symbols
or
macro-instructlon
operands
to
determine
which
statements
are
to be processed.
The ACTR instruction
may be used to vary
the maximum
number
of AIF and AGO branches.
Examples
illustrating
the use of conditional
assembly
instruction
included
throughout
this
section.
A chart summarizing
the elements
can be used in each instruction
appears
at the end of this section.
are
that
9-1
SET
SYMBOLS
SET
symbols
are
one
type
of variable
symbol.
The
symbolic
parameters
discussed
in
Section
7 are another
type of variable
symbol.
SET
differ
from symbolic
parameters
in three ways:
(i)
where
they can
in an assembler
language
source
program,
(2) how they are assigned
and (3) whether
or not the values
assigned
to them can be changed.
Symbolic
parameters
can only be used in macro-deflnltions,
symbols
can be used inside
and outside
macro-definitions.
symbols
be used
values,
whereas
SET
Symbolic
parameters
are assigned
values
when
the programmer
writes
a
macro-instruction,
whereas,
SET
symbols
are
assigned
values
when
the
programmer
writes
SETA, SETB, and SETC conditional
assembly
instructions.
macrosymbol
Each symbolic
parameter
is assigned
a single
value
for one
use
of
a
definition,
whereas
the values
assigned
to each SETA, SETB, and SETC
can change during
one use of a macro-definltlon.
Defining
SET
Symbols
SET symbols
must be defined
by the programmer
before
they
are
used.
When
a SET symbol
is defined
it is assigned
an initial
value.
SET symbols
may
be
assigned
new
values
by
means
of
the
SETA,
SETB,
and
SETC
instructions.
A SET symbol
is defined
when it appears
in the operand
field
of an LCLA, LCLB, or LCLC instruction.
Using
Variable
The
assigned
appears
current
replaces
SETA,
Symbols
SETB,
and
SETC
instructions
may
be
used
to change
the
values
For example,
if &A is a
symbolic
parameter,
and
the
corresponding
characters
of the macro-instructlon
are the symbol
HERE,
then HERE replaces
each
occurrence
of
&A
in the macro-deflnltlon.
However,
if &A is a SET
symbol,
the value assigned
to &A can be changed,
and a different
value
can
replace
each occurrence
of &A in the macro-deflnltlon.
as
The
a SET
The
9-2
same
symbol
variable
symbol
may not be
in the same macro-deflnltion.
following
illustrates
this
rule.
used
as
symbolic
parameter
and
Name
Operation
Operand
&NAME
MOVE
&TO,&FROM
it
can be
used
All
variable
symbols
same
way
that
symbolic
characters.
The
rules
characters
are in Section
as
a SET
symbol
outside
macro-definltions.
may be concatenated
with other characters
in the
parameters
may
be
concatenated
with
other
for
concatenating
symbolic
parameters
with other
7 under the subsection
"Symbolic
Parameters."
Variable
symbols
in macro-instructions
are
replaced
by
the
values
assigned
to
them,
immediately
prior
to
the
start
of
processing
the
definition.
If a SET symbol
is used in
the
operand
field
of
a
macroinstruction,
and the value assigned
to the SET symbol
is equivalent
to the
sublist
notation,
the operand
is not considered
a sublist.
ATTRIBUTES
The assembler
assigns
attributes
to macro-instruction
symbols
in
the
program.
These
attributes
may
be
conditional
assembly
instructions
or expressions.
There are six kinds of attributes.
They
integer,
count,
and
number.
Each kind of
paragraphs
that follow.
operands
referred
to
and
only
to
in
are:
type, length,
scaling,
attribute
is discussed
in the
9-3
Attribute
Notation
Type
Length
Scaling
are:
L'
S'
I'
K'
N'
Integer
Count
Number
The
.
programmer
may
refer
to an
attribute
in
the
following
ways:
In a statement
that is outside
macro-definitions,
he
may
write
the
notation
for the attribute
immediately
followed
by a symbol.
(e.g., T'NAME
refers
to the type attribute
of the
symbol
NAME.)
In a statement
that is in a macro-definltion,
he
may
write
the
notation
for
the
attribute
immediately
followed
by a symbolic
parameter.
(e.g., L'&NAME
refers
to the length
attribute
of
the
characters
in
the macro-instructlon
that correspond
to symbolic
parameter
&NAME;
L'&NAME(2)
refers
to the length
attribute
of the
second operand
in
parameter
&NAME.)
9-4
The notations
the
sublist
that
corresponds
to
symbolic
Type
Attribute
The
letter.
type
(T')
attribute
of
The following
letters
statements
and
for outer
name DC or DS statements.
a macro-instruction
are
used
for
macro-instruction
operand,
A-type
address
constant,
Binary
constant.
Character
constant.
Q
R
S
V
X
Y
Z
Q-type
address
constant,
A-, S-, Q-, V-, or Y-type
S-type
address
constant,
V-type
address
constant,
Hexadecimal
constant.
implied
length,
aligned.
address
constant,
explicit
implied
length,
aligned.
implied
length,
aligned.
Y-type
address
Zoned decimal
implied
or DS statements,
statement.
aligned,
(also
DC
and
DS
symbols
that
in
CXD
statement).
constant,
constant.
letters
that
or
that
length,
are
used
are symbols)
appear
in
length.
aligned.
for
that
symbols
(and
name statements
the
operand
field
outer
other
of
an
macrothan DC
EXTRN
Machine
instruction
Control
section
name
Macro-instruction
EXTRN
symbol
CCW instruction
WXTRN
The
operands
N
O
length,
is
Long floating-point
constant,
implied
length,
aligned.
Short floating-point
constant,
implied
length,
aligned.
Full-word
fixed-polnt
constant,
implied
length,
aligned.
Fixed-point
constant,
explicit
length.
Half-word
fixed-point
constant,
implied
length,
aligned.
Floating-point
constant,
explicit
length.
Extended
floating-point
constant,
implied
length,
aligned.
Packed
decimal
constant
The
following
instruction
operands
J
M
T
W
a symbol
symbols
that
name
operands
that are
A
B
C
D
E
F
G
H
K
L
P
implied
or
symbol
following
only.
letters
are used
for
inner
and
outer
macro-instruction
Self-defining
term
Omitted
operand
The following
letter
is used for
inner
and
outer
macro-instruction
operands
that
cannot
be assigned
any of the above
letters.
This includes
inner macro-instruction
operands
that are symbols.
This
letter
is
also
assigned
to
symbols
that
name
EQU and LTORG
statements,
to any symbols
occurring
more than once in the name field of source
statements,
and to all
symbols
naming
statements
with expressions
as modifiers.
9-5
Undefined
The attributes
example:
of A, B,
C and D are
in
undefined
Name
Operation
Operand
A
B
C
D
DC
DC
DC
DC
3FL(AA-BB)'75'
(AA-BB)F'I5'
&X'l'
FL(3-2)'I'
the
following
(L')_
The
operands,
Scaling
(S')_
length,
scaling,
and symbols
are
and
Integer
and
numeric
(I')
integer
values.
Attributes
attributes
of
macro-instructlon
The
length
attribute
of a symbol
(or of a macro-instruction
operand
that is a symbol)
is as described
in Part I of this publication.
The
use
of
the
length
attribute
of a symbol
defined
with a DC or DS with explicit
length
given
by
an
expression
is
invalid.
Reference
to
the
length
attribute
of a variable
symbol
is illegal
except
for symbolic
parameters
in
SETA,
SETB
and
AIF statements.
If the basic L' attribute
is desired,
it
may be obtained
as follows:
&A
&B
After
SETC
SETC
'Z'
'L'''
MVC
&A.(&B&A),X
generation,
MVC
would
Z(L'Z)
Conditional
attributes
of
are the letters
Scaling
flxed-polnt,
this
result
,X
assembly
instructions
symbols
or macro-lnstructlon
M, N, O, T, U, W, or $.
and integer
attributes
are
floatlng-polnt,
and decimal
Fixedand
FloatlnK-Point:
floatlng-polnt
number
is the
attribute
9-6
is
in
a function
of
The
value
the
scale
must
not
operands
provided
fields.
scaling
given by
and
for
attribute
the scale
length
refer
whose
to
the
length
type attributes
symbols
that
name
of a fixed-polnt
or
modifier.
The integer
attributes
of
the
number.
Decimal:
The
scaling
attribute
of
a
decimal
number
is the number
of
decimal
digits
to the right of the decimal
point.
The integer
attribute
of
a decimal
number
is the number
of decimal
digits
to the left of the assumed
decimal
point after the number
is assembled.
Scaling
and integer
attributes
are available
for
.symbols
and
instruction
operands
only if their type attributes
are H, F, and G
point);
D, E, L, and K (floating
point);
or P and Z (decimal).
The
attributes
relations
Count
programmer
may
refer
to
the
length,
scaling,
in
the
operand
field of a SETA instruction,
or
in the operand
fields of SETB or AIF instructions.
Attribute
The
operands
macro(fixed-
and
integer
in arithmetic
(K')
programmer
only.
may
refer
to the
count
attribute
of
macro-instructlon
The
value
of the count attribute
is equal to the
in the macro-instruction
operand.
It
includes
all
operand,
but
does not include
the delimiting
commas.
number
of characters
characters
in
the
The count attribute
of an omitted
operand
following
examples:
illustrated
is
zero.
Count
Operand
ALPHA
These
rules
are
the
Attribute
5
(JUNE, JULY,
2(10,12)
A(2)
'A' 'B'
' '
''
If
AUGUST)
18
8
4
6
3
2
macro-lnstructlon
operand
contains
variable
characters
that replace
the variable
symbols,
rather
symbols,
are used to determine
the count attribute.
The
programmer
may
of a SETA instruction,
or
SETB and AIF instructions
Number
by
Attribute
The
operands
programmer
only.
than
symbols,
the
the
variable
(N')
may
refer
to the
number
attribute
of
macro-instruction
The number
attribute
is a value
equal
to the number
of operands
in an
operand
sublist.
The number
of operands
in an operand
sublist
is equal
to
one
plus
the
number
of commas
that indicate
the end of an operand
in the
sublist.
9-7
The following
(A,B,C,D,E)
(A,,C,D,E)
(A,B,C,D)
(,B,C,D,E)
(A,B,C,D,)
(A,B,C,D,,)
5
5
4
5
5
6
examples illustrate
this rule.
operands
operands
operands
operands
operands
operands
If the macro-lnstructlon
operand is not a subllst,
the number
attribute
is one. If the macro-lnstructlon operand is omitted, the number
attribute is zero.
The programmermay refer to the number attribute in the operand field
of a SETAinstruction, or in arithmetic relations in the operand fields of
SETBand AIF instructions that are part of a macro-definition.
Assigning
Attributes
The
attributes.
integer
Fixed
eight
minus
to Symbols
attribute
is
computed
Point:
The
integer
attribute
times the length
attribute
of the
one; i.e.,
I'=8*L'-S'-I.
Each
of
the
length
attribute
of
integer
attribute
attribute
is 8, and
from
the
length
of a flxed-point
number
minus
the
following
statements
HALFCON
is
is 9.
The
the integer
2, the
scaling
attribute
length
attribute
of ONECON
attribute
is 23.
defines
Name
Operation
Operand
HALFCON
DC
HS6'-25.93'
ONECON
DC
FS8'I00.3E-2'
and
number
scaling
fixed-point
scaling
is equal
to
attribute
field.
The
is
6,
and
the
is 4, the scaling
Floating
Point:
The integer
attribute
of a
Type
D
or
E
floatlng-point
number
is equal to two times the difference
between
the length
attribute
of
the number
and one, minus
the scaling
attribute;
i.e., 1'=2"
(L'-I)-S'
Because
of
its
low
order
characteristic,
the
Type L constant
with a length
greater
than 8 bytes
is
value
indicated
in
the formula
above.
The integer
constant
with a length
of 8
bytes
or
less
is
the
indicated
in the formula
above.
Each
length
9-8
of
the
attribute
following
of
SHORT
statements
is
4,
the
defines
scaling
integer
attribute
floating-point
attribute
of
two
less
than
the
attribute
of a Type L
same
as
the
value
is
2,
and
field.
the
The
integer
SHORT
Name
LONG
Decimal:
times
one;
The
Operation
Operand
DC
DC
ES2'46.415'
DS5'-3.729'
integer
attribute
the length
attribute
i.e.,
I'=2*L'-S'-I.
is equal
to the difference
attribute;
i.e., I'=L'-S'.
of
a packed
decimal
scaling
number
is
attribute
equal
to
of the number
minus
the scaling
attribute
The integer
attribute
of a zoned decimal
between
the
length
attribute
and
the
two
minus
number
scaling
Each
of the following
statements
defines
a decimal
field.
The length
attribute
of FIRST is 2, the
scaling
attribute
is
2,
and
the
integer
attribute
is i.
The length
attribute
of SECOND
is 3, the scaling
attribute
is
0, and the integer
attribute
is 3.
The length
attribute
of THIRD is 4,
the scaling
attribute
is 2, and the integer
attribute
is
2.
The
length
attribute
of
FOURTH
is
3,
the
scaling
attribute
is 2, and the integer
attribute
is 3.
Name
Operation
Operand
FIRST
SECOND
THIRD
DC
DC
DC
DC
P'+1.25'
Z'-543'
FOURTH
SEQUENCE
Z'79.68'
p'79.68'
SYMBOLS
symbol
is
used
statement
is considered
in
the
named by
to be
symbol.
Sequence
the
sequence
in
operand
field of an AIF
the sequence
symbol.
local
to
or
AGO
a macro-definltion.
A sequence
symbol
may be used in the name field of any statement
that
does
not
contain
a
symbol
or SET symbol
except
a prototype
statement,
a
MACRO,
LCLA, LCLB, LCLC, GBLA,
GBLB,
GBLC,
ACTR,
ICTL,
ISEQ,
or
COPY
instruction.
9-9
.READER .A23456
.LOOP2 .X4F2
.N
.$4
The following
are invalid
sequence symbols:
example illustrates
Operation
this rule.
Operand
MACRO
&NAME MOVE
&NAME ST
L
ST
L
MEND
&TO,&FROM
2,SAVEAREA
2,&FROM
2,&TO
2,SAVEAREA
.SYM
MOVE
FIELDA,FIELDB
ST
L
ST
L
2,SAVEAREA
2,FIELDB
2,FIELDA
2,SAVEAREA
In the
corresponds
.SYM, and,
contain
an
9-10
macro - instruction
(statement
3)
to
the
symbolic
parameter
&NAME.
therefore,
the
generated
statement
entry in the name field.
the
name field
of
the
model
statement
(statement
a
sequence
symbol
(.SYM)
&NAME is not replaced
(statement
4)
does
by
not
LCLA_
LCLB t LCLC
The
format
-- DEFINE
of
these
LOCAL
SET
SYMBOLS
instructions
is:
Name
Operation
Operand
Blank
LCLA,
LCLB,
LCLC
One
or
or more
variable
symbols,
that
to be used as
are
SET
symbols,
separated
by co-.-as
The
LCLA,
LCLB,
and LCLC instructions
are used to define
and assign
initial
values
to SETA, SETB, and SETC symbols,
respectively.
The
SETA,
SETB,
and
SETC
symbols
are assigned
the initial
values
of 0, 0, and null
character
value,
respectively.
The
characters
programmer
are &SYS.
should
not
define
any
SET
symbol
whose
first
four
the
SETA
program.
-The
SETA
SET
ARITHMETIC
SETA
symbol.
instruction
The
format
may
of
be used
this
to
Name
Operation
Operand
A SETA
SETA
An
symbol
assign
instruction
an
arithmetic
value
to
is:
arithmetic
expression
The
expression
in
the operand
field is evaluated
as a signed
32-bit
arithmetic
value which
is assigned
to the SETA symbol
in
the
name
field.
The
minimum
and
maximum
allowable
values
of the expression
are -231 and
4231-i,
The
respectively.
expression
terms.
The terms
are
self-defining
may
consist
that may
terms,
of one
term
or
be used alone or in
variable
symbols,
an
arithmetic
combination
and
the
combination
of
with each
other
length,
scaling,
9-11
integer,
in Part
Note:
value
digits
Self-defining
terms
are
A
SETC variable
symbol
may appear
in a SETA expression
of the SETC variable
is one to eight
decimal
digits.
will be converted
to a positive
arithmetic
value.
The
arithmetic
operators
expression
are + (addition),
(division).
An
expression
succession,
nor may
The
following
&AREA+X'2D'
&BETA*I0
L'&HERE+32
The
used
*
may
not
contain
two
it begin with an operator.
are
valid
operand
fields
to combine
the terms of
(multiplication),
and
terms
of
only if the
The
decimal
SETA
or
two
operators
an
/
in
instructions:
I'&N/25
&EXIT-S'&ENTRY+I
29
following
&AREAX'C'
&FIELD+-&DELTA*2
*+32
NAME/15
Evaluation
that may be
(subtraction),
described
are
invalid
operand
fields
of
SETA
instructions:
an operator;
two
a valid
term)
operators
in
succession)
Expressions
The procedure
used
to
evaluate
the
arithmetic
expression
in
the
operand
field
of
a SETA instruction
is the same as that used to evaluate
arithmetic
expressions
in
assembler
language
statements.
The
only
difference
between
the
two
types of arithmetic
expressions
is the terms
that are allowed
in each expression.
The
i.
Each
following
term
is
evaluation
given
its
procedure
numerical
The arithmetic
operations
However,
multiplication
and subtraction.
The computed
name field.
result
is
is
used:
value.
are performed
and/or
division
the
value
assigned
moving
from
are performed
to
the
SETA
left
to
right.
before
addition
symbol
in
the
The
arithmetic
expression
in the operand
field of a SETA instruction
may contain
one or more sequences
of arithmetically
combined
terms that are
enclosed
in parentheses.
A sequence
of
parenthesized
terms
may
appear
9-12
within
another
allowed
and
parenthesized
an
expression
sequence.
may
not
Parentheses
required
for
sublist
subscript
notation
count
toward
this
The
following
contain
parenthesized
are
examples
sequences
of
notation,
limit.
of SETA
terms.
substring
instruction
notation,
operand
fields
and
that
(L'&HERE+32)*29
&AREA+X'2D'/(&EXIT-S'&ENTRY+I)
&BETA*IO*(I'&N/25/(&EXIT-S'&ENTRY+I))
The parenthesized
portion
or portions
of
evaluated
before
the rest of the terms
in the
a
sequence
of
parenthesized
terms
appears
sequence,
the innermost
sequence
is evaluated
Usin_
SETA
Symbols
The arithmetic
SETA
symbol
when
symbol
is not used
converted
is zero,
The
value
assigned
to a SETA symbol
is substituted
for
the
it
is
used
in an arithmetic
expression.
If the SETA
in an arithmetic
expression,
the
arithmetic
value
is
to an unsigned
it is converted
following
Name
&NAME
&A
&B
&C
&D
&NAME
an arithmetic
expression
are
expression
are evaluated.
If
within
another
parenthesized
first.
example
integer,
with leading
to a single
zero.
illustrates
Operation
MACRO
MOVE
LCLA
SETA
SETA
SETA
SETA
ST
L
ST
L
MEND
this
zeros
removed.
If
the
value
rule:
Operand
&TO,&FROM
&A,&B,&C,&D
i0
12
&A-&B
&A+&C
2,SAVEAREA
2,&FROM&C
2,&TO&D
2,SAVEAREA
HERE
MOVE
FIELDA,
FIELDB
HERE
ST
L
ST
L
2,SAVEAREA
2,FIELDB2
2,FIELDA8
2,SAVEAREA
9-13
Statements i and 2 assign to the SETAsymbols &A and &B the arithmetic
values +i0 and +12, respectively.
Therefore, statement 3 assigns the SETA
symbol &C the arithmetic value -2. When&C is used in Statement 5, the
arithmetic
value -2 is converted to the unsigned integer 2. When&C is
used in statement 4, however, the arithmetic value -2 is used.
Therefore,
&D is assigned the arithmetic value +8. When&D is used in statement 6,
the arithmetic value +8 is converted to the unsigned integer 8.
The following example shows how the value assigned to
may be changedin a macro-definition.
Name
2
3
4
Operation
a SETA symbol
Operand
MACRO
&NAME MOVE
LCLA
&A
SETA
&NAME ST
L
&A
SETA
ST
L
MEND
&TO,&FROM
&A
5
2,SAVEAREA
2,&FROM&A
8
2,&TO&A
2,SAVEAREA
HERE
MOVE
FIELDA,FIELDB
HERE
ST
L
ST
L
2,SAVEAREA
2,FIELDB5
2,FIELDA8
2,SAVEAREA
SETA
Name
Operation
&LAST
MACRO
ADDX
LCLA
SETA
L
A
ST
MEND
Operand
&NUMBER, ®
&LAST
N '&NUMBER
®, &NUMBER (i)
®, &NIRdBER (&LAST)
®, &NUMBER(l)
ADDX
(A,B,C,D,E),3
L
A
ST
3,A
3,E
3,A
&NUMBER
is
the
first symbolic
parameter
in the operand
field of the
prototype
statement
(statement
i).
The
corresponding
characters,
(A,B,C,D,E),
of
the
macro-instructlon
(statement
4)
are
a subllst.
Statement
2 assigns
to &LAST the arithmetic
value +5, which
is equal to the
number
of
operands
in
the
subllst.
Therefore,
in
statement
3,
&NUMBER(&LAST)
is replaced
by the fifth operand
of the subllst.
SETC
--
The
symbol.
SET
CHARACTER
SETC
instruction
The format
of this
is
used to assign
instruction
is:
a character
Name
Operation
Operand
SETC
ONE operand,
of
the form described
below
SETC
symbol
value
to a SETC
The operand
field may consist
of
the
type
attribute,
a
character
expression,
a substring
notation,
or a concatenation
of substring
notations
and
character
expressions.
A SETA symbol
may appear
in the operand
of a
SETC statement.
The result
is the character
representation
of the
decimal
value,
unsigned,
with
leading
zeros removed.
If the value
is zero,
one
decimal
zero is used.
9-15
Type
Attribute
The character
value
assigned
to a SETC symbol
may be a type attribute.
If the type attribute
is used,
it must appear
alone in the
operand
field.
The
following
example
assigns
to the SETC symbol
&TYPE the letter
that is
the type attribute
of the macro-instruction
operand
that corresponds
to the
symbolic
parameter
&ABC.
Name
Operation
Operand
&TYPE
SETC
T'&ABC
Character
Expression
A character
expression
consists
characters
enclosed
in apostrophes.
of
any
combination
of
(up
to
The
first
eight
characters
in
a
character
value
enclosed
apostrophes
in the operand
field are assigned
to the
SETC
symbol
in
name
field.
The
maximum
size character
value
that can be assigned
SETC
symbol
Evaluation
character
is
eight
255)
in
the
to a
characters.
of Character
value AB%4 to
Expressions:
The following
the SETC symbol
&ALPHA:
Name
Operation
Operand
&ALPHA
SETC
'AB%4'
statement
assigns
the
More
than
one character
expression
may be concatenated
into a single
character
expression
by placing
a period
between
the terminating
apostrophe
of one
character
expression
and
the
opening
apostrophe
of
the
next
character
expression.
For example,
either
of the following
statements
may
be used to assign
the character
value ABCDEF
to the SETC symbol
&BETA.
Name
Operation
Operand
&BETA
&BETA
SETC
SETC
'ABCDEF'
'ABC'.'DEF'
of
Two apostrophes
must
a character
expression.
9-16
be
used
to
represent
an
apostrophe
that
is
part
The following
SETC
symbol
statement
assigns
the
character
value
L'SYMBOL
to
the
&LENGTH.
Name
Operation
Operand
&LENGTH
SETC
'L''SYMBOL'
Variable
symbols
may
operand
field
of
a
concatenating
symbolic
be
concatenated
with
other
characters
in
the
SETC
instruction
according
to the general
rules
for
parameters
with other characters
(see Section
7).
If &ALPHA
has been assigned
statement
may be used to assign
symbol
&GAMMA.
the character
the character
Name
Operation
Operand
&GAMMA
SETC
'&ALPHA.RST'
value
AB%4,
value AB%4RST
the
following
to the variable
Two ampersands
must be used to represent
an ampersand
that is not part
of
a
variable
symbol.
Both ampersands
become
part of the character
value
assigned
to the SETC symbol.
They are not replaced
by a single
ampersand.
symbol
The following
&AND.
statement
assigns
the
character
Name
Operation
Operand
&AND
SETC
'HALF&&'
Substring
HALF&&
to
the
SETC
Notation
The
character
value
character
value.
Substring
assign
part of a character
If
symbol,
value
the programmer
he must indicate
assigned
to
a
SETC symbol
may
character
values
permit
the
value to a SETC symbol.
wants
to assign
part
to the assembler
in
be a substring
programmer
to
of a character
value to a SETC
the operand
field
of
a
SETC
instruction:
(i)
the
character
value
itself,
and
(2)
the part of the
character
value he wants
to assign
to the SETC symbol.
The combination
of
(i)
and
(2)
in
the
operand
field
of
a
SETC instruction
is called
a
substring
notation.
symbol
in the name
The
field
character
is called
value
that
a substring
is
assigned
to
character
value.
the
SETC
9-17
are valid
substring notations:
'&ALPHA'(2,5)
'AB%4'(&AREA+2,1)
'&ALPHA.RST'(6,&A)
'ABC&GAMMA'(&A,&AREA+2)
The following
are invalid
substring notations:
'&BETA' (4,6)
(blanks between character value and arithmetic expressions)
'L''SYMBOL'(142-&XYZ)
(only one arithmetic expression)
'AB%4&ALPHA'
(8 &FIELD*2)
(arithmetic expressions not separated by a comma)
'BETA'4,6
(arithmetic expressions not enclosed in parentheses)
Using
SETC
Symbols
The
character
SETC symbol
when it
statement.
value
assigned
is used in the
to a SETC symbol
is substituted
for the
name, operation,
or operand
field
of
a
For
example,
consider
the
instruction,
and generated
statements.
9-18
following
macro-definition,
macro-
Name
&NAME
i
&PREFIX
&NAME
2
3
Operation
Operand
MACRO
MOVE
LCLC
SETC
ST
&TO,&FROM
&PREFIX
'FIELD'
HERE
MOVE
A,B
HERE
ST
L
ST
L
2,SAVEAREA
2,FIELDB
2,FIELDA
2,SAVEAREA
Statement
i assigns
&PREFIX
In statements
may
the character
value
FIELD
2 and 3, &PREFIX
is replaced
The
following
example
shows
be changed
in a macro-definition.
Name
&NAME
&PREFIX
&NAME
2
3
4
2,SAVEAREA
2,&PREFIX&FROM
2,&PREFIX&TO
2,SAVEAREA
L
ST
L
MEND
&PREFIX
Operation
MACRO
MOVE
LCLC
SETC
ST
L
SETC
ST
L
MEND
how
the
value
to
the
by FIELD.
assigned
to
SETC
symbol
a SETC
symbol
Operand
&TO,&FROM
&PREFIX
'FIELD'
2,SAVEAREA
2,&PREFIX&FROM
'AREA'
2,&PREFIX&TO
2,SAVEAREA
HERE
MOVE
A,B
HERE
ST
L
ST
L
2, SAVEAREA
2 ,FIELDB
2, AREAA
2, SAVEAREA
9-19
Statement
I assigns
the character
value
FIELD
to
the
SETC
symbol
&PREFIX.
Therefore,
&PREFIX
is
replaced
by
FIELD
in
statement
2.
Statement
3 assigns
the
character
value
AREA
to
&PREFIX.
Therefore,
&PREFIX
is replaced
by AREA,
instead
of FIELD,
in statement
4.
the
The
following
example
operand
field of a SETC
Name
&NAME
&PREFIX
&NAME
illustrates
instruction.
Operation
the
use
of
a substring
MACRO
MOVE
LCLC
SETC
ST
L
ST
L
MEND
&TO,&FROM
&PREFIX
'&TO'(I,5)
2,SAVEAREA
2,&PREFIX&FROM
2,&TO
2,SAVEAREA
MOVE
FIELDA,B
HERE
ST
L
ST
L
2,SAVEAREA
2,FIELDB
2,FIELDA
2,SAVEAREA
Statement
i assigns
the substring
character
value
five characters
corresponding
to symbolic
parameter
&TO)
&PREFIX.
Therefore,
FIELD replaces
&PREFIX
in statement
of
as
Operand
HERE
Note:
An
operand
macro-instruction.
notation
SETC
symbol
cannot
be
passed
FIELD
to the
2.
as
(the
SETC
first
symbol
sublist
to
Concatentating
Substring
Notations
and
Character
Expressions:
Substring
notations
may
be
concatenated
with
character
expressions
in the operand
field
of a SETC instruction.
If a substring
notation
follows
a
character
expression,
the
two
may
be concatenated
by placing
a period
between
the
terminating
apostrophe
of
the
character
expression
and
the
opening
apostrophe
of the substring
notation.
For example,
&BETA
has
been
statement
assigns
9-20
if &ALPHA
has been assigned
the character
value
assigned
the
character
value ABCDEF,
then the
&GAMMA
the character
value AB%4BCD.
AB%4,
and
following
Name
Operation
Operand
&GAMMA
SETC
'ALPHA'.'&BETA'(2,3)
If
a substring
notation
precedes
character
expression
substring
notation,
the
two
may
be concatenated
apostrophe
of the second
item immediately
after
the
the substring
notation.
The
programmer
parenthesis
item in the
may
of a substring
operand
field.
If
&ALPHA
has
been
been assigned
the character
may be used to assign
&WORD
optionally
notation
place
and
the
period
opening
assigned
the character
value AB%4,
value 5RS, either
of the
following
the character
value AB%45RS.
Operation
Operand
&WORD
&WORD
SETC
SETC
'&ALPHA'(I,4)'&ABC'
'&ALPHA'(I,4)'&ABC'(I,3)
If
a
SETC symbol
is used in the operand
field of
character
value
assigned
to the
SETC
symbol
must
decimal
between
apostrophe
Name
the
or
another
by writing
the opening
closing
parenthesis
of
the
of
closing
the
next
SETA instruction,
be
one
to
eight
digits.
If a SETA symbol
is used in the operand
field of a SETC statement,
the
arithmetic
value
is
converted
to an unsigned
integer
with leading
zeros
removed.
If the value
is zero, it is converted
to a single
zero.
SETB
--
SET
The
a
SETB
BINARY
SETB
symbol.
instructlon
The
format
may
of
be used
this
to assign
instruction
Name
Operation
Operand
SETB
SETB
symbol
0 or
the
binary
value
0 or
to
is:
a 1 enclosed
or
not enclosed
in parentheses,
or a logical
expression
enclosed
in parentheses
9-21
(&AREA+2
GT 29)
('AB%4' EQ '&ALPHA')
(T'&ABCNE T'&XYZ)
(T'&PI2 EQ 'F')
(&AREA+2GT 29 or &B)
(NOT&B AND&AREA+X'2D'GT 29)
('&C'EQ'MB')
(o)
9-22
of SETBinstructions:
The following
are
invalid
operand
&B
(T'&PI2
EQ
('AB%4'
EQ
(AND T'&PI2
'F' &B)
'ALPHA'
NOT
EQ 'F')
Evaluation
of
the
Logical
The following
operand
field
fields
of
SETB
(not enclosed
in parentheses)
(two terms in succession)
(the NOT operator
must be preceded
&B)
(expression
begins
with
procedure
of a SETB
is used to
instruction:
The logical
operations
are
However,
NOTs are performed
ORs.
The computed
name field.
result
is
The
logical
expression
contain
one or more sequences
in parentheses.
A
another
parenthesized
evaluate
logical
the
value
assigned
in the operand
of logically
are
examples
sequences
of
to
the
expression
relation,
or
(true or false).
performed
moving
from
before ANDs,
and ANDs are
sequence
of
sequence.
The
following
contain
parenthesized
by
AND
AND)
Expressions
l.
instructions:
SETB
left
to
performed
symbol
in
SETB
right.
before
in
the
parenthesized
of SETB
terms.
terms
instruction
may
appear
operand
within
fields
that
parenthesized
before
the
portion
or portions
rest of the terms in
a
sequence
of
parenthesized
terms
sequence,
the innermost
sequence
is
parentheses
are permissible.
Usin B SETB
of
a
logical
expression
the expression
are evaluated.
are
If
appears
within
another
parenthesized
evaluated
first.
Five
levels
of
Symbols
The
logical
symbol
appearing
instruction.
in
value
assigned
to
a
SETB
the operand
field of an AIF
symbol
is used
instruction
or
for the
another
SETB
SETB
If a SETB symbol
is used in the operand
field of a
SETA
instruction,
or
in
arithmetic
relations
in
the
operand
fields
of
AIF
and
SETB
instructions,
the binary
values
1 (true) and 0 (false)
are converted
to the
arithmetic
values
+i and +43, respectively.
9-23
or OR)
i
2
3
4
Operation
It is assumedthat
Operand
MACRO
&NAME MOVE
LCLA
LCLB
LCLC
&BI
SETB
&B2
SETB
&AI
SETA
&Cl
SETC
ST
L
ST
L
MEND
&TO,&FROM
&AI
&BI,&B2
&CI
(L'&TO EQ4)
(S'&TOEQ 0)
&BI
'&B2'
2,SAVEAREA
2,&FROM&AI
2,&TO&CI
2,SAVEAREA
HERE
MOVE
FIELDA,FIELDB
HERE
ST
L
ST
L
2,SAVEAREA
2,FIELDBI
2,FIELDA0
2,SAVEAREA
--
CONDITIONAL
BRANCH
9-24
the
inner
macro-definition.
When
processing
in
the
inner
definition
is
completed
restored.
and a return
is made to the higher
definition,
The format
of this instruction
is:
Name
Operation
Operand
AIF
se-
symbol
blank
or
Any logical
instruction
may
expression
be
used
sequence
symbol
in
parenthesis
of the
The
logical
enclosed
theses,
followed
sequence
quence
logical
expression
in the
saved
count
is
expression
in parenimmediately
by a
symbol
the operand
field must
logical
expression.
the
the operand
field of a SETB
of an AIF instruction.
The
immediately
operand
field
follow
is
the
evaluated
to
closing
determine
if 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.
AIF
The statement
instruction.
named
by
the
sequence
symbol
may
precede
or
follow
the
If
an
AIF
instruction
is
in a macro-definition,
then the sequence
symbol
in the operand
field must appear
in the name field of a statement
in
the definition.
If an AIF instruction
appears
outside
macro-definitions,
then
the sequence
symbol
in the operand
field must appear
in the name field
of a statement
outside
macro-definitions.
The
following
are
valid
operand
fields
of AIF
instructions:
(&AREA+X'2D'
GT 29).READER
(T'&PI2
EQ 'F').THERE
('&FIELD3'
EQ'').NO3
The
following
(T'&ABC
.X4F2
NE
T'&XYZ)
(T'&ABC
NE
T'&XYZ)
are
invalid
.X4F2
operand
fields
of AIF
(no sequence
symbol)
(no logical
expression)
(blanks between
logical
symbol)
instructions:
expression
and
sequence
The
following
macro-definition
may be used to generate
the statements
needed
to move a full-word
flxed-polnt
number
from
one
storage
area
to
another.
The
statements
will be generated
only if the type attribute
of
both storage
areas is the letter F.
9-25
Name
&N
&N
END
Operation
Operand
MACRO
MOVE
AIF
AIF
ST
L
ST
L
MEND
&T,&F
(T'&T NE T'&F).END
(T'&T NE 'F').END
2,SAVEAREA
2,&F
2,&T
2,SAVEAREA
--
UNCONDITIONAL
BRANCH
9-26
Name
Operation
Operand
A sequence
symbol or
blank
AGO
A sequence symbol
precede
or
is the
follow
the
instruction
symbol
that
If an AGO instruction
is part of a macro-definition,
then the sequence
in the operand
field must appear
in the name field
of
a
statement
is
in that definition
If an AGO instruction
appears
outside
macro-
definitions,
then
the name field of
The
following
Name
the sequence
a statement
example
symbol
outside
in the operand
field
macro-definitions.
illustrates
Operation
FIRST
&NAME
END
use
of
the
AGO
appear
instruction.
&T, &F
(T'&T
END
EQ
'F').FIRST
(T'&T NE T'&F).END
2, SAVEAREA
2,&F
2,&T
2, SAVEAREA
Statement
1
is
used to determine
if the type attribute
of
macro-instruction
operand
is the letter
F.
If the type attribute
F, statement
3 is the next statement
processed
by the
assembler.
type
attribute
is
not
the
letter
F_ statement
2 is the next
processed
by the assembler
Statement
statement
to
symbol
.END).
2 is used
be
processed
in
Operand
MACRO
MOVE
AIF
AGO
AIF
ST
L
ST
L
MEND
&NAME
the
must
to
indicate
is
statement
to
the
(the
assembler
statement
that
named
the first
is letter
If
the
statement
the
by
next
sequence
9-27
ACTR
the
--
CONDITIONAL
ASSEMBLY
LOOP
COUNTER
within
a macro-deflnltion
instruction
is as follows:
Blank
Name
or
within
the
Operation
Operand
ACTR
Any valid
expression
This
statement,
which
can only
local
declarations,
causes
a counter
field.
The
counter
is checked
for
zero or negative,
it is decremented
is
executed.
If the count
is zero
take one of two actions:
If processing
is being performed
nest of macro-deflnitions
will
statement
2.
source
will
If the source
generated.
be
count
(different
from
AIF branches
executed
program.
-- ASSEMBLY
The
branching
The
ANOP
to
NO
occur
immediately
after the global
and
to be set to the value
in the
operand
zero or a negative
value;
if it is not
by one
before
each time an
decrementing,
AGO or
AIF
branch
the assembler
will
inside
a macro-definition,
be
terminated
and
the
is
being
processed,
this
named
facilitates
by
instruction
symbols
the
next
entire
source
an
END
card
will
be
affects
only
that
AGO branches
that may
conditional
or variable
and
unconditional
symbols.
is:
Name
Operation
Operand
ANOP
Blank
se-
this
OPERATION
instruction
of
of
processed.
program
statements
format
format
SETA
An
ACTR
instruction
in
a
macro-definition
definition;
it has no effect
on the number
of AIF and
be executed
in macro-definitions
called.
ANOP
The
quence
symbol
If
another
9-28
the programmer
wants
to use an AIF
statement,
he must place a sequence
or AGO
symbol
instruction
in the name
to branch
field of
to
the
statement
to which he wants to branch
However,
if
the
programmer
has
already
entered
a
symbol
or
variable
symbol
in the name field of that
statement,
he cannot
place a sequence
symbol
in the name
field.
Instead,
the programmer
must place an ANOP instruction
before
the statement
and then
branch
to
the ANOP instruction.
This has the same effect
as branching
to
the statement
immediately
after
the ANOP instruction
The
following
Name
example
illustrates
the
Operation
&TYPE
FTYPE
&NAME
Statement
1 is used
to determine
of
the
ANOP
instruction.
Operand
MACRO
MOVE
LCLC
AIF
SETC
ANOP
ST&TYPE
L&TYPE
ST&TYPE
L&TYPE
MEND
&NAME
use
&T,&F
&TYPE
(T'&T
'E'
EQ
'F').FTYPE
2,SAVEAREA
2,&F
2,&T
2,SAVEAREA
if
the
type
attribute
of
the
first
macro-instructlon
operand
is
the letter
F.
If the type attribute
is not
the letter
F, statement
2 is the next statement
processed
by the assembler
If the type attribute
is the letter F,
statement
4
should
be
processed
next.
However,
since there is a variable
symbol
(&NAME)
in the name field
of statement
4, the required
sequence
symbol
(.FTYPE)
cannot
be
placed
in
the
name
field.
Therefore,
an
ANOP
instruction
(statement
3) must be
placed
before
statement
4.
Then,
if the type attribute
of the first operand
is the letter
F,
the
next
statement
processed
by
the
assembler
is
the
statement
named
by
sequence
symbol
.FTYPE.
The
value
of
&TYPE
retains
its
initial
null
character
value
because
the
SETC
instruction
is not processed
Since
.FTYPE names
an ANOP instruction,
the
next
statement
processed
by
the
assembler
in statement
4, the statement
following
the ANOP instruction
CONDITIONAL
ASSEMBLY
ELEMENTS
The
following
chart summarizes
the elements
that can be used in each
conditional
assembly
instruction
Each row in this chart
indicates
which
elements
can
be
used in a single conditional
assembly
instruction.
Each
column
is used to indicate
the conditional
assembly
instructions
in
which
a particular
element
can be used.
9-29
The
intersection
can
be
the
element
and
the
used
used
in
an
can
first
in
of
instruction,
be
used.
column
operand
field
Variable
the
of
and
and
For
of
column
if
SETA
so,
example,
chart
row
in
the
indicates
what
whether
fields
of
intersection
indicates
that
the
of
symbolic
parameters
instructions.
Attributes
S.P.
SETA
Symbols
T'
SETC
L'
!-;7-!
N'
I'
....
SETA
i N, O
! 0
03
....
SETB
N,
SETC
......
01
N,
I
-I
02
S.S.
q 0
02
02
02
02
02
0 2
0 2
02
...........
--4-- ....................
AIF
01
0 2;
N,
AGO
N,
ANOP
......
-,I-,,
......
....................
.--I--
...................
i
I
ACTR
......
I
i
I o_
.............
p ......
Only
in
character
Only
in
arithmetic
Only
if
one
to
Io
i
Io
0
L .......
relations
relations
eight
decimal
digits
L'
is
Length
Attribute
K'
is
Count
S'
is
Scaling
Attribute
N'
is
Number
I'
is
Integer
Attribute
S.S.
is
Sequence
Abbreviations
is
O
S.P.
is Operand
is Symbolic
Name
Parameter
9-30
Attribute
Attribute
Symbol
element
instruction
the
Symbols
SET
an
first
row
can
be
SECTION
The
MEXIT
extended
features
of
I.
Terminate
2.
Generate
3.
Define
global
4.
Define
subscripted
5.
Use
6.
Prepare
keyword
7.
Use
error
system
MEXIT
language
SET
SET
the
MACRO
LANGUAGE
to:
programmer
symbols.
symbols.
keyword
and
and mixed-mode
System/360
mixed-mode
macro
macro-instructions.
and
definitions
write
macro-definitions.
EXIT
is used
processing
of
to
indicate
macro-definitlon.
Operation
Operand
A sequence
symbol
or
blank
MEXIT
Blank
MEXIT
allow
THE
symbols.
Name
The
OF
messages.
instruction
should
terminate
instruction
is:
FEATURES
of a macro-definition.
variable
other
EXTENDED
the macro
processing
-- MACRO-DEFINITION
The
I0:
instruction
may
only
be
used
to
in
the
assembler
that
it
The format
of this
a macro-definition.
If the assembler
processes
a MEXIT
instruction
that
definition
corresponding
to an outer macro-instruction,
processed
by the assembler
is the next statement
outside
is
in
a
macrothe next statement
macro-definitions.
If the assembler
processes
a MEXIT
instruction
that
is
in
a
macrodefinition
corresponding
to a second
or third level macro-instruction,
the
next statement
processed
by the assembler
is the next statement
after
the
second
or
third
level
macro-instruction
in
the
macro -definition,
respectively.
MEXIT
should
macro-definition.
definition,
not be
MEND
including
confused
with MEND.
must
be
the
last
those
that
contain
one
MEND indicates
statement
of
or more
MEXIT
the end
every
of
a
macro-
instructions.
i0-i
The following
example illustrates
Name
Operand
Operation
MACRO
MOVE
AIF
MEXIT
ANOP
ST
L
ST
L
MEND
&NAME
OK
&NAME
&T,&F
(T'&T EQ 'F').OK
2,SAVEAREA
2,&F
2,&T
2,SAVEAREA
an
-- REQUEST
The
error
FOR
ERROR
MESSAGE
MNOTE instruction
may be used to request
message.
The format
of this instruction
the
is:
Name
Operation
Operand
A sequence
symbol,
variable
MNOTE
A severity
code,
followed
by
a comma,
followed
by any combination
of characters
en-
symbol
blank
or
closed
phes
the
10-2
The
operand
of
following
forms:
the MNOTE
instruction
assembler
to
generate
in apostro-
may
also
be
written
using
one
of
Operand
Severity-code,
'message'
'message'
'message'
The MNOTEinstruction
may only be used in a macro-definition.
Variable symbols may be used to generate the MNOTE
mnemonicoperation code,
the severity code, and the message.
The severity code may be a decimal integer from 0 through 255 or an
asterisk.
If it is omitted, i is assumed. The severity code indicates the
severity of the error, a higher severity code indicating
a more serious
error.
When MNOTE*
printed
as
occurs,
the statement
in
will
be
a comment.
Two apostrophes
must be used to represent
an
apostrophe
enclosed
in
apostrophes
in
the operand
field of an MNOTE
instruction
One apostrophe
will be listed
for each pair of apostrophes
in the operand
field
If
any
variable
symbols
are
used
in the operand
field of an MNOTE instruction,
they will be replaced
by the values
assigned
to them.
Two ampersands
must
be
used to represent
an ampersand
that is not part of a variable
symbol
in
the operand
field of a MNOTE
statement.
One ampersand
will be
listed
for
each pair of ampersands
in the operand
field.
The
following
Name
&NAME
&NAME
.MI
M2
example
illustrates
Operation
MACRO
MOVE
MNOTE
AIF
AIF
ST
L
ST
L
MEXIT
MNOTE
MEXIT
MNOTE
MEND
the
use
of
the MNOTE
instruction
Operand
&T,&F
*.'MOVE
MACRO
GEN'
(T'&T NE T'&F).MI
(T'&T NE 'F').M2
2,SAVEAREA
2,&F
2,&T
2,SAVEAREA
'TYPE
NOT
SAME'
'TYPE
NOT
F'
10-3
GLOBAL
The
VARIABLE
following
i.
Symbolic
2.
Local
3.
System
Global
are
SYMBOLS
local
variable
symbols:
parameters.
SET
symbols.
variable
SET symbols
symbols.
are
the
only
global
variable
symbols.
more
local
SET
definition,
If
in
communicate
statements
symbols
communicate
values
between
statements
in
or between
statements
outside
macro-definitions.
considered
SET symbol
values
between
statements
outside
macro-definitions.
the
case.
However,
is defined.
A
SET
symbol
must
be defined
as a global
SET symbol
in
definition
in which it is to be used as a global
SET symbol.
A
must
be defined
as a global
SET symbol
outside
macro-deflnitions,
to be used as a global
SET symbol
outside
macro-definitions.
symbol
10-4
wherever
it
is defined
as
same
macro-
to be a different
SET symbol
in each
is the same SET symbol
each place it
in one or
However,
or
is
global
each macroSET
Symbol
if it is
as a global
SET
symbol
in
one
or
elsewhere,
it is considered
the same
a global
SET symbol,
and a different
a local
SET
symbol.
Definin
8 Local
and
Global
SET
Symbols
Local
SET symbols
are defined
when they appear
in
an LCLA, LCLB,
or LCLC instruction.
These instructions
Section
9 under "Defining
SET Symbols."
of
Global
SET
a GBLA, GBLB,
symbols
or GBLC
are defined
instruction.
when
The
Name
Operation
Operand
Blank
GBLA,
GBLB,
GBLC
One
or
GBLB,
and
The
GBLA,
the operand
field
are
discussed
they appear
in the operand
format
of these instructions
or more
of
in
field
is:
variable
symbols
that are to be
used as SET symbols,
separated
by commas
GBLC
instructions
define
global
SETA,
SETB,
and
SETC
symbols,
respectively,
and
assign
the
same initial
values
as the
corresponding
types of local SET symbols.
However,
a global
SET symbol
is
assigned
an initial
value by only the first GBLA,
GBLB, or GBLC instruction
processed
in
which
the
symbol
appears.
Subsequent
GBLA, GBLB,
or GBLC
instructions
processed
by the assembler
do not affect
the value assigned
to
the SET symbol.
four
The programmer
characters
are
If
a GBLA,
should
&SYS.
GBLB,
not
or GBLC
define
any
instruction
global
is part
SET
of
symbols
whose
a macro-definition,
first
it
must
immediately
follow
the prototype
statement,
or another
GBLA, GBLB,
or
GBLC
instruction.
GBLA,
GBLB,
and
GBLC
instructions
outside
macrodefinitions
must appear
after all macro-deflnltlons
in the source
program,
before
all conditional
assembly
instructions
and PUNCH and REPRO
statements
outside
macro-definitions,
and before
the
first
control
section
of
the
program.
All
GBLA,
GBLB,
and
GBLC
instructions
appear
before
all
LCLA,
LCLB,
and
LCLC
definition.
All
GBLA,
GBLB,
and
GBLC
definitions
must appear
before
all
LCLA,
outside
macro-definitions.
Using
Global
The
symbols.
assembler
and
Local
SET
in
a macro-definition
instructions
instructions
LCLB,
and
must
in
that
macrooutside
macroLCLC
instructions
Symbols
following
examples
illustrate
the
use of
Each example
consists
of
two
parts.
The
language
source
program.
The second
part
global
and local
SET
first
part
is
an
shows
the statements
10-5
statements
Example
i:
This example
illustrates
how the same SET symbol
can be used
to
communicate
(i) values
between
statements
in the same macro-deflnition,
and
(2) different
values
between
statements
outside
macro-deflnitlons.
Name
&NAME
i
2
3
&NAME
&A
4
FIRST
5
6
FIRST
Operation
MACRO
LOADA
LCLA
LR
SETA
MEND
LCLA
LOADA
LR
LOADA
LR
END
Operand
&A
15,&A
&A+I
&A
15,&A
15,&A
FIRST
LR
LR
LR
LR
END
15,0
15,0
15,0
15,0
FIRST
&A
is defined
as a local SETA symbol
in a macro-definition
(statement
i) and outside
macro-deflnltions
(statement
4).
&A is
used
twice
within
the
macro -definition
(statements
2
and
3)
and
twice
outsldemacrodefinitions
(statements
5 and 6).
Since &A is
macro-definitlons,
a local
it
SETA symbol
in
is
one
SETA
the
macro-deflnltlon
and
outside
symbol
in the macro-definltlon,
and
another
SETA symbol
outside
macro-definitlons.
Therefore,
statement
3
(which is in the macro-deflnition)
does not affect
the value
used for &A in
statements
5
and
6 (which
are outside
macro-definitions).
Moreover,
the
use of LOADA between
statements
5 and 6 will alter
&A
from
its
previous
value
as a local symbol
within
that macro-definltion
since
the first act of
the macro-deflnitlon
is to LCLA &A to zero.
Example
2:
This
example
illustrates
how
communicate
values
between
statements
that are
and statements
outside
macro-definitlons.
i0-6
a
SET symbol
can be used
part of
a
macro-definitlon
to
Name
&NAME
i
2
3
&NAME
&A
4
FIRST
5
6
FIRST
Operation
Operand
MACRO
LOADA
GBLA
LR
SETA
MEND
GBLA
LOADA
LR
LOADA
LR
END
&A
15, &A
&A+I
&A
15,&A
15, &A
FIRST
LR
LR
15,0
15,1
15,1
15,2
FIRST
LR
LR
END
&A is defined
as a global
SETA
i)
and
outside
macro-definltlons
the
macro-definltion
(statements
definitions
(statements
5 and 6).
symbol
in a macro-deflnltion
(statement
(statement
4).
&A is used twice within
2
and
3)
and
twice
outside
macro-
Since
&A
is a global
SETA symbol
in the macro-definition
and outside
macro-definitions,
it is the same SETA symbol
in
both
cases
Therefore,
statement
3
(which
is in the macro-definltion)
affects
the value used for
&A in statements
5 and 6 (which are outside
macro-definitions).
Example
3:
This example
illustrates
how the same SET symbol
can be used to
communicate:
(I) values
between
statements
in
one
macro-definition,
and
(2) different
values
between
statements
in a different
macro-definltion.
&A
is
definitions
definition
defined
as
a
local
(statements
i and 4).
(statements
2,
3,
5, and
SETA
&A is
symbol
in
used
twice
two
different
within
each
macromacro-
6).
Since
&A
is
a local SETA symbol
in each macro-definition,
it is one
SETA symbol
in one macro-definition,
and another
SETA symbol
in
the
other
macro-definition.
Therefore,
statement
3
(which
is
in
one
macrodefinition)
does not affect
the value used for &A in statement
5 (which
is
in the other macro-definition).
Similarly,
statement
6 does not affect
the
value
used for &A in statement
2.
10-7
Name
Operation
&NAME
1
2
3
&NAME
&A
&A
FIRST
FIRST
Example
4:
communicate
definitions.
i0-8
MACRO
LOADA
LCLA
LR
SETA
MEND
MACRO
LOADB
LCLA
LR
SETA
MEND
LOADA
LOADB
LOADA
LOADB
END
LR
LR
LR
LR
END
This example
illustrates
values
between
statements
Operand
&A
15,&A
&A+I
&A
15,&A
&A+I
FIRST
15,0
15,0
15,0
15,0
FIRST
how
a
SET
symbol
can
be
used
to
that are part of two different
macro-
Name
Operation
MACRO
LOADA
GBLA
LR
SETA
MEND
&NAME
I
2
3
Operand
&NAME
&A
&A
15,&A
&A+I
MACRO
LOADB
GBLA
LR
SETA
MEND
LOADA
LOADB
LOADA
LOADB
END
&A
FIRST
FIRST
&A
15,&A
&A+I
FIRST
LR
LR
LR
LR
END
15,0
15,1
15,2
15,3
FIRST
This example
illustrates
(i)
values
between
and
(2) different
values
statements
outside
used to
macromacro-
10-9
Name
&NAME
&NAME
&A
4
5
6
&A
FIRST
FIRST
Operation
MACRO
LOADA
GBLA
LR
SETA
MEND
MACRO
LOADB
GBLA
LR
SETA
MEND
LCLA
LOADA
LOADB
LR
LOADA
LOADB
LR
END
LR
LR
LR
LR
LR
LR
END
Operand
&A
15,&A
&A+I
&A
15,&A
&A+I
&A
15,&A
15,&A
FIRST
15,0
15,1
15,0
15,2
15,3
15,0
FIRST
10-10
Subscripted
SET
Both
Symbols
global
and
local
SET
symbols
symbols.
The
local
SET
nonsubscripted
SET symbols.
to
or
may
symbo_.s
be
defined
defined
in
as
subscripted
Section
9
were
SET
all
Subscripted
SET symbols
provide
the programmer
with a
convenient
way
use one SET symbol
plus a subscript
to refer
to many arithmetic,
binary,
character
values.
A subscripted
SET symbol
consists
of a SET symbol
by
a
subscript
that is enclosed
in parentheses.
The
arithmetic
expression
that is allowed
in
the
operand
statement.
The subscript
may not be 0 or negative.
The
following
are
valid
are
invalid
subscripted
SET
immediately
followed
subscript
may be any
field
of
a
SETA
symbols.
&READER(17)
&A23456(&S4)
&X4F2(25+&A2)
The
following
&X4F2
(no
(25)
&X4F2
subscripted
symbols.
subscript)
(25)
SET
not
immediately
follow
SET
symbol)
Defining
Subscripted
SET
Symbols:
If
the
programmer
wants
to
use
a
subscripted
SET symbol,
he must write in a GBLA,
GBLB, GBLC, LCLA, LCLB,
or
LCLC instruction,
a SET symbol
immediately
followed
by
a
decimal
integer
enclosed
in
parentheses.
The
decimal
integer,
called
a
dimension,
indicates
the number
of SET variables
associated
with
the
SET
symbol.
Every
variable
that is the same
nonsubscripted
must
associated
with a SET symbol
as the initial
value assigned
SET
symbol.
If a subscripted
be used with the
The
symbol
maximum
SET
SET
symbol
symbol
dimension
is defined
each time
that
can
be
as global,
the
it is defined
as
used
with
same
dimension
global.
a SETA,
SETB,
or
SETC
used
only
if
the
declaration
symbol
may
be
used
only
if
was
the
is 2500.
A subscripted
SET symbol
may be
subscripted;
a
nonsubscripted
SET
declaration
had no subscript.
The following
and &PSW, and the
associated
with
each
is assigned
an initial
value
to the corresponding
ty_e of
have
230
statements
define
the global
local SET symbol
&TSW.
&SBOX
it,
&WBOX
has
20
character
binary
SET symbols
&SBOX,
&WBOX,
has 50 arithmetic
variables
variables,
&PSW and &TSW
variables.
i0-ii
Name
Operation
Operand
GBLA
GBLC
GBLB
LCLB
&SBOX(50)
&WBOX(20)
&PSW(230)
&TSW(230)
Using
Subscripted
SET Symbols:
number
of SET variables
with
the variables
and use them in
After
the
programmer
has
associated
a SET symbol,
he may assign
values
to each
other statements.
If the statements
in the
previous
definition,
(and
&A was defined
as a
the following
statements
could be part
example
were
part
of
a
macroSETA symbol
in the same definition),
of the same macro-definition.
Name
Operation
Operand
&A
SETA
SETB
SETB
A
CLI
&PSW(&A)
&TSW(9)
a
of
(6 LT 2)
(&PSW(&A))
2,=F'&SBOX(45)'
AREA,C'&WBOX(17)
Statement
i assigns
the arithmetic
value
5 to the nonsubscripted
SETA
symbol
&A.
Statements
2
and
3
then
assign
the
binary
value
0 to
subscripted
SETB symbols
&PSW(5)
and &TSW(9),
respectively.
Statements
4
and
5
generate
statements
that
add
the value
assigned
to &SBOX(45)
to
general
register
2, and compare
the value
assigned
to
&WBOX(17)
to
the
value
stored
at AREA, respectively.
SYSTEM
VARIABLE
SYMBOLS
System
variable
symbols
are local variable
symbols
that are assigned
values
automatically
by the assembler.
There
are
three
system
variable
symbols:
&SYSNDX,
&SYSECT,
and &SYSLIST.
System
variable
symbols
may be
used in the name, operation
and operand
fields
of
statements
in
macrodefinitions,
but not in statements
outside
macro-deflnitions.
They may not
be
defined
as symbolic
parameters
or SET symbols,
nor may they be assigned
values
by SETA, SETB, and SETC instructions.
&SYSNDX
-- Macro-Instruction
The system
characters
to
model
statement.
10-12
variable
create
Index
symbol
&SYSNDX
unique
names
for
may
be
concatenated
statements
generated
with
other
from the same
&SYSNDX
is
instruction
each
assigned
processed
subsequent
inner
the four-dlglt
number
by
the assembler,
and
and
outer
0001 for
the
first
it is incremented
by
macEo-lnstructloD
If &SYSNDX
is used in a model statement,
SETC
a character
relation
in a SETB or AIF instruction,
for
&SYSNDX
is
the
four-diglt
number
of
the
processed,
If
field
value.
including
leadlng
one use
constant,
processed.
or MNOTE
instruction,
or
the
value
substituted
macro-lnstructlon
being
zeros.
&SYSNDX
appears
in arithmetic
expressions
of
a SETA instruction),
the value used for
Throughout
considered
a
definition.
macroone for
of a macro-deflnltlon,
independent'of
any
(e.g.,
&SYSNDX
in
the
operand
is an arithmetic
the value
of &SYSNDX
inner macro-instructlon
The example
in the next column
illustrates
these rules.
that the first macro-lnstructlon
processed,
OUTER1,
is
the
instruction
processed
by the assembler.
may
be
in that
It is assumed
106th
macro-
Statement
7
is
the
106th
macro-instruction
processed.
Therefore,
&SYSNDX
is assigned
the number
0106 for that macro-instruction.
The number
0106
is
substituted
for
&SYSNDX
when it is used in statements
4 and 6.
Statement
&NDXNUM.
4 is used
Statement
to assign
6 is used
the character
to create
the
value
0106 to the
unique
name B0106.
SETC
symbol
10-13
N_
Name
Operation
------------.
Operand.
MACRO
INNER1
1
GBLC
SR
CR
BE
B
MEND
MACRO
OUTER1
GBLC
SETC
SR
A&SYSNDX
2
3
&NAME
4
&NDXNUM
&NAME
B&SYSNDX
7
3
ALPHA
BETA
OUTER1
0UTERI
ALPHA
SR
AR
SR
CR
BE
B
S
SR
AR
SR
CR
BE
B
S
A0107
B0106
BETA
A0109
BOI08
Statement
5
&SYSNDX
is assigned
0107 is substituted
0106
is
Statement
occurrence
statement
10-14
of
6 is
2,5
2,5
B&NDXNUM
A& SY SNDX
&NDXNUM
'&SYSNDX'
2,4
2,6
AR
INNER1
S
MEND
5
6
number
2.
&NDXNUM
2,4
2,6
2,5
2,5
BOI06
A0107
2,=F'I000'
2,4
2,6
2,5
2,5
BOI08
AOI09
2,=F'IO00'
is
the
107th
macro-instructlon
processed.
the number
0107 for that macro-instruction.
for &SYSNDX
when it is used in statements
I
substituted
8 is
2,=F'I000'
the
for
the
global
108thmacro-instruction
SETC
symbol
&NDXNUM
processed.
&SYSNDX
is
replaced
by
the
number
used to create
the unique
name B0108.
Therefore,
The number
and 3.
The
in
statement
Therefore,
0108.
For
each
example,
Whenstatement 5 is
to
process
the
108th
macro-instruction,
macro-instructlon
processed.
Therefore,
each
5 becomes
occurrence
statement
of
&SYSNDX
is
replaced
by
the
n.umber
i is used to create
the unique
name A0109.
&SYSECT
--
the
used
statement
Current
109th
Control
0109.
For
example,
Section
The system
variable
symbol
&SYSECT may be used to represent
the
name
of
the
control
section
in
which a macro-instructlon
appears.
For each
inner
and outer macro-instruction
processed
by the
assembler,
&SYSECT
is
assigned
a
value
that
macro-instructlon
appears.
When
&SYSECT
is
is used
the
name
of
the
in a macro-deflnitlon,
control
the
section
value
in which
substituted
the
for
&SYSECT
is
the
name
of
the
last CSECT,
DSECT,
or START statement
that
occurs
before
the macro-lnstruction.
If no named CSECT,
DSECT,
or
START
statements
occur
before
a
macro-instructlon,
&SYSECT
is assigned
a null
character
value
for that macro-lnstructlon.
value
CSECT
for
definition,
or DSECT
&SYSECT
and
statements
for
any
for
any
Throughout
the use
considered
a
constant,
inner macro-lnstructions
The
next
example
other
processed
subsequent
outer
and
in
a macro-deflnltion
affect
the
inner macro-instructlons
in that
inner
of
a macro-deflnltlon,
independent
of
any
in that definition.
illustrates
these
macro-lnstructlons.
the value of &SYSECT
may
CSECT or DSECT
statements
rules.
Statement
8 is the last CSECT, DSECT,
or
START
before
statement
9 is processed.
Therefore,
&SYSECT
MAINPROG
for
macro-lnstructlon
0UTERI
in
statement
substituted
for
&SYSECT
Statement
before
CSOUTI
for
This
is
when
the
it
last
statement
4 is processed.
for
macro-lnstructlon
&SYSECT
when
Statement
is
the
statement
5.
instruction
appears
in
it
i is
last
CSECT,
in statement
DSECT,
or
statement
processed
is assigned
the value
9.
MAINPROG
is
6.
START
statement
Therefore,
&SYSECT
is assigned
INNER in statement
4. CSOUTI
is
appears
in
used to
CSECT,
generate
DSECT,
Therefore,
&SYSECT
INNER
in statement
statement
appears
statement
is
5.
be
or
processed
the
value
substituted
2.
a CSECT
or START
statement
statement
for
that
statement
4.
appears
before
assigned
the
value
INA
for
INA is substituted
for &SYSECT
macrowhen it
2.
10-15
Name
Operation
&INCSECT
MACRO
INNER
CSECT
DC
MEND
Operand
&INCSECT
A(&SYSECT)
MACRO
CSOUTI
4
5
6
OUTER1
CSECT
DS
INNER
INNER
DC
MEND
100C
INA
INB
A(&SYSECT)
MACRO
OUTER2
DC
MEND
MAINPROG
9
i0
MAINPROG
CSOUTI
INA
INB
CSECT
DS
OUTERI
OUTER2
CSECT
DS
CSECT
DS
CSECT
DC
CSECT
DC
DC
DC
A(&SYSECT)
200C
200C
100C
A(CSOUTI)
A(INA)
A(MAINPROG)
A(INB)
Statement
1 is used to generate
a CSECT
statement
for
statement
5.
This
is
the
last
CSECT,
DSECT,
or START statement
that appears
before
statement
i0.
Therefore,
&SYSECT
is assiEned
the _ y_l_e
....
INB
for
macroinstruction
ODTRR2
in
statement
I0.
IN-B is substituted
for &SYSECT
when
it appears
10-16
in statement
7.
&SYSLIST
--
The
Macro-lnstructlon
system
alternative
variable
to
instruction
Operand
symbol
symbolic
&sYSLIST
provldes
the
parameters
for
referring
parameters
may
be
progran_er
with
an
to positional
macro-
operands;_l
&SYSLIST
definition.
and
symbolic
used
in
the
same
&SYSLIST(0)
may be used to refer to a symbolic
parameter
in
instruction
prototype
If the symbolic
parameter
is omitted
in
instruction
prototype,
then &SYSLIST(O)
would
refer
to
a
null
value.
macro-
&SYSLIST(n)
may
be
used
to
refer
to
the
nth
positional
macroinstruction
operand.
In addition,
if the nth operand
is
a
sublist,
then
&SYSLIST
(n,m)
may
be
used
to refer
to the mth operand
in the sublist,
where
n and m may be any arithmetic
expressions
allowed
in
the
operand
field
of
a SETA statement,
m may be equal to or greater
than 1 and n has
a range
of 1 to 200.
If the value of "subscript
the value
specified
in the name
it is a sequence
symbol.
n is zero",
then
&SYSLIST(n)
field of the macro-lnstructlon,
is
assigned
except
when
The
type,
length,
scaling,
integer,
and
count
attributes
&SYSLIST(n)
and &SYSLIST(n,m)
and the number
attributes
of &SYSLIST(n)
&SYSLIST
may be used in conditional
assembly
instructions.
N'&SYSLIST
of
and
may
be used to refer
to the total number
of positional
operands
in
a
macroinstruction
statement.
N'&SYSLIST(n)
may be used to refer
to the number
of
operands
in
a subllst.
If the nth operand
is omitted,
N' is zero; if the
nth operand
is not a subllst,
N' is one.
The
i.
.
following
A
procedure
sublist
The count
commas).
is
is used
considered
includes
to
to be
operands
evaluate
one
N'&SYSLIST:
operand.
specifically
omitted
(by
means
of
Examples:
N'&SYSLIST
Macro-Instruction
MAC
KI=DS
MAC
MAC
MAC
MAC
,KI=DC
FULL,,F,
,
Attributes
0
i
4
2
0
('i' ,'2'),KI-DC
are
discussed
in Section
7 under
"Attributes."
10-17
KEYWORD
MACRO-DEFINITIONS
Keyword
of
AND
macro-definitions
preparing
INSTRUCTIONS
provide
the
programmer
with
A
keyword
macro-definition
enables
a programmer
of operands
in each macro-instruction
that corresponds
and to write
the operands
in any order.
The
macro-instructlons
described
in
Section
and
positional
written
in the
operand
an
alternate
way
macro-definitions.
field
that
macro-definltions,
same order as the
of the
correspond
(hereinafter
prototype
called
to
to
to
the
positional
respectively)
corresponding
reduce
the number
the
definition,
require
symbolic
macro-definitions
macro-instructions
the operandsto
parameters
in
be
the
statement.
In
a
keyword
macro-definition,
the
programmer
can assign
standard
values
to any symbolic
parameters
that appear
in the operand
field
of
the
prototype
statement.
The standard
value
assigned
to a symbolic
parameter
is substituted
for the symbolic
parameter,
if the progranxner
does not write
anything
symbolic
write
in the operand
parameter.
When a keyword
one
Operand
field
of
the
macro-instruction
to
correspond
macro-instruction
is written,
the programmer
for
each
symbolic
parameter
whose value
to
the
need
only
he wants
to
change.
Keyword
macro-definitions
are prepared
the
same
way
as
macro-definitions,
except
that
the
prototype
statement
differently.
The rules
for preparing
positional
macro-definitions
Section
7.
Keyword
The
Prototype
format
of
this
statement
is:
Name
Operation
Operand
A symbolic
parameter
or blank
A symbol
One
or more
operands
of the
form described
below,
by
separated
commas
Each
operand
must
consist
of
a symbolic
followed
by an equal sign and optionally
followed
This value
must not include
a keyword.
10-18
positional
is
written
are
in
parameter,
immediately
by
a
standard
value.
equal
part
of
an
operand
must
immediately
follow
sign.
Anything
that may be used as an operand
in a macro-instruction
except
variable
symbols,
may be used as a standard
value
in
a
keyword
prototype
statement.
The
rules
for
forming
valid macro-instruction
operands
are
detailed
in Section
8.
The
following
are
valid
keyword
are
invalid
prototype
operands.
&READERffi
&LOOP2=SYMBOL
&S4==F'4096'
The
following
keyword
prototype
CARDAREA
&TYPE
&TWO =123
(no symbolic
parameter)
(no equal sign)
&AREA=X
(standard
(equal sign
parameter)
X'IBgA'
does
value
not
does
operands.
i,nediately
not
follow
immediately
symbolic
follow
equal
sign)
The
parameter
first
two
MOVE.
following
in
the
operands
keyword
prototype
statement
contains
a
symbolic
name field,
and four operands
in the operand
field.
The
contain
standard
values.
The mnemonic
operation
code is
Name
Operation
Operand
&N
MOVE
&R=2,&A=S,&T-,&F-
Keyword
it by
Macro-Instruction
After a programmer
writing
a keyword
The
format
of
has prepared
a keyword
macro-lnstruction.
a keyword
macro-instruction
macro-definition
Operation
Operand
A symbol,
sequence
symbol,
or blank
Mnemonic
use
is:
Name
operation
code
he may
separated
by
10-19
one
through
seven
letters
and
digits,
the
first
The
keyword
part
of
each
keyword
macro-instructlon
operand
must
correspond
to one of the symbolic
parameters
that appears
in
the
operand
field
of
the
keyword
prototype
statement.
A keyword
corresponds
to a
symbolic
parameter
if the characters
of the keyword
are
identical
to
the
characters
of the symbolic
parameter
that follow
the ampersand.
The
following
are
valid
keyword
are
invalid
macro-instruction
operands.
LOOP2=SYMBOL
$4--F'4096'
TOThe
following
&X4F2=0 (2,3)
CARDAREA=A+2
= (TO (8), (FROM))
keyword
macro-lnstruction
operands.
(keyword
does not begin with a letter)
(keyword
is more
than seven characters)
(no keyword)
The
operands
in
a
keyword
macro-instructlon
may be
order.
If
an
operand
appeared
in
a
keyword
prototype
corresponding
operand
does
not
have
to
appear
in
the
instruction.
If an operand
is omitted,
the comma that would
it from the next operand
need not be written.
The following
rules are used to replace
statements
of a keyword
macro-definltlon.
If a Symbolic
parameter
prototype
statement,
and
le
contains
symbol.
a symbol,
If
the
the
name
symbolic
field of
contains
a sequence
symbol,
a null character
value.
10-20
appears
the name
the
the
symbolic
in
the
field of
written
in any
statement,
a
keyword
macrohave separated
parameters
in
the
name
field
of
the
the macro-instruction
parameter
is
replaced
by
the
the macro-instruction
is blank
or
symbolic
parameter
is replaced
by
If a symbolic
parameter
appears
in
the
operand
field
of
the
prototype
statement,
and the macro-instruction
contains
a keyword
that corresponds
to the symbolic
parameter,
the value
assigned
to
the keyword
replaces
the symbolic
parameter.
If a symbolic
parameter
prototype
statement,
was
assigned
a
standard
value
by
a
and the macro-instructlon
does not contain
a
keyword
that
corresponds
to
the
symbolic
parameter,
standard
value
assigned
to the symbolic
parameter
replaces
symbolic
parameter.
Otherwise,
the
symbolic
parameter
replaced
by a null character
value.
Note
i:!
If
a standard
value
is a self-deflnlng
term, the type
assigned
to the standard
value
is the letter
N.
If
a
standard
omitted
the type attribute
assigned
to the standard
value
is the
All other standard
values
are assigned
the type attribute
U.
the
the
is
attribute
value
is
letter
O.
Note
2:
Positional
parameters
cannot
be
changed
to
keywords
by
substitution.
That
is,
in
the
following
example,
the expression
AffiFB,
statement
2, will be treated
as
a
positional
operand
consisting
of
a
character
string
in the generation
of the MAC macro;
it will not be treated
as a keyword
A w_th the value FB.
Name
Operation
Operand
&VALUE
GBLC
SETC
MAC
&VALUE
'A-FB'
The
generated
&VALUE
following
keyword
macro-deflnitlon,
statements
illustrate
these rules.
keyword
macro-instructlon,
and
I--Name
Operation
Operand
MACRO
MOVE
ST
L
ST
L
MEND
&R=2,&A'S,&T',&F"
&R,&A
&R,&F
&R,&T
&R,&A
i
2
3
4
5
&N
&N
HERE
MOVE
T=FA,F=FB,A_THERE
HERE
ST
L
2, THERE
2,FB
ST
L
2, FA
2, THERE
_-__
Statement
parameters
&R
1
and
assigns
the
standard
values
2
and S to the
&A, respectively.
Statement
6 assigns
the values
keywords
field of
T, F, and
statement
A,
6.
respectively.
The
symbol
symbolic
FA, FB,
HERE
is
10-21
Since
prototype
of
in
a
symbolic
parameter
statement
(statement
i),
the macro-instructlon
statement
2.
(statement
(&N)
appears
in the name field
and the corresponding
characters
6)
are
a symbol,
&N
is
replaced
of the
(HERE)
by
HERE
Since
&T
appears
in the operand
field,
of statement
i, and statement
6 contains
the keyword
(T) that corresponds
to &T, the value
assigned
to
T
(FA) replaces
&T in statement
4.
Similarly,
FB and THERE replace
&F and &A
in
statement
3
and
in
statements
2 and 5, respectively.
Note that the
value
assigned
to &A in statement
6 is used instead
of the
value
assigned
to &A in statement
i.
Since
&R appears
in the operand
field of statement
i, and statement
6
does not contain
a corresponding
keyword,
the value
assigned
to
&R
(2),
replaces
&R in statements
2, 3, 4, and 5.
Operand
Subllsts:
The value assigned
to a keyword
and the standard
value
assigned
to a symbolic
parameter
may be an operand
sublist.
Anything
that
may
be used as an operand
subllst
in a positional
macro-lnstruction
may be
used as a value in a keyword
macro-instructlon
and as a standard
value
in
a
keyword
prototype
statement.
The
rules
for
forming
valid
operand
subllsts
are detailed
in Section
8 under "Operand
Sublists."
Keyword
Inner Macro-Instructions:
instructions
may
be
used
as
posltlonalmacro-definitions.
MIXED-MODE
of
MACRO-DEFINITIONS
AND
Keyword
and
positional
inner
macromodel
statements
in
either
keyword
or
INSTRUCTIONS
Mixed-mode
macro-definitions
allow
the
keyword
and positional
macro-definitions
programmer
to use the
features
in the same macro-deflnitlon.
Mixed-modemacro-definitlons
are prepared
the same way
as
positional
macro-deflnitions,
except
that
the
prototype
statement
is
written
differently.
If &SYSLIST
is
used,
it
refers
only
to
the
positional
operands
in
the macro-instruction.
Subscrlpting
past the last positional
parameter
will yield an empty string
and a
type
attribute
of
"0".
The
rules
for preparing
positional
macro
definitions
are in Section
7.
Mixed-Mode
The
10-22
Prototype
format
of
this
statement
is:
Name
Operat
ion
A symbolic
parameter
or blank
A symbol
Operand
One or more
ands
of the
described
separated
COHmlas
operform
below,
by
The
operands
must
be
valid
operands
of
prototype
statements.
All
the
positional
operands
keyword
operand.
The rules
for
forming
positional
in
Section
7, under
"Macro-Instruction
Prototype."
keyword
operands
are
discussed
above
under
"Keyword
positional
must
precede
operands
The rules
Prototype."
The
positional
statement
following
operands
sample
and two
mixed-mode
prototype
keyword
operands.
Name
Operation
Operand
&N
MOVE
&TY,&P,&R,&TO=,&F-
and
keyword
the
first
are
discussed
for
forming
contains
three
Mixed-ModeMacro-lnstruction
The
format
of
a mixed-modemacro-instructlon
is:
Name
Operation
Operand
A symbol,
sequence
Mnemonic
Zero
or more
operands
of
the
form
described
symbol,
or
blank
operation
code
below,
commas
separated
by
The operand
field consists
of two parts.
The first
part
corresponds
to
the
positional
prototype
operands.
This part of the operand
field
is
written
in the same way that the
operand
field
of
a
positional
macroinstruction
is
written.
The
rules
for
writing
positional
macroinstructions
are in Section
8.
The second part of
the
operand
field
corresponds
to
the
keyword
prototype
operands.
This part of the operand
field is written
in the same
way that the operand
field of a keyword
macro-instruction
is written.
The
rules
for
writing
keyword
macro-instructions
are described
above under
"Keyword
Macro-lnstruction.
''_
10-23
The
instruction,
following
and
statements
illustrate
these
Operation
Op er and
MACRO
MOVE
ST&IT
L&TY
ST&TY
L&TY
HERE
MOVE
H,,2,F=FB,TO'FA
HERE
STH
LH
STH
LH
2,SAVE
2,FB
2,FA
2,SAVE
Name
&N
&N
mixed-mode macro-definition,
generated
mixed-mode
macro-
facilities.
&R, SAVE
The
prototype
statement
(statement
i)
contains
three
positional
operands
(&TY,&P,
and &R) and two keyword
operands
(&TO and &F).
In
the
macro-lnstructlon
(statement
2) the positional
operands
are written
in the
same order
as the positional
operands
in
the
prototype
statement
(the
second
operand
is omitted).
The keyword
operands
are written
in an order
that is different
from the order
of
keyword
operands
in
the
prototype
statement.
Mixed-mode
inner macro-instructions
mixed-mode,
keyword,
and
positional
positional
inner macro-lnstructions
may
mlxed-mode
macro-definitlons.
MACRO-DEFINITION
in
and
in
COMPATIBILITY
Macro-definitlons
prepared
for
use
with
the
other
System/360
assemblers
having
macro language
facilities
may be used with
the
Operating
System/360
assembler
provided
that
all
SET
symbols
are defined
in an
appropriate
LCLB, GBLA,
GBLB,
or
GBLC
statement.
The
AIFB
and
AGOB
instructions
will
be
processed
by the Operating
System/360
assembler
the
same way that the AIF and AGO instructions
are processed.
AIFB
and
AGOB
instructions
will
cause
the
count set up by the ACTR instructions
to be
decremented
in exactly
the same way as the AGO and AIF instructions.
i0-24
APPENDIXES
APPENDIX
A:
CHARACTER
CODES
APPENDIX
B:
HEXADECIMAL-DECLMAL
NUMBER
APPENDIX
C:
MACHINE-INSTRUCTION
FORMAT
APPENDIX
D:
MACHINE-INSTRUCTION
MNEMONIC
APPENDIX
E:
ASSEMBLER
APPENDIX
F:
SUMMARY
APPENDIX
G:
MACRO
APPENDIX
H:
SAMPLE
APPENDIX
I:
ASSEMBLER
APPENDIX
J:
SAMPLE
CONVERSION
TABLE
OPERATION
CODES
INSTRUCTIONS
OF CONSTANTS
LANGUAEE
SUMMARY
PROGRAM
LANGUAGES--FEATURES
MACRO
DEFINITIONS
COMPARISON
CHART
APPENDIX
Character
Set
Punch
Combination
8-Bit
Code
00000000
00000001
00000010
00000011
00000100
00000101
00000110
00000111
00001000
00001001
0000 I0 i0
00001011
00001100
00001101
12,0,9,8,i
12,9,1
12,9,2
12,9,3
12,9,4
00001110
00001111
00010000
00010001
00010010
00010011
00010100
00010101
00010110
00010111
00011000
00011001
00011010
00011011
00011100
00011101
00011110
00011111
00100000
00100001
00100010
00100011
00100100
00100101
00100110
00100111
00101000
00101001
12,9,5
12,9,6
12,9,7
12,9,8
12,9,8,1
12,9,8,2
12,9,8,3
12,9,8,4
12,9,8,5
12,9,8,6
12,9,8,7
12,11,9,8,1
11,9,1
11,9,2
11,9,3
11,9,4
11,9,5
11,9,6
11,9,7
11,9,8
11,9,8,1
11,9,8,2
11,9,8,3
11,9,8,4
11,9,8,5
11,9,8,6
11,9,8,7
11,0,9,8,1
0,9,1
0,9,2
0,9,3
0,9,4
0,9,5
0,9,6
0,9,7
0,9,8
0,9,8,1
A:
Decimal
0
1
2
3
4
5
6
7
8
9
10
ii
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CHARACTER
CODES
HexaDecimal
ASCII
Code
00
Ol
O2
03
04
O5
' 06
O7
O8
09
OA
0B
0C
0D
0E
OF
I0
II
12
13
14
15
16
17
18
19
IA
IB
iC
ID
IE
IF
2O
21
22
23
24
00
01
02
03
04
09
06
7F
O8
25
26
27
28
29
09
0A
0B
0C
OD
0E
OF
I0
ii
12
13
14
15
08
17
18
19
IA
IB
IC
ID
IE
IF
20
21
22
23
24
0A
17
IB
28
29
EBCDIC
Printer
ASCII
Printer
Graphics
Graphics
NUL
SOH
STX
ETX
EOT
HT
ACK
DEL
BS
HT
LF
VT
FF
CR
SO
Sl
DLE
DCI
DC2
DC3
DC4
NAK
BS
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
SP
1
I!
#
$
LF
ETB
ESC
(
)
A-1
8-Bit
Code
00101010
00101011
00101100
00101101
00101110
00101111
00110000
00110001
00110010
00110011
00110100
00110101
00110110
00110111
00111000
00111001
00111010
00111011
00111100
00111101
00111110
00111111
01000000
01000001
01000010
01000011
01000100
01000101
01000110
01000111
01001000
01001001
01001010
01001011
01001100
01001101
01001110
01001111
01010000
01010001
010_I0010
01010011
01010100!
01010101
Character
Punch
Combinaions
0,9,8,2
0,9,8,3
0,9,8,4
0,9,8,5
0,9,8,6
0,9,8,7
12,11,0,9,8,1
9,1
9,2
9,3
9,4
9,5
9,6
9,7
9,8
9,8,1
9,8,2
9,8,3
9,8,4
9,8,5
9,8,6
9,8,7
12,0,9,1
12,0,9,2
12,0,9,3
12,0,9,4
12,0,9,5
12,0,9,6
12,0,9,7
12,0,9,8
12,8,1
12,8,2
12,8,3
12,8,4
12,8,5
12,8,6
12,8,7
12
12,11,9,1
12,11,9,2
12,11,9,3
12,11,9,4
12,11,9,5
Set
Decimal
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
HexaDecimal
2A
2B
2C
2D
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F
50
51
52
53
54
55
--DD--D------m--J
A-2
ASCII
Code
EBDIC
Printer
ASCII
Printer
Graphics
Graphic_
,
2A
2B
2C
O5
06
07
30
31
16
33
34
35
36
04
38
39
3A
3B
14
15
3E
IA
20
41
42
43
44
45
46
47
48
49
5B
2E
3C
28
2B
21
26
51
52
53
54
55
+
ENQ
ACK
BEL
0
i
SYN
3
4
5
6
EOT
8
9
DC4
NAK
>
SUB
(blank)
(cent sign)
(period)
<
A
B
C
D
E
F
G
H
I
E
<
I (Logical
&
OR
I
&
Q
R
S
T
U
8-Bit
Code
01010110
01010111
01011000
01011001
0 I0 ii0 i0
01011011
01011100
01011101
01011110
01011111
01100000
01100001
0 Ii00010
01100011
0 ii00 i00
01100101
01100110
01100111
01101000
01101001
Character
Sat
Punch
Combination
12,11,9,6
12,11,9,7
12,11,9,8
11,8,1
11,8,2
11,8,3
11,8,4
ii,8,5
11,8,6
11,8,7
ii
01101010
01101011
01101100
01101101
0,I
11,0,9,2
11,0,9,3
11,0,9,4
11,0,9,5
11,0,9,6
11,0,9,7
11,0,9,8
0,8,1
12,11
0,8,3
0,8,4
0,8,5
01101110
01101111
01110000
01110001
01110010
01110011
01110100
01110101
01110110
01110111
01111000
01111001
01111010
01111011
01111100
01111101
0,8,6
0,8,7
12,11,0
12,11,0,9,1
12,11,0,9,2
12,11,0,9,3
12,11,0,9,4
12,11,0,9,5
12,11,0,9,6
12,11,0,9,7
12,11,0,9,8
8,1
8,2
8,3
8,4
8,5
01111110
01111111
8,6
8,7
Hexa-
Decimal
86
87
88
89
9O
91
92
93
94
95
96
97
98
99
i00
i01
102
103
104
105
106
107
108
109
Decimal
56
57
58
59
5A
5B
5C
5D
5E
5F
60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
ii0
iii
112
113
114
115
116
117
118
119
120
121
122
123
124
125
6E
6F
70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
126
127
7E
7F
ASCII
Codes
56
57
58
59
5D
24
2A
29
3B
3E
2D
2F
62
63
64
65
66
67
68
69
7C
2C
25
5F
3E
3F
70
71
zBCDZC
ASCII
Printer
Printer
Graphics
Graphics
V
W
X
Y
1
$
-_(logical
NOT
- (hyphen)
---I
b
C
d
e
f
g
h
!
/
, (comma)
%
%
(underscore
>
?
_2' ( underscore)
>
?
P
q
"79
14.
73
74
75
76
77
78
60
3A
23
40
27
3D
22
t
u
V
w
x
#
@
#
@
' (apostrophe',
' (apostrophe)
n
II
A-3
A-4
8-Bit
Code
Character
Set
Punch
Combination
i0000000
i0000001
i0000010
i0000011
i0000100
10000101
10000110
10000111
10001000
10001001
10001010
10001011
10001100
10001101
10001110
10001111
10010000
10010001
10010010
10010011
10010100
10010101
10010110
10010111
10011000
10011001
10011010
10011011
10011100
10011101
10011110
10011111
10100000
10100001
10100010
10100011
10100100
10100101
10100110
10100111
10101000
10101001
10101010
10101011
12,0,8,1
12,0,i
12,0,2
12,0,3
12,0,4
12,0,5
12,0,6
12,0,7
12,0,8
12,0,9
12,0,8,2
12,0,8,3
12,0,8,4
12,0,8,5
12,0,8,6
12,0,8,7
.12,11,8,1
12,11,1
12,11,2
12,11,3
12,11,4
12,11,5
12,11,6
12,11,7
12,11,8
12,11,9
12,11,8,2
12,11,8,3
12,11,8,4
12,11,8,5
12,11,8,6
12,11,8,7
11,0,8,1
Ii,0,I
11,0,2
11,0,3
11,0,4
11,0,5
11,0,6
11,0,7
11,0,8
11,0,9
11,0,8,2
11,0,8,3
Decimal
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
HexaDecimal
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
94
95
96
97
98
99
9A
9B
9C
ASCII
Code
80
61
62
63
64
65
66
67
68
69
8A
8B
8C
8D
8E
8F
90
6A
6B
6C
6D
6E
6F
7O
71
72
9A
9D
9E
9B
9C
9D
9E
9F
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
9F
A0
7E
73
74
75
76
77
78
79
7A
AA
AB
EBCDIC
Printer
ASCII
Printer
Graphics
Graphics
8
h
i
g
h
i
k
1
k
1
P
q
P
q
.D_m_mt"
8-Bit
Code
i0101100
i0101101
i0101110
i0101111
i0110000
i0110001
i0110010
i0110011
I0110100
10110101
i0110110
i0110111
i0111000
i0111001
i0111010
i0111011
i0111100
I0111101
10111110
i0111111
ii000000
ii000001
ii000010
ii000011
ii000100
ii000101
ii000110
II000111
Ii001000
II001001
Ii001010
ii001011
Ii001100
Ii001101
ii001110
ii001111
Ii010000
ii010001
ii010010
ii010011
ii010100
ii010101
ii010110
ii010111
Character
Punch
Combination
11,0,8,4
11,0,8,5
11,0,8,6
11,0,8,7
12,11,0,8,1
12,11,0,i
12,11,0,2
12,11,0,3
12,11,0,4
12,11,0,5
12,11,0,6
12,11,0,7
12,11,0,8
12,11,0,9
12,11,0,8,2
12,11,0,8,3
12, ii,0,8,4
12, 11,0,8,5
'12, Ii,0,8,6
12, ii,0,8,7
12,0
12,1
12,2
12,3
12,4
12,5
12,6
12,7
12,8
12,9
12,0,9,8,2
12,0,9,8,3
12,0,9,8,4
12,0,9,8,5
12,0,9,8,6
12,0,9,8,7
ii,0
ii,i
11,2
11,3
11,4
11,5
11,6
11,7
Set
Hexa-
Decimal'
Decimal
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
AC
AD
AS
AF
BO
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
CO
C1
C2
C3
C4
190
191
192
193
194
195
196
197
198
199
20O
201
202
203
204
205
206
207
2O8
209
210
211
212
213
214
215
'
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF
DO
D1
D2
D3
D4
D5
D6
D7
ASCII
Code
EBCDIC
Printer
ASCII
Printer
Graphics
Graphics
AC
AD
AE
AF
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
7B
41
42
43
44
45
46
47
48
49
CA
CB
CC
CD
CE
CF
7D
4A
4B
4C
4D
4E
4F
50
{
A
B
C
D
E
F
G
H
I
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
J
K
L
M
N
0
P
A-5
8-Bit
Code
ii011000
ii011001
ii011010
ii011011
ii011100
ii011101
ii011110
II011111
iii00000
iii00001
iii00010
iii00011
iii00100
iii00101
iii00110
iii00111
iii01000
iii01001
Iii01010
iii01011
iii01100
Iii01101
iii01110
iii01111
iiii0000
iiii0001
iiii0010
Iiii0011
iiii0100
iiii0101
iiii0110
IIii0111
iiiii000
iiiii001
iiiii010
iiiii011
iiiiii00
iiiiii01
iiiiiii0
iiiiiiii
A-6
Character
Punch
Combination
Set
ii,8
ii,9
12,11,9,8,2
12,11,9,8,3
12,11,9,8,4
12,11,9,8,5
12,11,9,8,6
12,11,9,8,7
0,8,2
11,0,9,1
0,2
0,3
0,4
0,5
0,6
0,7
0,8
0,9
11,0,9,8,2
11,0,9,8,3
ii,0,9,8,4
11,0,9,8,5
11,0,9,8,6
ii,0,9,8,7
0
1
2
3
4
5
6
7
8
9
12,11,0,9,8,2
12,11,0,9,8,3
12,11,0,9,8,4
12,11,0,9,8,5
12,11,0,9,8,6
12,11,0,9,8,7
Decimal
216
217
218
219
220
221
222
223
224
225
226
227
228
229
23O
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
HexaDecimal
D8
D9
DA
DB
DC
DD
DE
DF
EO
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
ASCII
Code
51
52
DA
DB
DC
DD
DE
DF
E0
5C
53
54
55
56
57
58
59
5A
EA
EB
EC
ED
EE
EF
30
31
32
33
34
35
36
37
38
39
FA
FB
FC
FD
FE
FF
EBCDIC
Printer
ASCII
Printer
Graphics
Graphics
S
T
U
V
W
X
Y
Z
0
1
2
3
4
5
6
7
8
9
\
S
T
U
V
W
X
Y
Z
0
i
2
3
4
5
6
7
8
9
Special
Graphic
Characters
*
Cent Sign
Period,
Decimal
<
(
+
I
&
!
Less-than
Slgn
Left Parenthesis
Plus Slgn
Vertical
Bar, Logical
Ampersand
Exclamation
Point
$i Dollar
Point
OR
Examplesl
) Right Parenthesis
; Semicolon
--iLoglcal
NOT
Number
Sign,
Hyphen
/ Slash
,
Z
Sign
Asterisk
Co_ma
Percent
Underscore
Bit Pattern
Bit Positions
01 23 4567
Type
Hole
>
?
:
Greater-than
Sign
Question
Mark
Colon
#
@
'
Number
Sign
At Slgn
Prime,
Apostrophe
=
"
Equal
Quotation
Mark
Pattern
i
Zone
Punches
Digit
Punches
12-9-4
Control
Character
00 O0
0100
Speclal
Graphic
01 i0
II00
!
0-8-4
Upper
Case
Ii Ol
ii01
11!9
Lower
Case
10 O0
0001
00 11
0000
12-0!I
!
Control
function
assigned
Character,
not
yet
12-11-0-9-8-1
!
I
i
A-7/A-8
APPENDIX
From
hex:
the decimal
From
B:
Locate
each
equivalents.
decimal:
HEXADECIMAL-DECIMAL
hex
digit
in
Add these
(i) Locate
the
NUMBER
its
corresponding
to obtain
the
largest
declmal
CONVERSION
column
position
decimal
value.
value
in
the
Declmal,
numbers
hexadecimal,
from 0 to
(and binary)
are listed
255
HEXADECIMAL
6I
HEXL
equivalents
on panels
HEX
table
hex
the
and
that
equlvalent
process
of
11-14.
note
will
fit
and hex
on
this
all
COLUMNS
J3_
DEC
TABLE
DEC
HEX - DEC
HEX
- DEC
HEX
- DEC
HEX
- DEC
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0
16
32
48
64
80
96
112
128
144
160
176
192
208
224
240
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0
1
2
3
4
5
6
7
8
9
i0
ii
12
13
14
15
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0 ""
1,048,576
2,097,152
3,145,728
4,194,304
,5,242,880
6,291,456
7,340,032
8,388,608
9,437,184
10,485,760
11,534,336
12,582,912
13,631,488
14,680,064
15,728,640
0123
BYTE
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
O'
65,536
131,072
196,608
262,144
327,680
393,216
458,752
524,288
589,824
655,360
720,896
786,432
851,968
917,504
983,040
4567
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
0
4,096
8,192
12,288
16,384
20,480
24,576
28,672
32,768
36,864
40,960
45,056
49,152
53,248
57,344
61,440
0123
BYTE
"0
0
I
2
3
256
512
768
4
5
6
7
8
9
A
B
C
D
E
F
1,024
1,280
1,536
1,792
2,048
2,304
2,560
2,816
3,072
3,328
3,584
3,840
4567
01"23
4567
BYTE
POWERS
OF
POWER
2n
16
16 n
256
20
160
512
24
161
16
1 024
i0
28
162
256
2 048
ii
212
163
4 096
4 096
12
216
164
65
536
8 192
13
220
. 165
1 048
576
16
384
14
224
= 166
32
768
15
228
65
536
16
131
072
262
16
777
216
167
268
435
456
232
.. 16 8
4 294
967
296
17
236
. 169
144
18
240
.. 16 I0
524
288
19
244
1611
17
1 048
576
20
248
.. 1612
2 097
152
21
252
., 1613
4 194
304
22
256
.. 1614
8 388
608
23
260
216
24
16
B-2
OF
777
1615
68
719
476
736
1 099
511
627
776
i0
592
186
044
416
ii
281
474
976
710
656
12
4 503
599
627
370
496
13
72
057
594
037
927
936
14
1 152
921
504
606
846
976
15
APPENDIX
C:
MACHINE-INSTRUCTION
FORMAT
BASIC
MACHINE
ASSEMBLER
OPERAND
FIELD FORMAT
FORMAT
APPLICABLE
INSTRUCTIONS
Operation
Code
Rl
R2
M1
R2
RI,R2
All RE instructions
BCR, SPM, BR, and
MI,R2
BCR
R1
BR
RI
SPM
SVC
(See Notes
and 9)
except!
SVC
RE
8
Operation
Code
Operation
Code
, R1
i,
8
Operation
Code
8
RX
)peration
Code
12
RI,D2(X2,B2)
R1,D2(,B2)
R1
X2
B2
D2
R1 ,$2 (_2)
RI,S2
Xl
I B1
DI
OP Code
1,6,8,
All RX
BC and
instructions
BUR
except
BUR
D2 (XI, BI)
DI(,BI)
Sl(xl)
8
)peration
Code
12
M1
X2
B2
D2
MI,D2(X2,B2)
MI,D2(,B2)
MI,S2(X2)
MI,S2
(See Notes
and 9)
BC
1,6,8,
C-I
BASIC
MACHINE
FORMAT
8
Operation
Code
8
Operat_n
Code
Operation
Code
ASSEMBLER
OPERAND
FIELD FORMAT
O... at.oo
Code
C-2
INSTRUCTIONS
RI,R3,D2(B2)
RI,R3,S2
BXH,BXLE,LM,STM,SIO,TMRS
RI,D2(B2)
R1,S2
All
RI,I
All 16 bit
instructions
DI(BI),I2
$1,12
All Sl instructions
except
those listed
for other
SI
formats
DI(Sl)
Operation
Code
APPLICABLE
Sl
(See
6,7, and
shift
instructions
immediate
LPSW,SSM,TIO,TCH,TS
Notes
2,3,
8)
PACK,UNPK,MVO,AP,
CP,DP,MP,SP,ZAP
NC,OC,XC,CLC,MVC,MVN,
MVZ,TR,TRT,ED,EDMK
Notes
for
Appendix
C:
RI,
R2,
and
floatlng-point
15;
floatlng-point
i.
D2 are
4095may
are
absolute
expressions
registers.
The general
register
numbers
are
D1
of
B1 and
Register
B2
are
numbers
X2
is
Register
an
absolute
numbers
are
to
and
0 -
R3
absolute
expressions
be specified.
absolute
are
0 -
that
expressions
that
register
0,
2,
4,
specify
expression
- 15.
I,
12,
and
13 are
absolute
The value
of I and I2 may
S1 and $2
address.
RE,
RS,
are
and
FORMAT
are
not written
o
M1
specifies
absolute
Sl
or
instruction
general
or
0 through
displacements.
that
specify
that
A value
base
specifies
registers.
expressions
be 0 - 255.
relocatable
fields
that
an
that
provlde
The value of
register.
immediate
data.
I3 may be 0 - 9.
expressions
are
index
specify
field
lengths.
An
LI and L2 expressions
can
the assembled
value will be
blank
not examined
during
instruction
in the symbolic
operand,
but are
a 4-51t
are
15.
L,
LI,
and L2 are
absolute
expressions
that
L exprees$on
can
specify
a value
of 1 - 256.
specify
a
value
of 1 - 16.
In all cases,
one less than the specified
value.
specify
numbers
and 6.
that
under
execution.
assembled
specify
BASIC
as
an
MACHINE
The fields
are
binary
zeros.
mask.
C/3-C-4
APPENDIX
D.
Hachine
This
appendix
contains
two
machine
instructions
that
extended
mnemonic
operation
The first
numeric
In the
explicit
condition
Instruction
tables
can
codes.
table
is
in alphabetic
order
by operation
code.
first
and
code
The column
follow:
table
is
implicit
set.
headings
Instruction:
the mnemonic
This
the
first
column
operation
Operation.
Codes
of
the
mnemonic
operation
represented
in assembler
order
indicated:
operand_
in
be
Mnemonic
by
instruction.
both
the
formats,
table
contains
mnemonic
program
and
the
The
the
name
second
and machine
interruptions
information
of
codes
language,
the
for
all
including
table
is
operation,
possible,
each
column
instruction
in
codes,
and
provides
associated
with
code.
Mnemonic
Operation
Code:
the
machine
instruction.
instruction.
This
This
column
contains
is written
in
Machine
Actual
This
code.
column
contains
The operation
Operation
Code:
machine
operation
most
storage
dumps
and when
displayed
mnemonics,
this
column
also
contains
which
the
extended
mnemonic
is
derived.
the
mnemonic
the
operation
the
code
operation
field
when
hexadecimal
will
appear
on the
system
the
mnemonic
control
code
of
code
coding
equivalent
in this
of
form
panel.
For
the
instruction
for
the
the
in
extended
from
0perand
Format:
This column
shows
the symbolic
format
of the
operand
fleld
in
both
explicit
and
implicit
form.
For
both
forms,
R1, It2, and R3 indicate
general
registers
in operands
one, two, and three respectively.
X2 indicates
a
general
register
used as an index register
in the second
operand.
Instructions
which
require
an index register
(X2) but
are not to be indexed
are shown with
a
0 replacing
X2.
L, LI, and L2 indicate
lengths
for either
operand,
operand
one,
or operand
two respectively.
M1 and M3 indicate
a 4-bit mask in operand
one and
three,
respectively.
I, 12, and 13 indicate
immediate
data eight bits
long (I
and I2) or four bits long (I3).
For the
indicate
For
the
indicate
explicit
a base
format,
register
implicit
a storage
DI and
D2
for operands
format,
address
D1,
B1,
in operands
indicate
one and
a
displacement
two.
Type of
instruction:
This
column
gives
instruction
(RR, RX, SI, SSI or RI).
If an
feature
or is an extended
mnemonic,
this is
replaced
by
and
BI
$1
and
and
B2
$2 which
the
basic
machine
format
of
the
instruction
is included
in a special
also indicated.
D-I
Prosram
interruptions
Addressing,
feature
Interruptions
Possible:
This
column
indicates
for
this
instruction.
The
abbreviations
S - Specification,
OV - Overflow,
P - Protectlon,
is
not
installed),
and Other
- other
interruptions
The
type
Point.
of
Cond!tlon
indicated
'0-2
overflowIs
indicated
Code
Set:
The condition
in this column.
(See
by:
D -
Decimal,
codes
set
as
legend
following
E -
the
possible
program
used
are:
A
Op - Operation
(if
which
are
listed.
Exponent,
result
of
the table.)
this
or
instruction
Fixed
are
Instruction
Add
Add
Add
Mnemonic
Machine
Operation
Code
Operation
Code
5A
1A
4A
5E
RI,D2(X2,B2)
RI,R2
RI,D2(X2,B2)
RI,D2(X2,B2)
Operand
Format
Implicit
Explicit
Add
Logical
A
AR
AH
AL
Add
Logical
ALR
1E
RI,R2
And
Logical
54
NC
NR
NI
D4
14
94
DI(L,B1),D2(B2)
R1,R2
DI(BI),I2
Link
Link
BAL
BALR
45
05
RI,D2(X2,B2)
RI,R2
or RI,D2(,B2)
RI,S2(X2)
or
47
07
46
06
MI,S2(X2)
or MI,S2
RI,S2(X2)
or
47 (BC
8)
MI,D2(X2,B2)
or MI,D2(,B2)
M1,R2
R1,D2(X2,B2)
or RI,D2(,B2)
RI,R2
D2(X2,B2)
or D2(,B2)
S2(X2)
or
$2
2)
D2(X2,B2)
$2(X2)
or
$2
Halfword
And Logical
And Logical
And Logical
Immediate
or RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or RI,D2(,B2)
or RI,D2(,B2)
RI,S2(X2)
RI,S2(X2)
or
or
RI,S2
RI,S2
or
RI,S2(X2)
or
RI,S2
RI,D2 (,B2)
er
!SI(L),S2
SI,$2
Sl,12
Branch
Branch
and
and
Branch
on
Condition
Branch
Branch
Branch
On
on
on
Condition
Count
Count
Branch
on Equal
BC
BCR
BCT
BCTR
BE
Branch
On High
BH
47 (BC
Branch
in
Index
BXH
86
RI,R3,D2(B2)
RI,R3,S2
High
Branch
on
Index
RI,R3,D2(B2)
RI,R3,S2
or D2(,B2)
BXLE
87
Low or Equal
Branch
on Low
BL
47 (BC
4)
D2(X2,B2)
or D2(,B2)
$2(X2)
or
$2
Branch
if Mixed
BM
47 (BC
4)
D2(X2,B2)
or D2(,B2)
$2(X2)
or
$2
Branch
on
Minus
BM
47 (BC
4)
D2(X2,B2)
or
D2(,B2)
$2(X2)
or
$2
Branch
On
Not
Equal
BNE
47 (BC
7)
D2(X2,B2)
or
D2(,B2)
S2(X2)
or
S2
Branch
on
Not
High
BNH
47 (BC
13)
D2(X2,B2)
or
D2(,B2)
S2(X2)
or
S2
Branch
on
Not
Low
BNL
47 (BC
Ii)
D2(X2,B2)
or D2(,B2)
$2(X2)
or
$2
Branch
on
Not
Minus
BNM
47(BC
lt)
D2(X2,B2)
or
D2(,B2)
$2(X2)
or
$2
Branch
on
Not
Ones
BNO
47(BC
14)
D2(X2,B2)
or D2(,B2)
$2(X2)
or
$2
RI,S2
RI,S2
D-3
PROGRAM
INTERRUPTION
INSTRUCTION
TYPE OF
INSTRUCTION
Add
Add
Add Halfword
Add Logical
RX
RR
RX
RX
Add Logical
RR
And Logical
RX
And Logical
And Logical
And Logical
Immediate
SS
RR
SI
Branch
Llnk
Link
RX
RR
N
N
N
N
N
N
Branch
and
and
Branch
Branch
Branch
Branch
on Condition
on Condition
on Count
on Count
RX
RR
RX
RR
Branch
on
Equal
iN
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
Branch
on
High
Branch
Branch
on
on
Index
Index
RS
RS
N
N
N
N
N
N
N
N
or Equal
Branch
on Low
RX,Ext.Mnemonic
Branch
if Mixed
RX,Ext.Mnemonic
Branch
on Minus
RX,Ext.Mnemonic
Branch
on
Not
Equal
RX,Ext.Mnemonic
Branch
on
Not
Hlgh
RX,Ext.Mnemonic
IN
Branch
on Not
Low
RX,Ext.Mnemonic
Branch
on
Not
Minus
RX,Ext.Mnemonic
iN
Branch
on
Not
Ones
RX,Ext.Mnemonic
D-4
High
Low
POSSIBLE
OV P
OP
F
iF
X
X
X
X
OTHER
00
CONDITION
01
Sum-O
Sum-O
Sum-O
'Sum-O
Sum-O
ix Ix
CODE SET
10
Sum 0
Sum 0
Sum 0
H SumOH
H Sum-O
Sum 0
Sum 0
Sum 0
Sum0
H Sum-0
11
Overflow
Overflow
Overflow
1 Sum O I
1 Sum0
K
K
K
K
Mnemonic
Instruction
'Machine
Operand
Operation
Code
Operation
Code
Explicit
Format
Implicit
Branch
on Not
Plus
BNP
47(BC
13)
D2(X2,B2)
or
D2(,B2)
S2(X2)
or
S2
Branch
on Not
Zeros
BNZ
47(BC 7)
D2(X2,B2)
or
D2(,B2)
$2(X2)
or
S2
Branch
if
Ones
BO
47(BC I)
D2(X2,B2)
or D21(,-B2)
S2(X2)
or
S2
Branch
on
Overflow
BO
47(BC i)
D2(X2,B2)
or
D2(,B2)
$2(X2)
or
$2
Branch
on
Plus
BP
47(BC
D2(X2,B2)
or D2(,B2)
$2(X2)
or
$2
Branch
if
Zeros
BZ
+7(BC 8)
D2(X2,B2)
or
D2(,B2)
$2(X2)
or
$2
Branch
on
Zero
BZ
47(BCS)
D2(X2,B2)
or
D2(,B2)
$2(X2)
or
$2
Branch
Unconditional
Branch
Unconditional
47(BC 15)
D2(X2,B2)
or D2(,B2)
$2(X2)
or
$2
BR
07 (BCR
R2
Compare
Compare
Compare
Compare
Compare
Algebraic
Algebraic
Halfword
Logical
Logical
C
CR
CH
CL
CLC
59
19
49
55
D5
RI,D2(X2,B2)
Compare
Logical
CLR
15
RI,R2
Compare
Logical
CLi_
95
DI(BI),I2
CVB
CVD
D
DR
4F
4E
5D
ID
RI,D2(X2,B2)
RI,D2(X2,B2)
RI,D2(X2,B2)
RI,R2
or RI,D2(,B2)
or RI,D2(,B2)
or RI,D2(,B2)
RI,S2(X2)
RI,S2(X2)
RI,S2(X2)
or RI,S2
or RI,S2
or RI,S2
57
RI,D2(X2,B2)
or
RI,S2(X2)
or
XC
XR
Xll
D7
17
97
D1 (L,BI) ,DI(B2)
R1 ,R2
D1 (BI), 12
EX
44
RI,D2(X2,B2)
2)
15)
R1,D2(,B2)
RI,S2(X2)
RI,R2
RI,D2(X2,B2)
or RI,D2(,B2)
RI,D2(X2,B2)
or RI,D2(,B2)
DI(L,B1) ,D2 (B2)
or
RI,S2(X2)
RI,S2(X2)
SI(L),S2
or
RI,S2
or RI,S2
or RI,S2
or Si,S2
Sl,12
Immediatei
Convert
Convert
Divide
Divide
Exclusive
to
to
Binary
Decimal
Or
Exclusive
Or
Exclusive
Or
Exclusive
Or
Immedlatei
Execute
or
RI,D2(,B2)
SI(L),S2
or
RI,S2
Sl,S2
SI,12
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
D-5
,TYPE OF
INSTRUCTION
INSTRUCTION
PROGRAM
INTzKRUPTION
POSSIBLE
A
S
OV P
OP OTHER
CONDITION
"
01
O0
CODE SET
i0
"
11
Plus
RX,Ext.Mnemonic
Zeros
EX,Ext.Mnemonic
'N
if Ones
RX,Ext.Mnemonic
Branch
on Overflow
RX,Ext.Mnemonlc
Branch
on
Plus
RX,Ext.Menmonic
Branch
if
Zeros
RXtExt.Mnemonic
Branch
on
Zero
RXpExt.Menmonlc
Branch
Branch
Unconditional
Unconditional
RX,Ext.Mnemonlc
RR,Ext.Mnemonic
N
N
N
N
N
N
N
N
AA
AA
AA
AA
BB
BB
BB
BB
Branch
on
Not
Branch
on Not
Branch
Compare
Compare
Algebraic
Algebraic
RX
RR
Compare
Compare
Halfword
Logical
RX
RX
X
X
X
X
Z
Z
Z
Z
Compare
Logical
SS
AA
BB
Compare
Logical
RR
AA
BB
Compare
Logical
Immediate
SI
AA
BB
RX
RX
RX
RR
X
X
X
X
X
X
X
iN
N
N
N
N
N
N
N
N
N
N
N
N
N
N
Or
RX
Exclusive
Or
Exclusive
Or
Exclusive
Or
Immediate
Execute
SS
RR
Sl
RX
Convert
Convert
Divide
Divide
Exclusive
D-6
to Binary
to Decimal
X
X
F
F
K
X
X
X
X
DataFN
J
J
K
(May
K
K
be
[nstructlon)
Instruction
Insert
Character
Load
Mnemonic
Machl.=
Operation
Code
Operation
Code
Explicit
IC
43
or
R1,D2
(,B2)
RI,S2(X2)
or
RI,S2
58
or
RI,D2 (,B2)
RI,S2(X2)
or
RI,S2
LR
LA
LTR
18
41
12
RI,R2
RI,D2(X2,B2)
RI,R2
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
R1,S2(X2)
or
RI,S2
Operand
Format
Implicit
Load
Load
Address
Load
and
Load
Complement
LCR
13
RI ,R2
Load
Halfword
LH
48
RI,D2(X2,B2)
Load
Load
Multiple
Negative
LM
LNR
98
Ii
RI,R3,D2
RI,R2
Load
Positive
Load
PSW
LPR
LPSW
10
82
RI ,R2
DI(BI)
S1
Move
Move
Move
Move
Characters
Immediate
Numerics
with Offset
MVC
MVI
MVN
MVO
D2
92
D1
F1
DI (L,B1),D2
(B2)
DI(BI) ,12
D1 (L, B1 ( ,D2 (B2)
DI, (L1,B1)
ND2 (L_ ,B2)
iSI(L),S2
or
SI,12
SI(L),S2
or
SI(LI),S2(L2)
Move
Zones
MVZ
M
MR
MH
D3
5C
IC
4C
DI(L,B1)
,D2 (B2)
R1,D2(X2,B2)
or
RI,R2
RI,D2(X2,B2)
or
R1,D2(,B2)
SI(L),S2
RI,S2(X2)
RI,D2(,B2)
RI,S2(X2)
or
$2(X2)
$2
Test
(B2)
RI,R3,S2
Multlply
Multiply
Multlply
No
No
Or
Or
Or
Or
Halfword
Operation
Operation
Logical
Logical
Logical
Logical
Immediate
/NOP
47 (BC
,NOPR
0
OC
OR
Ol
07 (BC 0)i
56
D6
16
96
0)
D2(X2,B2)
R2
or
D2(,B2)
RI,D2(X2,B2)
or
D1 (L,B1)
,D2(B2)
R1, R2
Vl (BI), 12
Packl
PACK
F2
D1 (L1,B1)
Set Program
Mask
Set Storage
Key
Set System
Mask
Shift
Left Double
SPM
SSK
SSM
SLDA
04
08
80
8F
R1
R1,R2
DI(B1)
RI,D2(B2)
RI,D2(,B2)
or
RI,S2(X2)
SI(L),S2
Sl,S2
SI,$2
or Si,S2
or $1,$2
or RI,S2
RI,S2
or RI,S2
or iSI,S2
Si,12
SI(LI),S2(L2)
or
Sl,S_
Sl
RI,S2
Algebraic_
D-7
PROGRAM
INSTRUCTION
Character
Insert
Load
TYPE OF
INSTRUCTION
RX
RX
_X
X
Load
Load
Load
Address
and Test
RR
RX
RR
Load
Load
Complement
Halfword
RR
RX
Load
Load
Multiple
Negative
RS
RR
Load
Load
Positive
PSW
Move
Move
Move
Move
Move
RR
SI
Characters
Immediate
Numerics
with Offset
SS
Sl
SS
SS
X
X
X
X
Zones
SS
RX
RR
RX
X
X
Halfword
RX,Ext.Mnemonic
RR,Ext.Mnemonic
RX
SS
RR
SI
Operation
Operation
Logical
Logical
Logical
Logical
Immediate
Pack
Program
Mask
Set Storage
Key
Set System
Mask
Shift
Left Double
Algebraic
D-8
OTHER
F
X
No
No
Or
Or
Or
Or
Set
POSSIBLE
OV P
OP
Multiply
Multiply
Multiply
INTERRUPTION
X
X
RR
RR
SI
RS
X
X
SET
I0
ii
N
N
N
N
N
N
N
N
N
N
J
N
N
L
N
N
M
N
N
P
N
L
N
M
N
0
N
N
J
N
L
X
X
X
X
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
K
N
N
N
N
N
N
J
J
J
J
K
K
K
RR
N
RR
N
N
J
N
L
J
A
X
X
iX
SS
CODE
CONDITION
00
01
X
X
X
X
X
X
A
A
N
RR
N
N
M
RR
N
N
0
Mnemonic
Instruction
Shift
Left
Double
Logical
Shift
Left Single
Algebraic
Shift
Left Single
Loglcal
Shift Right
Double
iMachine
Operand
Fornmt
....
Operation
Code
Operation
Code
Explicit
Implicit
SLDL
8D
R1 ,D2 (B2)
RI,S2
SLA
8B
R1,D2(B2)
RI,S2
SLL
89
El, D2 (B2)
RI,S2
SRDA
8E
R1 ,D2 (B2)
Rl,S2
Algebraic
Shift Right
Logical
Double
SRDL
8C
R1,D2 (B2)
RI,S2
Shift
Right
Single
SRA
8A
RI,D21(B2)
RI,S2
Algebraic
Shift
Right
Logical
Single
SRL
88
RI ,D2 (B2)
RI,S2
RI_R3,S2
Start
I/O
Store
Store
Character
,SIO
Store
Halfword
Store
Multiple
,19c
ST
STC
50
42
RI,D2(X2,B2)
R1,D2(X2,B2)
or R1,D2(,B2)
or RI,D2(,B2)
R1,S2(X2)
R1,D2(X2)
or R1,$2
or R1,$2
STH
STM
40
90
RI,D2(X2,B2)
RI ,R2 ,D2 (B2)
or
RI,S2(X2)
RI,R2,S2
or
R1,$2
R1,D2(X2)
RI,D2(X2,B2)
RI,S2(X2)
or
RI,S2
or RI,D2(,B2)
or RI,D2(,B2)
Rl,S2
RI,S2
or
or
RI,S2
RI,S2
RI,S2(X2)
or RI,S2
RI,S2(X2)
or
S2(X2)
S2
RI,D%('B2)
Subtract
Subtract
Subtract
Halfword
S
SR
SH
Subtract
Subtract
Logical
Logical
SL
SLR
5B
IB
4B
5F
1F
AD
'ADR
AHI
6A
2A
BA
RI ,D2 (X2,B2)
RI, R2
RI,12
or
R1,D2
AS
ASI
ASR
53
RI,D2(X2,B2)
RI,12
RI,R3
or
RI,D2(,B2)
AA
CA
BU
BUR
73
CE
D2(X2,B2)
R2
Add
Double
Add
Add
Double
Register
Halfword
Immediate
Add Short
Add
Short
Immediate
Add
Short
Register
Branch
Branch
Unconditional
Unconditional
or
RI ,R2
R1,D2(X2,B2)
RI,D2(X2,B2)
RI ,R2
or
D2(,B2)
(,B2)
(X2)
(X2)
or
RI,S2
Register
D-9
PROGRAM
TYPE OF
INSTRUCTION
INSTRUCTION
Shift
Left
Logical
Shift Left
Algebraic
Shift
Left
Logical
INTERRUPT
POSSIBLE
S
OV P
0P
IO-NS I
OTHER
00
CONDITION
01
CODE
I0
SET
ii
Double
RS
Single
RS
Single
RS
Shift
Right
Algebraic
Shift
Right
Logical
Double
RS
Double
RS
Shift Right
Algebraic
Shift
Right
Logical
Single
RS
Single
RS
MM
EE
Start
I/0
Store
RS
RX
Store
Character
RX
Store
Halfword
RX
Store
Multiple
RS
RX
RR
RX
RX
_RR
X
X
X
X
F
F
'V
V
X
X
Y
Y
0
0
W,H
W,H
V,I
V,I
W,I
W,I
RX
RR
RI
X
X
F
F
F
Sums0
Sum-0
Sum-0
Sum<0
Sum<0
Sum<0
Sum_
Sum>0
S_
Overflow
Overflow
Overflow
RX
RI
RR
,X
F
F
F
Sum-0
Sum=0
Sum=0
Sum<0
Sum<0
Sum<0
Sum>0
Sum>0
Sum>O
Overflow
Overflow
Overflow
,N
:N
N
N
N
N
N
N
Subtract
i Subtract
Subtract
Halfword
Subtract
Subtract
Logical
Logical
Add
Double
Add
Add
Double
Register
Halfword
Immediate
Add Short
Add Short
Immediate
Add
Short
Register
Branch
Unconditional
Branch
Unconditional
Register
D-10
RX
RR
Mnemonic
Machine
Instruction
Operation
Code
Operation
Code
Compare
Compare
CD
CDR
69
29
RI,D2(X2,B2)
CHI
B9
Rl,I2
Double
Double
Register
Compare
Halfword
Immediate
Op.erand
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or
R1,D2(,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
or
RI,S2
RI,R2
Logical
CLS
65
RI,D2(X2,B2)
Compare
Shore
Logical
Immediate
CLSI
B5
RI,12
CLSR
C5
RI,R2
CS
CSI
61
A9
RI,D2(X2,B2)
RI,12
CSR
C9
R1,R2
DSI
4D
E0
RI,D2(X2,B2)
R1,12
DSR
CD
RI ,R2
LAS
LCDR
51
23
RI,D2(X2,B2)
LCSR
C3
RI,R2
LD
LDR
68
RI,D2(X2,B2)
LFSR
28
0B
RI,R2
RI,R2
LHI
B8
RI,12
LHR
DO
RI,R2
LNSR
Cl
RI,R2
LPSR
CO
RI,R2
LS
74
RI,D2(X2,B2)
Compare
Short
Register
Divide
Short
Divide
Short
Immediate
Divide
Short
Implicit
Explicit
Compare
Short
Compare
Logical
Short
Register
Compare
Short
Compare
Short
Immediate
Format
Register
Load
Address
Short
Load Complement
Double
Register
Load Complement
Short Register
Load
Double
Load Double_egister
Load Full to
Short
Register
Load Halfword
Immediate
Load Halfword
Register
Load Negative
Short
Register
Load Positive
Short Register
Load Short
RI,R2
RI,S2(X2)
D-II
TYPE OF
INSTRUCTION
INSTRUCTION
Compare
Double
Compare
Double
Register
Compare
Halfword
Immediate
RX
RR
Compare
Short
Logical
RX
Compare
Short
Logical
Immediate
PROGRAM
INTERRUPTIONS
POSSIBLE
A
S
OV P
OP oTHER
X
X
CONDITION
00
01
CODE SET
I0
Ii
AA
Z
BB
AA
BB
AA
BB
AA
BB
RI
AA
BB
Compare
Logical
Short
Register
Compare
Short
Compare
Short
Immediate
RR
AA
BB
Z
Z
AA
AA
BB
BB
Compare
Short
Register
RX
AA
BB
Divide
Short
Divide
Short
Immediate
Divide
Short
RX
RI
N
N
N
N
N
N
N
N
N
J
N
L
N
M
IN
0
N
J
N
L
N
M
N
O
RR
Short
RR
Short
RR
RI
RX
RI
RR
Register
Load
Address
Short
Load Complement
Double
Register
Load Complement
Short Register
Load
Double
Load
Load
Double
Register
Full to Short
Register
Load Halfword
Immediate
Load Halfword
Register
Load Negative
Register
Loae Positive
Register!
Load Short
D-12
RX
RR
RR
RX
RR
RR
X
X
F
RI
RX
F
X
J
N
-a
Mnemonic
_Machine
Operaud
e'
Operation
Code
Operaton
Code
LSi
LSR
LT
LTS
LTSR
A8
C8
62
52
C2
Rl,I2
RI,R2
R1,D2(X2,B2)
R1,D2(X2,B2)
Multiple
Halfword
Immediate
MHI
BC
R1,R2
Multiply
Short
Multiply
Short
Immediate
Multiply
Short
MS
71
R1,D2(X2,B2)
MSI
eO
Rl,I2
MSR
CC
RI,R2
NRM
CF
Rl,R2
NS
NSI
NSR
64
B4
C4
Instruction
Load
Load
Load
Load
Load
Short
Immediate
Short
Register
and Test
and Test Short
and Test Short
Format
Implicit
_licit
or R1,D2(,B2)
or R1,D2(,B2)
RI,S2(X2)
RI,S2(X2)
or RI,S2
or RI,S2
or R1,D2(,B2)
R1,S2(X2)
or
RI,S2
R1,D2(X2,B2)
Rl,12
R1,R2
or
R1,D2(,B2)
R1,S2(X2)
or
RI,S2
66
A6
C6
RI,D2(X2,B2)
or
RI,ID2(_),
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
Rl,R2
Register
Register
Normalize
And
And
Short
Short
Immediate
And
Short
Register
Or
Or
Short
Short
Immediate
Or
Short
Register
OS
OSl
OSR
Double
Double
SD
SDR
6B
2B
RI,D2(X2,B2)
SHI
BB
RI,I2
SLAS
A3
RI,D2(B2)
RI,S2
Logical
SLLS
AI
R1 ,D2 (B2)
RI,S2
Shift
Right
Arithmetic
Short
SRAS
A2
RI,D2(B2)
RI,S2
Shift
Right Logical
Short
Subtract
Sort
Subtract
Short
Immediate
Subtract
Short
SRLS
A0
RI,D2(B2)
RI,S2
SS
SSI
72
AB
RI,D2(X2,B2)
Rl,I2
SSR
CB
RI,R2
Subtract
Subtract
Register
Subtract
Halfword
Immediate
Shift Left
Arithmetic
Shift
Left
Short
RI,12
RI,R2
RI,R2
Short
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
Register
D-13
PROGRAM
TYPE
INSTRUCTION
OF
INSTRUCTION
Load
Short
Immediate
Load
Load
Load
Load
Short Register
and Test
and Test Short
and Test Short
RI
RR
RX
RX
RR
POSSIBLE
OV_P
0P
INTERRUPTIONS'
9THER
00
CONDITION
01
CODE
i0
SET
ii
N
N
J
J
J
N
N
L
L
L
N
N
M
M
M
N
N
N
N
N
N
N
N
N
N
N
Register
Multiply
Halfword
Immediate
RI
Multiply
Short
Multiply
Short
Immediate
RX
RI
Multiple
Short
Register
RR
RR
_ Normalize
I
RX
And
And
Short
Short
Immediate
And
Short
Register
Short
Short
Immediate
Or
Short
Register
Subtract
Subtract
Double
Double
Register
Subtract
Halfword
Immediate
Shift
Left
Arithmetic
Shift
Left
Shift
Right
Logical
Short
Subtract
Short
Subtract
Short
Immediate
Subtract
Short
D-14
J
J
J
K
K
K
J
J
J
K
K
K
X
X
F
F
V
V
X
X
Y
Y
0
0
RI
RS
RS
RS
RS
,.,V
V
:X
X
Y
Y
0
0
RI
RR
IRI
RR
RX
RR
Short
Logical
Short
Shift
Right
Arithmetic
Short
Register
RX
Or
Or
RX
RI
RX
!X
'F
i Instruction
Store
Double
Mnemonic
Code
Code
Machine
Code
Code
Explicit
STD
60
RI,D2(X2,B2)
or
RIiD2 (,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
RI,S2(X2)
or
RI,S2
or
RI,D2(,B2)
RI,S2(X2)
or RI,S2
Operand
Exclusive
or
Exclusive
or
Immediate!
Short
Short
XS
XSI
63
A7
RI,D2(X2,B2)
R1,I2
Exclusive
Format
""
Implicit
Short
XSR
C7
R1)R2
Re_isterj
Test Bits
Test Bits Immediate
TB
TBI
75
AE
R1,D2(X2,B2)
Rl,I2
Supervisor
Call
Test and Set
SVC
TS
OA
93
I
DI(BI)
$1
TM
TMRS
TR
TRT
91
A4
DC
DD
DI (BI), I2
RI,R3,D2 (B2)
D1 (L,B1)
,D2 (B2)
DI(L,B1),D2(B2)
SI,12
RI,R3,S2
SI(L),S2
SI(L),S2
Unpack
UNPK
F3
DI(L1,B1),D2(L2,B2)
SI(LI),S2(L2)
or
or
or
SI,S2
SI,$2
or
SI,S2
D-15
PROGRAM
INSTRUCTION
I_PE OF
INSTRUCTION
Store Double
RX
Exclusive Or Short
Exclusive Or Short
Immediate
Exclusive Or Short
Register
Test Bits
Test Bits Immediate
RX
RI
Supervisor Call
Test and Set
RR
SI
SI
RS
SS
SS
X
X
X
X
Unpack
SS
D-16
INTERRUPTIONS
PpSSIBLE
0V P
RX
RX
RI
X
X
OP
0TRER
CONDITION
i00
01
J
J
K
K
UU
UU
W
W
N
SS
N
TT
UU
N
N
PP
VV
N
N
NN
CODE SET
i0
ii
W
W
N
N
N
00
WW
N
N
Program
Under
Interruptions
Ov:
D -
Possible
Decimal
E = Exponent
F - Fixed
Point
Other:
Under
Condition
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
AA
BB
CC
DD
EE
FF
GG
HH
II
Privileged
B
C
D
Exponent
Underflow
Signlflcance
Decimal
Divide
E
F
G
Floating
Point Divide
Fixed
Point Divide
Execute
GA
Monitoring
Code
Operation
Set
No Carry
Carry
Result.=
Result
Result
Result
0
is Not Equal
to Zero
is
less
than
Zero
is Greater
Than Zero
Not Changed
Overflow
Result
Result
Result
Exponent
Exponent
Fraction
Result
Field
Result
Field
Result
Field
Difference
Difference
Difference
Difference
Underflows
Overflows
- 0
Equals
Zero
is Less Than Zero
is Greater
Than Zero
0
First Operand
First Operand
First Operand
CSW Stored
Equals
Second
Operand
is Less Than Second
Operand
is Greater
Than Second
Operand
Channel
and Subchannel
not Working
Channel
or Subchannel
Busy
Channel
Operating
in Burst Mode
Burst Operation
Terminated
Channel
Not Operational
Interruption
Pending
in Channel
D-17
Program
Interruptions
JJ
KK
LL
NN
O0
PP
QQ
RR
SS
TT
UU
W
NN
XX
YY
ZZ
AAA
AAB
AAC
AAD
AAE
AAF
AAG
AAH
AAI
AAJ
AAE
AAL
AAM
AAN
AA0
AAP
AAQ
AAR
AAS
AAT
AAU
AAV
D-18
Channel
Possible
(Continued)
Available
Not Operational
Available
I/0 Operation
Initiated
and
Nonzero
Function
Byte
Found
Exhausted
Channel
Before
Proceeding
With
the
First
Operand
Last
Function
Byte
is Nonzero
All
Function
Bytes
Are
Zero
Set
According
to Bits
34 and
35 of
the
New PSW Loaded
Set
According
to Bits
2 and 3 of
the
Register
Specified
Leftmost
Bit
of
Byte
Specified
- 0
Leftmost
Bit
of Byte
Specified
- 1
Selected
Bits Are All Zeros;
Mask is All Zeros
Selected
Bits Are Mixed
(zeros
and ones)
Selected
Bits Are All Ones
Selected
Bytes Are Equal,
or mask is zero
Selected
field of first operand
is low
Selected
fleld
of first operand
is high
First-operand
and second-operand
counts
are
First operand
count is lower
First operand
count is higher
No movement
because
of destructive
overlap
Clock value set
Clock value secure
Clock not operational
Channel
ID correctly
stored
Channel
activity
prohibited
Clock value is valid
Clock value not necessarily
during
ID
valid
Channel
Working
with Another
Device
Subchannel
busy or interruption
pending
Clock in error state
Segment-or
Page-Table
Length
Violation
Page-Table
Entry Invalid
(1-Bit One)
Reference
Bit Zero, Change
Bit Zero
Reference
Bit Zero, Change
Bit One
Reference
Bit One, Change
Bit Zero
Reference
Bit One, Change
Bit One
Segment
Table
Entry Invalid
(1-Bit One)
Translation
Available
equal
its Execution
Field
is
by
R1
RR Format
OPERATION
CODE
00
01
02
03
04
05
06
07
08
09
OA
0B
0C
NAME
MNEMONIC
Set Program
Mask
Branch
and Link
Branch
on Count
Branch
on Condition
Set
Supervisor
Load Full
SPM
BALM
BCTR
BCR
SSK
Key
Storage
Call
to Short
REMARKS
SVC
Register
LFSR
0E
OF
i0
ii
12
13
14
15
16
17
18
19
IA
'IB
iC
ID
IE
IF
20
21
22
23
Load
Positive
Load
Load
Negative
and Test
Load
AND
Complement
LPR
LNR
LTR
LCR
NR
CLR
OR
XR
LR
CR
AR
SR
MR
DR
ALR
SLR
Compare
Loglcal
OR
Exclusive
OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract
Logical
Load Complement
Register
Double
LCDR
24
25
D-19
RR Format
OPERATION
CODE
26
27
28
29
2A
2B
2C
2D
2E
2F
NAME
Load Double
Register
Compare
Double
Register
Add Double
Register
Subtract
Double
Register
MNEMONIC
LDR
CDR
ADR
SDR
30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F
RX Format
40
41
42
43
44
45
46
47
48
D-20
Store Halfword
Load Address
Store Character
Insert
Character
Execute
Branch
and Link
Branch
on Count
Branch
on Condition
Load
Halfword
STH
LA
STC
IC
EX
BAL
BCT
LH
REMARKS
P_
Format
OPERATION
CODE
NAME
MNEMONIC
CH
AH
SH
MH
DSX
CVD
CVB
49
4A
4B
4C
4D
4E
4F
Compare
Halfword
Add Halfword
Subtract
Halfword
50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F
Store
Load Address
Short
Load and Test Short
Add Short
AND
60
61
62
63
64
Store
65
66
67
68
69
6A
6B
6C
6D
6E
6F
Compare
Logical
Or Short
Multiply
Divide
Convert
Halfword
Short
to Decimal
Convert
to
Binary
Compare
Logical
OR
Exclusive
OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract
Logical
Double
Compare
Short
Load and Test
Exclusive
Or Short
And Short
Load
Double
Compare
Double
Add Double
Subtract
Double
REMARKS
Short
ST
LAg
LTS
AS
N
CL
O
X
L
C
A
S
M
D
AL
SL
SD
CS
LT
XS
NS
CLS
OS
LD
CD
AD
SD
D-21
KX Format
OPERATION
CODE
70
71
72
73 (X)
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F
RSj
80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F
90
91
92
93
D-22
MNEMONIC
NAME
Multiply
Short
Subtract
Short
Branch Unconditional
Load Short
Test
Bits
SI t and
MS
SS
BU
LS
TB
S Format
Set
System
Mask
SSM
Load PSW
Diagnose
LPSW
Branch
Branch
Shift
Shift
Shift
Shift
Shift
Shift
Shift
Shift
BXH
BXLE
SRL
SLL
SPA
SLA
SRDL
SLDL
SRDA
SLDA
Store
Test
Move
Test
on Index High
on Index
Low or Equal
Right
Single
Logical
Left Single Logical
Right
Single
Left
Single
Right
Double
Logical
LeftlDouble
Logical
Right
Double
Left Double
Multiple
Under Mask
(Immediate)
and Set
STM
TM
MVI
TS
REMARKS
_nd
Format
OPERATION
CODE
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F
AO
A1
&2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
MNEMONIC
NAME
AND
REMARKS
(Immediate)
Compare
Logical
(Immediate)
OR (Immediate)
Exclusive
OR (Immediate)
Load
Multiple
Start
I/O
Shift
Shift
Shift
Shift
Timer
Right Logical
Short
Left Logical
Short
Right Arithmetic
Short
Left Arithmetic
Short
Read and Set
_TC
O.ly
OR Short Immediate
Exclusive
or Short Immediate
Load Short Immediate
Compare
Short Immediate
Add Short Immediate
Subtract
Short Immediate
Test
Bits
BO
B1
B2
Divide
B3
B4
B5
B6
B7
B8
B9
BA
Multiply
And
Immediate
Short
Short
Short
I Compare
Immediate
Immediate
Immediate
Logical
Short
Immediat_
I Load Halfword
Immediate
[ Compare
Halfword
Immediate
I Add
Halfword
Immediate
D-23
RS
SI
and
S Format
OPERATION
CODE
NAME
MNEMONIC
i
BB
BC
BD
BE
BF
SS
Subtract
llalfword
Immediate
Multiply
llalfword
Immediate
Format
C0
CI
C2
C3
C4
Load Positive
Short Register
Load Negative
Short Register
Load and Test Short Register
Load Complement
Short Register
And Short Register
CS(RR)
C.ompars Logical
Short Register
Or Short Register
Exclusive
or Short Register
Load Short Register
Compare
Short Register
Add Short Register
Subtract
Short Register
Multiply
Short Register
Divide
Short Register
Branch Uncondltlonal
Register
Normallze
C6
C7
C8
C9
CA(RR)
CB
CC
CD
CE(R)
CF
DO
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
D-24
SHI
MHI
LPSR
LNSR
LTSR
LCSR
ASR
CLSR
OSR
XSR
LSR
CSR
ASR
SSR
MSR
DSR
BUR
NRM
Compare
Logical
(characters)
OR (Characters)
Exclusive
OR (Characters)
LHR
MVN
MVC
MVZ
NC
CLC
OC
XC
Translate
Translate
TR
TRT
LoadHalfword
Move Numerics
Move
Move
AND
Register
(Characters)
Zones
(Characters)
and
Test
REMARKS
SS Format
OPERATION
CODE
NAME
MNEMONIC
DF
EO
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF
FO
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF
Move
Pack
Unpack
with
Offset
MVO
PACK
UNPK
D-25/D-26
APPENDIX
Name
Operation
not
be
E:
ASSEMBLER
INSTRUCTIONS
0perand
Entry
An
present
Entry
arithmetic
SETA
expresslo_
ACTR
Must
AGO
A sequence
symbol
or
not
present
A sequence
AIF
sequence
symbol
or
not
present
A logical
expression
theses,
immediately
sequence
symbol
ANOP
sequence
symbol
CNOP
sequence
symbol
or not
COM
A sequence
symbol
or
Will
not
be
symbol
taken
present
_o
_solute
acomma
present
Will
be
as
enclosed
followed
a remark
expressions,
taken
in parenby a
separated
as
a remark
by
m--_mmmn_
be
A symbol
COPY
Must
not
present
CSECT
Any
symbol
or
not
present
Will
be
taken
as
a remark
CXD*
Any
symbol
or
not
present
Will
be
taken
as
a remark
DC
Any
symbol
or
not
present
One
or more
operands,
separated
by
CO_Una8
DROP
A sequence
symbol
or
not
present
One
to sixteen
separated
DS
Any
symbol
or
not
One
present
by
or more
absolute
expressions,
commas
operands,
separated
by
connas
DSECT
A variable
ordinary
DXD*
symbol
or
Will
an
be
taken
as
a remark
symbol
One
A symbol
or more
operands,
separated
by
commas
EJECT
A sequence
symbol
or
not
present
Will
be
taken
as
a remark
E-1
Name
Operation
Operand
Entry
Entry
END
A sequence
symbol
or
not
present
A relocatable
or
ENTRY
sequence
symbol
or
not
present
not
One
or
more
separated
A variable
symbol
ordinary
EXTRN
or
An
an
expression
present
relocatable
by
absoluteor
relocatable
A sequence
Must
expression
symbol
symbol
or not
present
One
or
more
separated
GBLA
symbols,
commas
not
be
relocatable
by
symbols,
commas
present
PlllllllllN
GBLB
Must
not
be
present
by
,commas
GBLC
Must
not
be
present
ICTL
Must
not
be
present
One
by
* Assembler
F
2
SET symbols
E-2
to
three
commas
only
may
be
defined
as
subacrlpted
SET
symbols.
decimal
values,
separated
Operation
Entry
Name
Operand
Entry
Entry
ISEQ
Must
not
be
present
Two decimal
comma
LCLA
Must
not
be
present
LCLB
Must
not
be
present
One or more
variable
symbols
to be used
as
SET symbols,
commas 2
LCLC
Must
LTORG
Any
not
be
One or more
by commas 2
present
symbol
values,
or not
separated
variable
be
taken
as
Will
be
taken
as a remark
present
Will
be
taken
as
a remark
present
Will
be
taken
as
that
separated
symbols
Will
present
by
are
by
separated
a remark
.row
MACRO I
Must
MEND I
A sequence
symbol
or
MEXIT I
symbol
or not
MNOTE I
A sequence
symbol
or
An
not
be
sequence
present
nor
symbol,
a variable
not present
ordinary
or
operation
code
A severity
code,
followed
by a
followed
by any combination
of
ters enclosed
in apostrophes
extended
mnemonic
Blank
ORG
sequence
symbol
or
not
present
Sequence
symbol
or not
present
One
_ay
only
2SET
symbols
3See
Section
*Assembler
be
used
may
as
be
5 for
F
part
defined
the
of
comma,
charac-
Amachine
instruction
mnemonic
code,
an
extended
mnemonic
code, or an operation
code defined
by a previous
OPSYN
instruction
symbol
A machine
remark
relocatable
to
three
expression
or
not
present
operands
a macro-definition.
as
subscripted
description
of the
SET
symbols.
name
entry.
only.
E-3
Operation
Entry
Name
Entry
Operand
Entry
PUNCH
A sequence
symbol
or
not
present
One to eighty
apostrophes
characters
REPRO
A sequence
symbol
or
not
present
Will
as
SETA
SETA
symbol
An
SETB
A SETB
symSol
A 0 or a i,
enclosed
in
SETC
A SETC
symbol
A type attribute,
a character
expression, a substring
notation,
or a concatenation
of character
expressions
and substrlng
notations
SPACE
START
Any
TITLE.31
A special
acters),
variaSle
USING
A sequence
symbol
or
not
present
An absolute
or relocatable
expression
followed
by i to 16 absolute
expressions,
separated
by commas
WXTRN
symbol
or not
present
3See
Section
*Assembler
E-4
sequence
for
only.
or
or
present
not
symbol
(0
a sequence
symbol,
or
sequence
5
F
Symbol
symbol
the description
not
present
taken
arithmetic
A decimal
present
One to i00
apostrophes
the
name
entry.
in
remark
expression
or logical
parentheses
self-deflnlng
A self-deflnlng
to 4 charsymbol,
a
not
present
of
be
enclosed
term
characters,
expression
term
or not
or not
present
enclosed
symbols,
in
sepa-
ASSEMBLER
STATEMENTS
.
,_Qmo_mgu
INSTRUCTIONS
Model
NAME
34
Statements
An
ENTRY
ordinary
symbol,
variable
Any combination
acters
(including
symbol,
sequence
variable
symbol,
a combination
of
variable
symbols
and other
characters
that
is equivalent
to a symbol,
or not
present
Prototype
Statement
A symbolic
not
present
ENTRY
OPERAND
parameter
of
charvariable
symbols)
or
Macro-Instructlon
An
Statement
varlable
symbol,
variable
characters
to
keyword,
Assembler
Statement
ordinary
symbol,
symbol,
a sequence
a combination
of
symbols
and other
that
is
equivalent
2
symbol,
or not
present
An ordinary
symbol,
a variable
symbol,
a sequence
symbol,
a combination
of variable
symbols
and
other characters
that is
Language
3 4
equlvalent
or
I
-May
only
be
2Variable
used
as
symbols
before
the
3Variable
part
not
of
appearing
macro
may
macro
in
be
Any combination
of
(includlng
variable
substitution
for
value
characters
symbols)
a symbol,
used
definition.
a macro
instruction
is
processed.
to
generate
are
assembler
replaced
language
codes
as listed
in Section
5,
except
ACTR,
COPY, END,
PRINT,
REPRO,
and START.
Variable
symbols
may not
be
operand
entries
oft
he following
instructions:
COPY,
Variable
symbols
may not
be used
in the
name entry
of
4No
sign,
present
instruction
symbols
to
equal
variables
in
the
llne
following
by
their
mnemonic
values
operation
ICTL,
CSECT,
DSECT,
ISEQ,
used
in the
name
and
END,
ICTL,
and ISEQ.
the
ACTR instruction.
a REPRO
statement
is
performed.
5_en
symbol
branch
the
name
is not
target
field
of
macro
instruction
contains
passed
as a name
field
parameter.
for
conditional
assembly.
a
It
sequence
only
has
symbol,
meaning
the
as
sequence
possible
E-5/E-6
,,U,PEm)ZX,1':
YPE
IMPLIED
LENGTH
ALIGN-
(BYTES)
MENT
as
needed
byte
as
byte
as
16
as
1 to
256
word
.i to
as
q(3)
RANGE
FOR
SCALE
CATION/
PADDING
SIDE
characters
one
right
hexadecimal
one
left
one
left
binary
digits
multi-
digits
ple
-85
+75
to
-187
+346
to
-187
+346
to
.i to
decimal
multi-
digits
ple
-85
+75
word
I to
decimal
multi-
-85
digits
ple
.i to
decimal
multi-
-85
+75
to
-85
+75
to
digits
ple
.i to
decimal
multi-
16
digits
ple
byte
.i to
decimal
multi-
16
digits
ple
.i to
decimal
multi-
16
digits
ple
.i to
4 (2)
any
expression
multi-
1-4
symbol
naming a DXD
or DSECT
multi-
relocatab
multi-
byte
word
word
word
3 or
4
symbol
to
left
(4)
left
(4)
right
(4)
right
(4)
right
(4)
0-14
+75
double
word
needed
A
SPECIFIED
BY
TRUNRANGE
FOR EXPONENTS
half
word
needed
Z
NUMBER
OF CONSTANTS
PER
OPERAND
(i) digits
byte
double
word
L(3)
1 to
256
needed
F
1 to
OF,CONSCZ rS,,
2s61(1)
needed
B
LENGTH
MODIFIER
RANGE
0-14
0-28
i ....
left
left
left
ple
le
left
ple
left
ple
I_
F-1
IMPLIED
LENGTH
TYPE
(BYTES)
ALIGNMENT
half
word
LENGTH
MODIFIER
RANGE
NUMBER
OF CONSTANTS
PER
OPERAND
SPECIFIED
BY
2 only
RANGE
FOR EXPONENTS
RANGE
FOR
SCALE
TRUNCATION/
PADDING
SIDE
multi-
One absolute
or relocatabl_
ple
expression
or
two absolute
expressions:
exp (exp)
2
as
half
word
.i to
2 (2)
byte
.1
256
needed
half
word
left
multi-
any
expresslon
ple
right
one
to
(1)
.i to
left
any
expression
2 (2)
ple
(1)
In
(2)
to 65535.
Bit length
specification
A-type
constants,
3 or
permitted
with
absolute
4 bytes
only;
relocatable
Assembler
F only.
Errors
will be flagged
cannot
be contained
in
if significant
bits are truncated
or
the implied
length
of the constant.
(3)
(4)
F-2
a DS
assembler
instruction
C and
type
constants
may
have
length
expressions
only.
Y-type
constants,
if
the
specification
Relocatable
2 bytes
only.
value
specified
APPENDIX
G:
The four
charts
in
II of this
publication.
this
Chart
operand
which
macro
each
statement.
indicates
entries
of
appendix
su_aarize
Chart
2
statements.
is
summary
of
the
expressions
Chart
is
sunnnary
of
the
attributes
Chart
4
expression.
is
summary
of
Vor;oblt
Chart
i.
Macro
Language
Elements
the
the
langu_tge
that
that
variable
macro
elements
may
may
language
may
be
be
symbols
be
used
described
used
used
in
in
that
each
may
in
in
the
Part
name
and
macro-instruction
expression.
be
used
in
each
.%yv_ls
G-_
Chart
2.
Conditional
Assembly
Expression
Arithmetic
May
contain
I.
Self-deflnlng
2.
Length,
integer,
number
3.
4.
Expressions
Expressions
terms
scaling,
count,
attributes
1.
Any combination
of
characters
enclosed
and
2.
in apostrophes
Any variable
enclosed
in
3.
A concatenation
8.
+,-,*,
and/
parentheses
Range
of values
-231
May be
used in
i. SETA operands
2. Arithmetic
relations
3. Subscripted
SET
symbols
4.
&SYSLIST
iAn
arithmetic
GT,
2A
LT,
EQ,
character
GT,
may
LT,
also
that
can
be
unequal
size,
3Maxlmum
G-2
relation
of
NE,
used
GE,
symbols
SETB
Arlthme_ic
relatlons
_
3. Character
relocations I
of
for
type
consists
or
through
I.
2.
with
255
characters
SETC operands 3
Character
relations
(false)
(true)
i.
2.
or
SETB operands
AIF operands
notation
notation
of
two
arithmetic
expressions
related
by
the
operators
LE.
consists
GE,
in
or LE.
character
of
two
character
The type
relations.
attribute
The
compared
is 255
characters.
then
the
samller
one will
eight
1.
2.
symbol
apostrophes
concatenation,
period
(.)
to +231-1
relation
EQ,
be
4. A request
attribute
permitted
Substrlng
Subllst
NE,
Expressions
&SYSLIST(n,m)
if the
corresponding
operan
is a self-deflnlng
term
&SYSNDX
Operators
are
5.
6.
Logical
variable
symbols
and
other
characters
enclosed
in apostrophes
digits
Symbolic
parameters
if
the
corresponding
operand
is
a selfdefining
term
6. &SYSLIST(n)
if the
corresponding
operan,
is a self-deflnlng
term
5.
7.
Expresslons
Character
characters
will
be
If
the
always
assigned.
expressions
notation
maximum
related
by
the
and the
substrlng
size
of the
character
two
character
compare
less
operator
notation
expressions
expressions
are
than
the
larger.
of
Chart
3.
Attributes
mmmm_
Notation
Attribute
Type
mi_m_mNNN_
m_m
May
be
used
with:
May
type
Symbols
outside
macro
definitions;
be used
attribute
(May
always
only
is
be
if
:
used)
symbolic
parameters,
&SYSLIST(n),
and
&SYSLIST(n,m)
inside
macro
definitions
Length
Scallng.
S'
except
and U
May
be
used
1.
SETC
fields
2.
Character
relations
in
operand
iArithmetic
lexpresslons
Symbols
outside
macro
definitions;
symbolic
parameters,
&SYSLIST(n),
and
&SYSLIST(n,m)
inside
macro
definitions
Any letter
M,N,O,T,
Symbols
outside
macro
definitions;
H,F,G,D,E,L,K,P,
and
Z
Arithmetic
H,F,G,D,E,L,K,P,
and
Z
Arithmetic
expressions
symbolic
parameters,
&SYSLIST(n),
and
&SYSLIST(n,N)
inside
macro
definitions
Integer
Symbols
outside
macro
definitions;
symbolic
parameters,
&SYSLIST(n),
and
&SYSLIST(n,m)
inside
macro
definitions
expressions
mmN_Nmm.
Count
K'
_An-y'
Symbolic
parameters
corresponding
to
macro
instruction
letter
Arithmetic
expressions
operands,
&SYSLIST
(n),
and &SYSLIST(n,m)
inside
macro
definitions
Numb er
*NOTE:
Section
N'
There
are
Any
Symbolic
parameters,
&SYSLIST,
and
&SYSLIST(n)
inside
macro
definitions
definite
restrictions
in
Arithmetic
letter
expressions
the
use
of
these
attributes.
Refer
to
text,
9.
G-3
Chart
4.
Varlab
le
Varlable
Symbols
m
Defined
by:
Symbol
Symbolic
parameter
_a
Value
by:
Correspondin$
macro
instruction
(Constant
operand
LCLA or GBLA
instruction
SETB
LCLB or GBLB
instruction
SETC
LCLC or GBLC
instruction
Null
value
SETA
mmmNmm_N_
Initialized.
OT set to l
Changed
instruction
be
used
in:
I. Arithmetic
throughout
definition)
SETA
character
May
expressions
2.
if
operand
is
selfdefining
term
Character
expressions
1.
2.
Arithmetic
Character
expressiona
expressions
SETB
instruction
i. Arithmetic
expressions
2. Character
expressions
3. Loglcal
expressions
SETC
instruction
i. Arithmetic
expressions
if value
is selfdefining
term
2.
Character
(Constant
1.
Arithmetic
throughout
definition;
unique
for
each
macro-
h2.
Character
expressions
mw_Nml
&SYSNDX
The
assembler
Macro
Index
instruction
expressions
expressions
instruction)
&SYSECT
The
assembler
Control
section
in whichmacro
instruction
appears
&SYSLIST
The
assembler
Not
applicable
(Constant
Character
expressions
throughout
definition;
set
by CSECT,
DSECT,
and
START)
Not
applicable
N'&SYSLIST
in
arithmetic
expressions
&SYSLIST(N)
&SYSLIST
(N,M) 1
The
assembler
(Constant
Corresponding
macro instruction
throughout
operand
definition)
i. Arithmetic
if operand
2.
_ay
only
G-4
be
used
in
macro
definitions.
defining
Character
expressions
is selfterm
expressions
e"
'
aPPmzx
u-
SkMPLE,,150_a
Given:
A TABLE
lo
with
15
entrles,
each
3 bytes
e
A LIST
of
16 bytes
__J_i
1 byte
items,
each
16
bytes
havlnK
the
4 bytes
long,
havins
the
Find:
The
1 byte
following
format.
_D_SS
3 bytes
4 bytes
Any of
the
items
in the
LIST which
occur
in the
TABLE and put
the
SWITCHes,
NUMBER
of items,
and ADDRESS
from that LIST entry into the
corresponding
TABLE entry.
If the LIST item does not occur in the
TABLE,. turn on the first bit in the SWITCHes
byte of the LIST entry.
TABLE
entries
TITLE
PRINT
THIS
have
been
sorted
by
their
NAME.
SAMPL001
SAMPL002
SAMPL003
SAMPLO04
SAMPL005
SAMPL006
SAMPL007
SAMPLO08
SAMPLO09
SAMPL010
SAMPL011
SAMPL012
SAMPL013
SAMPL014
SAMPL015
DATA
IS
THE
MAC_)
DEFINITION
MACRO
MOVE aTO, &FROM
o*
o*
DEFINE
LCLC
*
o*
CHECK
AIF
*
o*
*TYPEDEH
format:
8 bytes
I .......
....
8 bytes
followln8
CHECK
AIF
AIF
AIF
AIF
AGO
ANOP
SETC
SYMBOL
&TYPE
NUMBER
OF
OPERANDS
(N'&SYSLIST
TYPE
NE
ATTRIBUTES
(T'&TO
(T'&TO
(T'&TO
NE
EQ
EQ
2) .ERROR1
OF
T'&FROM).ERROR2
'C t OR IT%TO EQ
'D' OR T'&TO EQ
i(T:'
_TO EQ 'F')MOVE
ERROR3
SAMPL016
SAMPL017
OPERANDS
'G' OR
'E' OR
TW&TO
T'&TO
EQ
EQ
'K'),TYPECGK
'H'),TYPEDEH
SAMPL018
SAMPL019
S_I_I.,020
S,_R_LO 2 "1
S_:_L022
S_PL023
SAMPL024
H-1
ASSIGN
&TYPE
.MOVE
SETC
ANOP
NEXT
TYPE
.TYPECGK
AIFI
NEXT
MVC
MEXIT
TWO
ERROR2
ERROR3
. ERROR4
STATemENTS
LENGTH
SAMPLR
BEGIN
MORE
LISTLOOP
H-2
GENERATED
ATTRIBUTES
(L'&TO
STATEMENT
SYMBOL
FOR
MOVE
MACRO
OF OPERANDS
NE L'&FROM
GENERATED
or L'&TO GT 256).ERROR4
FOR MOVE MACRO
&TO,&FROM
FOR
MNOTE
1,'IMPROPER
MEXIT
MNOTE
I,'OPERAND
MEXIT
MNOTE
1,'IMPROPER
MEXIT
}{NOTE L,'IMPROPER
MEND
MAIN
SETC
2,&FROM
2,&TO
ERROR MESSAGES
ERRORII
TO
T'&TO
L&TYPE
ST&TYPE
MEXIT
CHECK
ATTRIBUTE
SAMPL025
SAMPL026
SAMPL027
SAMPL028
SAMPL029
SAMPL030
SAMPL031
SAMPL032
SAMPL033
SAMPL034
SAMPL035
SAMPL036
INVALID
NUMBER
TYPES
MOVE
OF
MACRO
INSTRUCTIONS
OPERANDS,
DIFFERENT,
OPERAND
TYPES,
OPERAND
LENGTHS,
NO
NO
NO
STATEMENTS
STATEMENTS
STATEMENTS
NO
STATEMENTS
GENERATED'
GENERATED'
GENERATED'
GENERATED'
ROUTINE
CSECT
SAVE
BALR
USING
ST
LM
USING
BAL
TM
BO
USING
MOVE
MOVE
MOVE
BXLE
CLC
BNE
CLC
BNE
WTO
(14,12),,*
R12,0
ESTABLISH
ADDRESSABILITY
OF PROGRAM
*,RI2
AND TELL THE ASSEMBLER
WHAT BASE TO USE
13,SAVE13
RS,R7,=A(LISTAREA,16,LISTEND)
LOAD LIST AREA PARAMETERS
LIST,R5
REGISTER
5 POINTS
TO THE LIST
R14,SEARCH
FIND LIST ENTRY IN TABLE
SWITCH,NONE
CHECK TO SEE IF NAME WAS FOUND
NOTTHERE
BRANCH
IF NOT
TABLE,R1
REGISTER
TSNITCH,LSWITCH
TNUMBER,LNUMBER
TADDRESS,LADDRESS
RS,R6,MORE
LOOP
TESTTABL(240),TABLAREA
NOTRIGHT
TESTLIST(96),LISTAREA
NOTRIGHT
'ASSEMBLERSAMPLE
1 NOW POINTS
TO TABLE ENTRY
MOVE FUNCTIONS
FROM LIST ENTRY
TO TABLE
ENTRY
THROUGH
THE
LIST
PROGRAM SUCCESSFUL'
SAMPL037
SAMPL038
SAMPL039
SAMPL040
SAMPL041
SAMPL042
SAMPL043
SAMPL044
SAMPL045
SAMPL046
SAMPL047
SAMPL048
SAMPL049
SAMPL050
SAMPL051
SAMPL052
SAMPL053
SAMPL054
SAMPL055
SAMPL056
SAMPL057
SAMPL058
SAMPL059
SAMPL060
SAMPL061
SAMPL062
SAMPL063
SAMPL064
SAMPL065
SAMPL066
SAMPL067
SAMPL068
SAMPL069
SAMPL070
SAMPL071
SAMPL072
SAMPL073
SAMPLO 74
EXIT
RETUPa
NOTRIGHT
NOTTHERE
SAVE13
SWITCH
NONE
WTO
B
OIi
B
DC
DC
EqU
BINARY
SEARCH
LOOP
NI
LM
LA
SRL
CLC
BH
BCR
SR
BCT
B
HIGHEE
NOTFOUND
AR
BCT
Ol
BR
RI3,SAVE13
(14,12) ,RC'O
'ASSEMBLER SAMPLE PROGRAM UNSUCCESSFUL'
EXIT
LSWITCH,NONE TURN ON SWITCH IN LIST ENTRY
LISTLOOP
GO BACK AND LOOP
'0'
X'00'
X' 80 '
SEARCH ROUTINE
SWITCHm255-NONE
TURNOFF
NOT FOUND SWITCH
RI,R3,-F'128,4,128'
LOAD TABLE PARAMETERS
GET ADDRESS OF MIDDLE ENTRY
R1, TABLAKEA-16 (R1)
DIVIDE INCREMENT BY 2
P,3,I
COMPARE LIST ENTRY WITH TABLE ENTEY
LNAME,TNAME
HIGHER
BRANCH IF SHOULD BE HIGHER IN TABLE
EXIT IF FOUND
8,R14
OTHERWISE IT IS LOWER IN THE TABLE
R1,R3
SO SUBTRACT INCIt_TENT
LOOP 4 TIMES
P.2,LOOP
_NOTFOUND
ARGUMENT IS NOT IN THE TABLE
ADD INCP.m_ENT
RIDR3
LOOP 4 TIMES
P.2,LOOP
TURN ON NOT FOUND SWITCH
SWITCH,NONE
EXIT
_4
TABLAREA
DS
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
DC
IX:
DC
DC
OD
XL8'0' ,CL8'ALPHA t
XL8V0 ' ,CL8'BETA'
XL8f0 ' ,CL8'DELTA t
XL8W0 ' ,CLS'EPSILON'
XL8'O, ,CLS'ETA'
XL8'0' ,CL8'GAMMA I
XL8'0' ,CL8,IOTA w
XL8'0' ,CL8'KAPPA'
XL8'0 t ,CL8'LAMBDA t
XL8'0' ,CL8'MU'
XL8'0 t ,CL8'NU'
XL8'0' ,CL8'OMICRON'
XL8'O' ,CL8'PHI'
XL8'0',CLS'SIGMA'
XL8'0',CL8'ZETA'
SAMPL075
SAMPL076
SAMPL077
SAMPL078
SAMPLO 79
SAMPL080
SAMPL081
SAMPL082
SAMPL083
SAMPL084
SAMPL085
SAMPL086
SAMPL087
SAMPL088
SAMPL089
SAMPL090
SAMPL091
SAMPL092
SAMPL093
SAMPL094
XSAMPL095
SAMPL096
SAMPLO9 7
SAMPL098
SAMPL099
SAMPL100
SAMPL101
SAMPL102
SAMPL103
SAMPL104
SAMPL105
SAMPLI06
SAMPL i0 7
SAMPLI08
SAMPLI09
SAMPLIIO
SAMPL111
SAMPLII2
SAMPLII3
SAMPLII4
SAMPLII5
SAMPLII6
SAMPLII7
SAMPLII8
SAMPLII9
SAMPLI20
SAMPLI21
SAMPLI22
SAMPL123
SAMPLI24
H-3
LISTA_.FA
LISTEND
*
TESTTABL
DC
DC
DC
SAMPL125
CLS'ZETA',X'OS',FL3'5!,A__L_F)!
SAMPL126
SAMPL127
SAMPL128
SAMPL129
SAMPL130
SAMPL131
SAMPL132
SAMPL133
SAMPLI34
SAMPL135
SAMPL136
SAMPL137
SAMPL138
SAMPL139
SAMPL140
SAMPL141
SAMPL142
SAMPL143
SAMPL144
SAMPL145
SAMPL146
SAMPL147
CLS'THETA',X'O2'tFL3'4$',A(BEGIN)
CL8'TAU',X'OO',FL3'O'tA(1)
CLS'LZST'oX'IFtpFL3'465',A_0)!
CLS!ALPHAt,Xt00',FL3'1',A(123)
DC
DC
DC
THI8
CLS'LAMBDA',X'OA',FL3'29'A(BEGIN)
IS
DS
DC
DC
DC
DC
DC
DC
DC
. DC
DC
DC
DC
DC
DC
THE
CONTROL
TABLE
0D
FL3'l',X'00',A(123),CL8'ALPHA'
XL810',CL8tBETA
'
XL81'0',CLS'DELTA'
XL8t0',CL8tEPSILON
t
XL8'01,CL8'ETA
'
XLS'0',CLS'GAMMA
I
XL8'0',CLS'IOTA'
XLS'0',CLS'KAPPA'
!FL3'29'_X'OAJ.A(BEGIN).CL8'_-A'
XL8'0',CL8'MU
t
XL8'0',CL8WNU
v
XL8'0'oCL8'OMICRON
t
XL8'0',CLStPHI
'
XLS'0',CL8'SIGMA'
DC
DC
SAMPL148
SAMPL149
SAMPL150
SAMPL151
SAMPL152
FL3'5',X'O5',A(LOOP)I_L8'ZETA'
*
*
THIS
IS
THE
CONTROL
LIST
TESTLIST
DC
DC
DC
DC
DC
DC
THESE
R0
R1
112
R3
R5
R6
R7
R12
R13
R14
RI5
*
ll-4
CL8tLAMBDA',X'OA',FL3'29',A(BEGIN)
CL8'ZETA',X'05'mFL3'5',A(LOOP)
CL8'THETA',X'82',FL3'45',A(BEGIN)
CLS'TAU',X'80',FL3'0',A(1)
CLS'LIST',X'9FgFL3'465',Ai(O):
CLS'ALPHA',X'00',FL3'1',A(123)
ARE
SYMBOLIC
REGISTERS
0
1
2
3
5
6
7
12
13
14
15
EQU
EqU
EqU
EQU
EQU
EQU
EQU
EQU
EQU
Equ
EqU
THIS
THE
SAMPL153
SAMPL154
SAMPL155
SAMPL156
IS
THE FORMAT
DEFINITION
OF LIST
ENTRYS
SAMPL157
SAMPL158
SAMPL159
SAMPL160
SAMPL161
SAMPL162
SAMPL163
SAMPL164
SAMPL165
SAMPL166
SAMPL167
SAMPL168
SAMPL169
SAMPL170
SAMPLI71
SAMPL172
SAMPL173
SAMPL174
DSECT
LIST
DS
LNAME
LSWITCH DS
LNUMBERDS
LADDRESSDS
THIS
CL8
C
FL3
F
IS
,
TABLE
DSECT
TNUMBER DS
TSWITCH
TADDRESS
TNAME
DS
DS
DS
END
THE
FORMAT
FL3
C
F
CL8
BEGIN
DEFINITION
OF
TABLE
ENTRYS
SAMPL175
SAMPL176
SAMPL177
SAMPL178
SAMPL179
SAMPL180
SAMPL181
SAMPL182
SAMPL183
SAMPL184
SAMPL185
SAMPLI86
SAMPLI87
SAMPL188
SAMPL189
B-sl -6
m
i
_PE_DIX t:
_SmLEa
L_ES--FEaTUnES
Features
not shown are counon
to all
assemblers.
Dash - Not allowed..
X
- As defined
in Operating
System/360
Basic
Proilr..--4
ng
Support/360
Basic
Assembler
Feature
No. of Continuation
Statement
(exclusive
macro-instructions)
Input
Character
In
c_JazsoN
the
Assembler
7090/7094
Support
Package
Assembler
Cardsl
of
Code
CSaaT
chart:
Language
Manual
BPS 8K IT_ape,
BOS 8K Disk
DOS/TOS
Assembler
Assemblers
0S/360
Assembler
EBCDIC
BCD&EBCDIC
EBCDIC
EBCDIC
EBCDIC
ELEMENTS:
Maximum
Characters
per
symbol
i
Character
1 Char.
self-defininK
only
terms
Binary
selfTdefinins
Length
attribute
termsl
reference
Literalsl
Extended
Mnemonic8
MaximumLocation
value
.......
CounCeri
224_1
224_1
224_1
224_1
+-*/
+-'1
+-'1
16
16
I
ii
Multiple
Centrol
per assl._l__
Sections
....
EXPRESSIONS:
4--*
Operators
Nu_er
of terms
Level of parentheses'
1Assembler
2DOS
t6
F only
14K D Assembler
onlY
I-1
Basic
7090/7094.
Support
Packase
Assembler
l_'osrmmtnS'
Support/360
Basic
Assembler
Feature
BPS 8K Tape,
BOS 8K Disk
Assemblers
Doslzos
Assembler
0S1360
Assembler
X2
X'
X2
Complex
Relocatability
ASSEMBLER INSTRUCTIONS:
DC and
DS
Expression
Modifiers
Multiple
allowed
on
- -
operands
Multiple
constants
an operand
in
Except
address
con8
Bit length
specifications
- -
--
ts.
Scale modifier
- -
Exponent
Modifier
DC types
Except
B,P,Z
DC duplication
factor
DC duplication
factor
Except
of
Except
B,V,L
Except
X2
Except
_X
Except
Xl2
zerO
'i DC length
DS types
modifier
Except
H, E,
i_
H, F,
Only C,
H, F, D
Except
Only
256
65,535
65,535
ID
O ly c,
._JDS length
DS maximum
DS censtant
permitted
iAssembler
modifier
length
m_ifier
subfield
256
1
_ I
F only
Only
only
'
256
Basic
Feature
COPY
Progra_atng,
Support/360
Basic
Assembler
ISEQ
BPS 8K Tape,
BOS 8K Disk
Assemblers
CSECT
DSECT
709017094.
Support
Package
Assembler
LTORG
TITLE
COM
X
X
ICTL
1 operand
(1 or 25
only)
USING
2 operands
(operand 1
relocatable
only)
0S/360
Assembler
X
X
X
X
6 operands
IX
I1 o perand
2-17
operrands
(operand 1
relocatable
DOS/TOS
Assembler
only)
DROP
1 operand
only
5 operands
CCW
operand
2
(relocatable
only)
ORG
no blank
operand
no blank
operand
ENTRY
1 operand
only
1 operand
only
I operand
only
EXTRN
1 operand
only (max 14)
1 operand
only
1 operand
only
I-3
Butc
Progr_,
Support/360
Buic
Assembler
Feature
=
709017094
Support
Package
Assembler
i
_TRN
uos/_os
Assembler
0S1360
Assembler
X2
X 1
2 decimal
digits
CNOP
BPS 8K Tape,
Bog 8K Disk
Assemblers
2 decimal
digits
PUNCH
2 decimal
digits
m
IX
--
REPRO
Macro
Inetructtons
OPSYN
--
--
_ _
Hi,
EQU
1Assembler
F _?nly__1
I-4
onlyi
_X1
X
Macro
Facility
FeJtures
BP8 8E Tape,
BO$ 8E Disk
Assemblers
Oparand
Subli'st8
'
..
'
Attributes
of macro-instruction
operands
inside
macro definitions
and symbols
used in condltlonal
assembly instructions
outside
macro
deflnlClons.
SET symbols
Subscripted
14axtmum number
of
49
operands
0S/360
Assembler
,|
I001
20O
Conditional
use_bly
instructtens
outside
macro
definitions
Maxlmuml number
of .SET symbols
global
SETA
16
global
SETB
128
global
SETC
16
_q
local
SETA
16
local
SETB
128
local
SEfC
*The
main
number
of
$'ET sy_bols'perattt_d
is
NOTE:
The maximum slze
of a character
Assembler
D and 255 characters
far the
1200
variable,
dependent
Upon
available
storase.
for
Assembler
expression
OS Assailer
is
127
F.
characters
for
the
DOS/TOS 1
,:-5/:-6
e.
,e.emm x
J.
S LE
D DUZZos.g
The macro
def_nJ:tions
n this
appendix
are typical
and conditonal
assambly.
Another
macro definition
ae pazt
of Appendix H.
Notice
the use of the inner
macro nstrueton
of generating
MNOTE statements.
Included
with
mants
generated
from it.
MEMBERNAME SAVE
MACRO
&NAME
SAVE
LCLA
LCLC
AZF
AIF
AIF
&A
SETA
&NAME
B
&A
SETA
DC
CONTB
AIF
CONTAA
AZF
&E
8ETC
DC
AGO
BRAKDWN
ANOP
&E
SETC
DC
&B
SETA
&A
SETA
AGO
SPLITUP
ANOP
&E
SETC
&F
SETC
&G
SETC
&H
SETC
DC
&B
SETA
&A
SETA
AGO
.NULLID
ANOP
&NAME
DS
AGO
SPECID
AIF
&E
SETC
&A
SETA
app]/catious
is included
_ of
in
the
the
lacro
sample
(IlIBEEMAC) within
SAVE fo_
SAVE are some examples
of
the
the
( (K' sn>,-2)/2).2+4
Sk. (0,15)
K' &ID
BRANCH AROUND
ALIC A)
LENGTH
(&A GT 32).SPLITUP
(&A GT 8).SRAK_
'&ID' (aB+I,&A)
CL&A'&E'
CONTA
OF IDENTIFIER
IDENTIFIER
'aiD'(as+l,g)
IDENTIFIER
CLS'&E'
&B+8
&A-8
CONTAA
'&ID' (SB+I, 8)
'&ID '(&B+9,8)
'&ID' (&B+I7,8)
'&ID' (&B+25,8)
CL32 '&E. &F. &G &H 0
&B+32
&A-32
.CONTB
OH
CONTA
('&NAME ' EQ
'&NAME '
i
''). CSECTN
ID
IDENTIFIER
language
program
purpose
state-
00020000
00040000
00060000
00080000
00100000
00120000
00140000
001600O0
00180000
00200000
00220000
00240000
00260000
00280000
00300000
00320000
00340000
00360000
00380000
00400000
00420000
00440000
00460000
00480000
00500000
00520000
00540000
00560000
00580000
00600000
00620000
00640000
00660O00
00680000
00700000
00720000
00740000
IJ-1
CO_q
&A
.LEAVE
&B
&NAME
.CSECTN
&E
&A
.E4
CONTA
&A_
&A
CONTD
.CONTE
AI F
SETA
AGO
ANOP
SETA
E
D(
DC
AGO
AIF
SET(
SETA
AGO
IHBERMAC
AIF
AIF
AIF
SETA
AIF
SETA
AIF
STM
MEXIT
AIF
sT
C01gC
&A
.CONTG
CONTF
.CONTH
MEXTT
AIF
STM
8ETA
AIF
$TM
MEXIT
AIF
ST
MEXIT
AIF
STM
MEXIT
AIF
s_
MEXIT
IHBERMAC
MEXIT
.E2
IHBERMAC
MEXIT
.E3
IHBERMAC
MEND
END OF DATA FOR SDS
El
('&E'CI,&A)
&A+I
EQ '&EO).LEAVE
.CONTQ
((&a+2)/2)'2+4
&e.(0,15)
_1(_)
CL&AI&E'
CONTA
('&SYSECT'
t&SYSECT '
1
EQ
'').E4
COICTQ
78,360
(T'aREG(1) NE 'N').E3
('&CODE' EQ 'T').CONTC
('&CODE ' ICE '').E2
® (1)'4+20
(&A LE 75).CONTD
&A-64
(N'&RSG NE 2).COgTE
&PEG(l), &PEG(2) ,&A, (13)
(N'® NE 1).E3
&_c (1).4+20
(N'® ICE 2).CONTG
&PEG(I) ,®(2) ,&A. (13)
(N'® NE 1).E3
® (1) ,&A. (13,0)
(N '® NE 2), CONTH
14 ,&I_G (2) ,12 (13)
(N'® NE 1).E3
00760000
00780000
00800000
00820000
00840000
00860000
BRANCH AROUND ID
00880000
00900000
IDENTIFIER
00920000
00940000
00960000
00980000
01000000
01020000
CSECT NAME NULL
01040000
01061)000
01080000
01100000
01120000
01140000
01160000
01180000
SAVE REGISTERS
01200000
01220000
01240000
SAVE REGISTER
01260000
01280000
LE 2).CONTF
01300000
SAVE REGISTERS
01320000
01340000
01360000
SAVE REGISTERS
01380000
01400000
SAVE REGISTERS
01420000
01440O0O
01460000
SAVE REGISTERS
O148O00O
01500000
01520000
SAVE REGISTERS
01540000
01560000
,PEG PARAMMISSING
0158O0O0
01600000
INVALID CODE SPECIFIED
01620000
01640000
INVALID REGS. SPECIFIED 01660000
01680000
8"
FOGHORN
FORHORN
SAVE
DS
STM
(14,12)
OH
14,12,12(13)
SAVER EGISTERS
***********
SAVE
DS
(P.EG14,REG12),T
OH
12,***
SAVMACRO
SAVMACRO
MEMBER
&NAME
&NAME
.ERR
MEMBER
&NAME
&NAME
.ERR1
.ERR2
IHBO02
INVALID
SAVE
B
DC
DC
14(o,15) Br_CSaaO_D
ALl(8)
STM
14,12,12(13)
FIRST
OPERAND
SPECIFIED-(REG14,R
(14,12),T,*
ID
CL8'SAVMACEO t IDENTIFIER
SAVE IEGISTERS
NAME NOTE
MACRO
NOTE
AIF
IHBINNRA
L
BALR
MEXIT
IHBERMAC
MEND
&DCB
('&DCB' EQ
&DCB
15,84(0,1)
14,15
'').ERR
LOAD VOTE RIN ADDRESS
LINK TO NOTE ROUTINE
NAME POINT
MACRO
POINT &DCB,&LOC
AIF
(' &DCB' EQ
AIF
('&LOC' EQ
IHBINNRA & DCB, &LOC
L
15,84(0,I)
BAL
14,4(15,0)
MEXIT
IHBERMAC 6
MEXIT
IHBERMAC 3
MEND
00020000
00040000
00060000
00080000
00100000
00120000
00140000
00160000
00180000
00020000
00040000
00060000
00080000
00100000
00120000
00140000
00160000
00180000
00200000
00220000
00240000
J-3
MEMBER
&NAME
&NAME
.El
J-4
NAME CHECK
MACRO
CHECK &DECB
AIF
('_DE_ EQ '') .El
IHBINNRA
&DECB
L
14,8(0,1)
L
15,52(0,14)
BALR
14,15
MEXIT
_HBERMAC
MEND
07,018
00020000
00040000
00060000
00080000
00100000
00120000
00140000
00160000
00180000
00200000