Ibm 360
Ibm 360
Ibm 360
Copies of this and other IBM publications can be obtained through IBM Branch Offices.
Address comments concerning the contents of this publication to:
I B M Corporation, Customer Manuals, Dept. B98, PO Box 390, Poughkeepsie, N.Y.
12602
Contents
IBM S y s t e m / 3 6 0
....................................................................
G e n e r a l - P u r p o s e D e s i g n ........................................................
C o m p a t i b i l i t y ..........................................................................
S y s t e m P r o g r a m ......................................................................
S y s t e m A l e r t s ..........................................................................
M u l t i s y s t e m O p e r a t i o n ..........................................................
Input/Output
..........................................................................
T e c h n o l o g y ..............................................................................
System Structure
Decimal Arithmetic
5
5
5
6
6
6
6
Data Format
........................................................................
N u m b e r R e p r e s e n t a t i o n ..........................................................
C o n d i t i o n C o d e ......................................................................
I n s t r u c t i o n F o r m a t ..............................................................
I n s t r u c t i o n s ..............................................................................
A d d D e c i m a l ......................................................................
S u b t r a c t D e c i m a l ................................................................
Z e r o a n d A d d ......................................................................
C o m p a r e D e c i m a l ..............................................................
M u l t i p l y D e c i m a l ................................................................
D i v i d e D e c i m a l ..................................................................
P a c k ......................................................................................
U n p a c k ................................................................................
M o v e w i t h Offset ................................................................
D e c i m a l A r i t h m e t i c E x c e p t i o n s ............................................
34
34
35
35
35
35
36
36
37
37
37
38
38
38
39
40
40
40
41
41
4I
42
43
43
43
43
44
44
45
45
46
46
47
47
48
49
49
Logical Operations
................................................................
D a t a F o r m a t ............................................................................
C o n d i t i o n C o d e ......................................................................
I n s t r u c t i o n F o r m a t ..................................................................
I n s t r u c t i o n s ..............................................................................
M o v e ....................................................................................
M o v e N u m e r i c s ..................................................................
M o v e Z o n e s ........................................................................
C o m p a r e L o g i c a l ................................................................
A N D ....................................................................................
O R ........................................................................................
E x c l u s i v e O R ......................................................................
T e s t U n d e r M a s k ................................................................
I n s e r t C h a r a c t e r ..................................................................
S t o r e C h a r a c t e r ..................................................................
L o a d A d d r e s s ......................................................................
T r a n s l a t e ..............................................................................
T r a n s l a t e a n d T e s t ..............................................................
E d i t ......................................................................................
E d i t a n d M a r k ....................................................................
S h i f t L e f t S i n g l e ................................................................
S h i f t R i g h t S i n g l e ................................................................
S h i f t L e f t D o u b l e ..............................................................
S h i f t R i g h t D o u b l e ..............................................................
L o g i c a l O p e r a t i o n E x c e p t i o n s ................................................
50
50
51
51
52
52
53
53
53
54
54
55
55
55
55
56
56
56
57
58
59
59
59
60
60
B r a n c h i n g ................................................................................
N o r m a l S e q u e n t i a l O p e r a t i o n ................................................
S e q u e n t i a l O p e r a t i o n E x c e p t i o n s ....................................
Decision-Making
....................................................................
I n s t r u c t i o n F o r m a t s ................................................................
B r a n c h i n g I n s t r u c t i o n s ............................................................
B r a n c h O n C o n d i t i o n ..........................................................
B r a n c h a n d L i n k ................................................................
B r a n c h O n C o u n t ................................................................
B r a n c h O n I n d e x H i g h .......................... ~............................
B r a n c h O n I n d e x L o w or E q u a l ......................................
E x e c u t e ................................................................................
B r a n c h i n g E x c e p t i o n s ............................................................
61
61
62
62
62
63
63
64
64
64
65
65
65
....................................................................
M a i n S t o r a g e ..........................................................................
I n f o r m a t i o n F o r m a t s ..........................................................
Addressing
..........................................................................
I n f o r m a t i o n P o s i t i o n i n g ......................................................
C e n t r a l P r o c e s s i n g U n i t ..........................................................
G e n e r a l R e g i s t e r s ................................................................
F l o a t i n g - P o i n t R e g i s t e r s ......................................................
A r i t h m e t i c a n d L o g i c a l U n i t ..................................................
F i x e d - P o i n t A r i t h m e t i c ......................................................
D e c i m a l A r i t h m e t i c ............................................................
F l o a t i n g P o i n t A r i t h m e t i c ..................................................
L o g i c a l O p e r a t i o n s ..............................................................
P r o g r a m E x e c u t i o n ..................................................................
I n s t r u c t i o n F o r m a t ..............................................................
A d d r e s s G e n e r a t i o n ............................................................
S e q u e n t i a l I n s t r u c t i o n E x e c u t i o n ......................................
B r a n c h i n g ............................................................................
P r o g r a m S t a t u s W o r d ........................................................
Interruption
........................................................................
P r o t e c t i o n F e a t u r e ..................................................................
T i m e r F e a t u r e ........................................................................
D i r e c t C o n t r o l F e a t u r e ..........................................................
M u l t i s y s t e m F e a t u r e ..............................................................
Input/Output
..........................................................................
I n p u t / O u t p u t D e v i c e s a n d C o n t r o l U n i t s ........................
I n p u t / O u t p u t I n t e r f a c e ......................................................
C h a n n e l s ..............................................................................
I n p u t / O u t p u t I n s t r u c t i o n s ..................................................
I n p u t / O u t p u t O p e r a t i o n I n i t i a t i o n ....................................
Input/Output
C o m m a n d s ..................................................
input/Output
T e r m i n a t i o n ................................................
I n p u t / O u t p u t I n t e r r u p t i o n s ................................................
S y s t e m C o n t r o l P a n e l ............................................................
S y s t e m C o n t r o l P a n e l F u n c t i o n s ........................................
O p e r a t i o n C o n t r o l S e c t i o n ................................................
O p e r a t i o n I n t e r v e n t i o n S e c t i o n ..........................................
C u s t o m e r E n g i n e e r i n g S e c t i o n ..........................................
7
7
7
8
8
8
9
9
9
10
10
11
11
12
12
13
15
15
15
16
18
18
18
18
19
19
19
19
19
20
20
21
21
21
21
22
22
22
23
23
23
24
24
25
25
25
25
26
26
26
26
27
27
27
28
28
28
29
29
29
30
30
30
31
31
31
31
32
32
32
aa
33
................................................................
34
Status-Switching ....................................................................
P r o g r a m States ........................................................................
P r o b l e m State ......................................................................
W a i t State ............................................................................
M a s k e d States ......................................................................
S t o p p e d State ......................................................................
Storage Protection ..................................................................
Area Identification ..............................................................
Protection Action ................................................................
Locations P r o t e c t e d ............................................................
P r o g r a m Status W o r d ............................................................
Multisystem O p e r a t i o n ..........................................................
D i r e c t Address Relocation ................................................
M a l f u n c t i o n I n d i c a t i o n ......................................................
System Initialization ..........................................................
I n s t r u c t i o n F o r m a t ..................................................................
Instructions ..............................................................................
L o a d P S W ............................................................................
Set P r o g r a m Mask ..............................................................
Set System Mask ................................................................
Supervisor Call ....................................................................
Set Storage Key ..................................................................
Insert Storage Key ..............................................................
W r i t e D i r e c t ......................................................................
R e a d D i r e c t ........................................................................
D i a g n o s e ..............................................................................
S t a t u s - S w i t c h i n g Exceptions ................................................
Interruptions
..........................................................................
67
67
67
67
68
68
69
69
69
69
69
70
70
71
71
71
71
72
72
72
72
73
73
73
74
74
74
76
I n t e r r u p t i o n Action ................................................................
I nstr uction Execution ........................................................
Source Identification ..........................................................
L o c a t i o n D e t e r m i n a t i o n ....................................................
I n p u t / O u t p u t I n t e r r u p t i o n ....................................................
P r o g r a m I n t e r r u p t i o n ............................................................
O p e r a t i o n Exception ..........................................................
P r i v i l e g e d - O p e r a t i o n E xception ........................................
Execute E x c e p t i o n ............................................................
Protection E x c e p t i o n ..........................................................
A d d r e s s i n g Exception ........................................................
Specification E x c e p t i o n ......................................................
D a t a Exception ........................................................... .......
F i x e d - P o i n t - O v e r f l o w Exception ......................................
F i x e d - P o i n t - D i v i d e Exception ............................................
D e c i m a l - O v e r f l o w Exception ............................................
D e c i m a l - D i v i d e Exception ................................................
E x p o n e n t - O v e r f l o w Exception ..........................................
E x p o n e n t - U n d e r t o w E xception
Significance Exception
........................................................
F l o a t i n g - P o i n t - D i v i d e Exception
......................................
Supervisor-CaU I n t e r r u p t i o n ..................................................
External I n t e r r u p t i o n ..............................................................
T i m e r ..................................................................................
I n t e r r u p t Key ......................................................................
External Signal ....................................................................
M a c h i n e - C h e c k I n t e r r u p t i o n ..................................................
Priority of I n t e r r u p t i o n s ........................................................
I n t e r r u p t i o n Exceptions ........................................................
76
77
77
77
78
78
78
78
78
78
78
79
79
79
79
79
79
79
79
79
79
79
80
80
80
81
81
81
82
83
83
83
83
84
85
86
87
87
88
88
90
90
92
92
92
93
94
95
Execution of I n p u t / O u t p u t O p e r a t i o n s ................................
Blocking of D a t a ................................................................
C h a n n e l Address W o r d ......................................................
C h a n n e l C o m m a n d W o r d ..................................................
C o m m a n d C o d e ..................................................................
Definition off Storage Area ..................................................
C h a i n i n g ............................................................... :. .............
Skipping
P r o g r a m - C o n t r o l l e d I n t e r r u p t i o n ......................................
C o m m a n d s ..........................................................................
T e r m i n a t i o n of I n p u t / O u t p u t O pe ra t i ons ............................
T y p e s of T e r m i n a t i o n ......................................................
I n p u t / O u t p u t I n t e r r u p t i o n s ..............................................
C h a n n e l Status W o r d ........................................................
U ni t Status Conditions ......................................................
C h a n n e l Status Conditions ................................................
C o n t e n t of C h a n n e l Status W o r d ......................................
96
96
96
96
97
98
98
100
100
101
104
104
107
108
109
112
114
117
117
117
117
118
118
119
119
119
119
119
119
119
119
119
119
120
120
120
120
120
120
120
121
121
121
121
121
121
121
121
121
A p p e n d i x ................................................................................
A. I n s t r u c t i o n Use Examples ................................................
A s s e mbl y L a n g u a g e Exa mpl e s ..........................................
B. F i x e d - P o i n t a n d T w o ' s C o m p l e m e n t N o t a t i o n ................
C. F l o a t i n g - P o i n t Arithmetic ..................................................
D. Powers of T w o T a b l e ........................................................
E. H e x a d e c i m a l - D e c i m a l Conversion T a b l e ..........................
F. E B C D I C a n d A S C I I - 8 C ha rt s ..........................................
G. F o r m a t s a n d Tables .........................................................
D a t a F o r m a t s ....................................................................
H e x a d e c i m a l R e p r e s e n t a t i o n ..............................................
Instructions b y F o r m a t T y p e ............................................
Control W o r d F o r m a t s ......................................................
O p e r a t i o n Codes ................................................................
P e r m a n e n t Storage A s s i g n m e n t ........................................
Condition C o d e Setting ......................................................
I n t e r r u p t i o n Action ............................................................
Instruction L e n g t h R e c o r d i n g ............................................
P r o g r a m I n t e r r u p t i o n s ........................................................
E d i t i n g ................................................................................
System Control Panel ..........................................................
I n p u t / O u t p u t O p e r a t i o n s ....................................................
Time a n d M e t h o d of C r e a t i n g a nd Storing Status
Indications ......................................................................
F u n c t i o n s T h a t M a y Differ A m o n g Models ....................
A l p h a b e t i c List of Instructions ..........................................
List of Instructions b y Set a n d F e a t u r e ..........................
I n d e x of Ins t ruc t i on F o r m a t s b y M n e m o n i c ....................
122
122
128
132
133
135
136
141
142
142
142
142
144
145
147
147
148
148
148
153
153
153
155
156
159
160
162
IBM System/360
The mM System/360 is a solid-state, program compatible, data processing system providing the speed,
precision, and data manipulating versatility demanded by the challenge of commerce, science, and industry. System/360, with advanced logical design implemented by microminiature technology, provides a
new dimension of performance, flexibility, and reliability. This dimension makes possible a new, more
efficient systems approach to all areas of information
processing, with economy of implementation and ease
of use. System/360 is a single, coordinated set of new
data processing components intended to replace the
old logical structure with an advanced creative design for present and future application.
The logical design of System/360 permits efficient
use at several levels of performance with the preservation of upward and downward program compatibility. Extremely high performance and reliability requirements are met by combining several models into
one multisystem using the multisystem feature.
General-Purpose Design
System/360 is a general-purpose system designed to
be tailored for commercial, scientific, communications,
or control applications. A Standard instruction set provides the basic computing function of the system. To
this set a decimal feature may be added to provide a
Commercial instruction set or a floating-point feature
may be added to provide a Scientific instruction set.
When the storage protection feature is added to the
commercial and scientific features, a Universal set is
obtained. Direct control and timer features may be
added to satisfy requirements for TELE-maOCESSINC
systems to allow load-sharing or to satisfy real-time
needs.
System/360 can accommodate large quantities of
addressable storage. The markedly increased capacities over other present storage are provided by the
combined use of high-speed storage of medium size
and large-capacity storage of medium speed. Thus,
the requirements for both performance and size are
satisfied in one system by incorporating a hierarchy
of storage units. The design also anticipates future
development of even greater storage capacities. System/360 incorporates a standard method for attaching
input/output devices differing in function, data rate,
:
Compatibility
All models of System/360 are upward and downward
compatible, that is, any program gives identical results
on any model. Compatibility allows for ease in systems
growth, convenience in systems backup, and simplicity
in education.
The compatibility rule has three limitations.
1. The systems facilities used by a program should
be the same in each case. Thus, the optional cPv features and the storage capacity, as well as the quantity,
type, and priority of I/o equipment, should be equivalent.
2. The program should be independent of the relation of instruction execution times and of I/O data
rates, access times, and command execution times.
3. The compatibility rule does not apply to detail
functions for which neither frequency of occurrence
nor usefulness of result warrants identical action in
all models. These functions, all explicitly identified in
this manual, are concerned with the handling of invalid programs and machine malfunctions.
System Program
Interplay of equipment and program is an essential
consideration in System/360. The system is designed
to operate with a supervisory program that coordinates and executes all I/O instructions, handles exceptional conditions, and supervises scheduling and execution of multiple programs. System/360 provides for
mM System/360
System Alerts
The interruption system permits the cPu automatically
to change state as a result of conditions arising outside of the system, in I/O units, or in the cPc itself.
Interruption switches the cPu from one program to
another by changing not only the instruction address
but all essential machine-status information.
A storage protection feature permits one program to
be preserved when another program erroneously attempts to store information in the area assigned to
the first program. Protection does not cause any loss
of performance. Storage operations initiated from the
cPu, as well as those initiated from a channel, are subject to the protection procedure.
Programs are checked for correct instructions and
data as they are executed. This policing-action identifies and separates program errors and machine errors.
Thus, program errors cannot create machine cheeks
since each type of error causes a unique interruption.
In addition to an interruption due to machine malfunction, the information necessary to identify the
error is recorded automatically in a predetermined
storage location. This procedure appreciably reduces
the mean-time to repair a machine fault. Moreover,
operator errors are reduced by minimizing the active
manual controls. To reduce accidental operator errors,
operator consoles are i/o devices and function under
control of the system program.
Input~Output
Channels provide the data path and control for I/o
devices as they communicate with the cPv. In general,
channels operate asynchronously with the cPv and, in
some cases, a single data path is made up of several
subchannels. When this is the case, the single data
path is shared by several low-speed devices, for example, card readers, punches, printers, and terminals.
This channel is called a multiplexor channel. Channels that are not made up of several such subchannels
can operate at higher speed than the multiplexor
channels and are called selector channels. In every
case, the amount of data that comes into the channel
in parallel from an I/O device is a byte (i.e., eight
bits). All channels or subchannels operate the same
and respond to the same I/O instructions and commands.
Each i/o device is connected to one or more channels by an I/O interface. This I/O interface allows attachment of present and future I/O devices without
altering the instruction set or channel function. Control units are used where necessary to match the internal connections of the i/o device to the interface.
Flexibility is enhanced by optional access to a control
unit or device from either of two channels.
Multisystem Operation
Technology
System/360 employs solid-logic integrated components, which in themselves provide advanced equipment reliability. These components are also faster and
smaller than previous components and lend themselves to automated fabrication.
System Structure
Main Storage
Storage units may be either physically integrated with
the cpu or constructed as stand-alone units. The storage cycle is not directly related to the internal cycling
of the cPu, thus permitting selection of optimum storage speed for a given word size. The physical differences in the various main-storage units do not affect
the logical structure of the system.
Fetching and storing of data by the cpu are not affected by any concurrent I/o data transfer. If an I/O
operation refers to the same storage location as the
cPU operation, the accesses are granted in the sequence in which they are requested. If the first reference changes the contents of the location, any subsequent storage fetches obtain the new contents. Concurrent I/o and cPu references to the same storage
location never cause a machine-check indication.
Information Formats
The system transmits information between main storage and the cPu in units of eight bits, or a multiple
of eight bits at a time. An eight-bit unit of information
is called a byte, the basic building block of all formats.
A ninth bit, the parity or check bit, is transmitted
with each byte and carries parity on the bytes. The
parity bit cannot be affected by the program; its only
effect is to cause an interruption when a parity error
is detected. References to the size of data fields and
registers, therefore, exclude the associated parity bits.
All storage capacities are expressed in number of bytes
provided, regardless of the physical word size actually
used.
Bytes may be handled separately or grouped together in fields. A hal[word is a group of two consecutive bytes and is the basic building block of instructions. A word is a group of four consecutive bytes; a
double word is a field consisting of two words (Figure
2). The location of any field or group of bytes is specified by the address of its leftmost byte.
The length of fields is either implied by the operation to be performed or stated explicitly as part of
the instruction. When the length is implied, the information is said to have a fixed length, which can be
either one, two, four, or eight bytes.
When the length of a field is not implied by the
~o
Maln
Storage
I/0 Devices
Control Units
Channels
1
.JMultiplexor
Central
)rocessing
Unit
I
Selector
1
Control Units
I/0 Devices
operation code, but is stated explicitly, the information is said to have variable field length. Variablelength operands are variable in length by increments
of one byte.
Within any program format or any fixed-length operand format, the bits making up the format are consecutively numbered from left to right starting with
the number 0.
Byte
000001
0
Hal fword
1 O1 0 0 0 1 ]
0
1 O1 0 0 1
7 8
15
Word
!1 1 0 0 1 0 0 1 I1 1 0 0 0 0 1 0 1 1I 0 1 0 1 , 0l0 1 1 1 1 0 0 1
I
7 8
15 "16
23 24
il
Binary 0000 0001 /0010 0011 0100 0101 0110 0111 I000 I001 I010
Address
31
Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte Byte
Addressing
Byte locations in storage are consecutively numbered
starting with 0; each number is considered the address of the corresponding byte. A group of bytes in
storage is addressed by the leftmost byte of the group.
The addressing capability permits a maximum of
16,777,216 bytes, using a 24-bit binary address. This
set of main-storage addresses includes some locations
reserved for special purposes.
Storage addressing wraps around from the maximum
byte address, 16,777,215, to address 0. Variable-length
operands may be located partially in the last and partially in the first location of storage, and are processed
without any special indication.
When only a part of the maximum storage capacity
is available in a given installation, the available storage is normally contiguously addressable, starting at
address 0. An addressing exception is recognized
when any part of an operand is located beyond the
maximum available capacity of an installation. The
addressing exception is only recognized when the data
are actually used and not when the operation is completed prior to the use of the data.
In some models main storage may be shared by
more than one cPu. In that case, the address of a byte
location is normally the same for each ceu.
Information Positioning
Fixed-length fields, such as halfwords and double
words, must be located in main storage on an integral
Halfword
Halfword
Halfword
J
Word
J
Double-Word
Halfword Halfword
Word
Word
Double-Word
Storage Address
MAIN STORAGE
Instructions
!
I
I
I
I
Computer
System
Control
I
I
I
t
Indexed
Address
IT M
Variable
Field Length
Operations
Fixed Point
Operations
I
I
I
J
Floating Point
Operations
4
Floating Point Registers
16
General
Registers
General
Registers
The cPu can address information in 16 general registers. The general registers can be used as index registers, in address arithmetic and indexing, and as accumulators in fixed-point arithmetic and logical operations. The registers have a capacity of one word (32
bits). The general registers are identified by numbers
0-15 and are selected by a four-bit field in the instruction called the R field (Figure 5).
R Field
Reg No.
General Registers
0000
0001
0010
0
1
2
~.~.:~:32
.:. Bits~" ,~]
.F.~::~i!~ii::!iii!::i::!::::i::::::::i::i::!i::!iii::!::ii~::ii::!~]
t~i:~:!i~::i~fi:~i~:~:~i::~::i~i~i~:i~
0100
::::::::::::::::::::::::::::::::::::::::::
0101
0110
0111
1000
5
6
7
8
::.:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::~
==========================================================================
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
[:i:ii:i~i~:~i:i:i:i:i:i:i:i:i:i:::ii~l
!:i!i!:~!:i:
1001
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
1010
10
li~i!i::i::i::iii!::i!!::i::i::!::i~ii!i!i!i~i!i~!i::i!.i::i::~
1011
11
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
1100
1101
111 o
1111
12
13
14
15
~i!iiii:~iiiiiiiiiiiiiiiiiii~iiiii::i::i~i::ii!ili]iiiiiii]
~ii~i:i:i:r~::!~i:~:i:i:~:!:ii:!:!:~:i:~:!:!:~:!~i~!:i~i:~:i:~
~iii::!~ii!i!i!iiiiiiiiiii:~iiiiiii!iiiiii:::,iiii:,iiii~
~:~i~::iii:.i::i::i::ii::!::ii::i::ii::i::ii::i::i::i::i::ii!~ii!ii~t
Registers
Four floating-point registers are available for floatingpoint operations. These registers are two words (64
bits) in length and can contain either a short (one
word) or a long (two word) floating-point operand.
A short operand occupies the high-order bits of a
floating-point register. The low-order portion of the
register is ignored and remains unchanged in shortprecision arithmetic. The floating-point registers are
identified by the numbers 0, 2, 4, and 6 (Figure 5).
The operation code determines which type of register
is to be used in an operation.
Arithmetic
IS!
0
Isl
0
,n,eger
I
15
,neger
1
I
31
Because the 32-bit word size conveniently accommodates a 24-bit address, fixed-point arithmetic can
be used both for integer operand arithmetic and for
address arithmetic. This combined usage provides
economy and permits the entire fixed-point instruction
set and several logical operations to be used in address computation. Thus, multiplication, shifting, and
logical manipulation of address components are possible.
The absence of the need for recomplementation and
the ease of extension and truncation make two's-complement notation desirable for address components
and fixed-point operands. Since integer and addressing
algorisms often require repeated reference to operands
or intermediate results, the use of multiple registers is
advantageous in arithmetic sequences and address calculations.
Additions, subtractions, multiplications, divisions,
and comparisons are performed upon one operand in
a register and another operand either in a register or
from storage. Multiple-precision operation is made
convenient by the two's-complement notation and by
recognition of the carry from one word to another. A
10
Decimal
Arithmetic
Sign Code
0000
0001
2
3
4
5
6
7
8
9
0010
0011
0100
0101
0110
0111
1000
1001
+
-
+
+
1010
1011
1100
1101
1110
1111
Decimal numbers may also appear in a zoned format as a subset of the eight-bit alphameric character
set (Figure 8). This representation is required for
character-set sensitive I/o devices. The zoned format
is not used in decimal arithmetic operations. Instructions are provided for packing and unpacking decimal
numbers so that they may be changed from the zoned
to the packed format and vice versa.
Floating-Point Arithmetic
Floating-point numbers occur in either of two fixedlength formats - short or long. These formats differ
only in the length of the fractions (Figure 9).
Logical Operations
Short Floating-Point Number
0
Fraction
78
I~1 Characteristic !
0
Fraction
78
11
Logical Data,
Variable-Length
Logical Information
]Character
Character
2221
I--16
Program Execution
Character
Instruction
BIT POSITIONS
EBCDIC
Format
01234567
ASCmS
76x54321
The preferred codes do not have a graphic defined
for all 256 eight-bit codes. When it is desirable to represent all possible bit patterns, a hexadecimal representation may be used instead of the preferred eightbit code. The hexadecimal representation uses one
graphic for a four-bit code, and therefore, two graph-
Bit Positions
Li
00
r-23
5B71
oo
0000
0~
~o
I '
01
0o
10
11
00
01
I I
10
11
11
00
01
10
11
<
0
1
'.... > !
F A:J
OOlO
0011
PN
C
D
L
M
3
4
RS
UC
NULL
blank
0001
OlOO
OlOl
o11o
PF
RES
HT
NL
LC
BS
o111
1ooo
DEL
IDL
BYP
LF
r
! EOB
PRE
EOT
10Ol
lOlO
1011
11oo
?
!
1101
1110
,,,
....
6
7
1111
12
10
I I
,,,
Bit Positions
~ 76
'
4321
10
00
r-XS
oo
01
10
0000
N U LL
DC 0
0001
SOM
DC I
11
10
11
O0
01
lO
11
O0
O1
15
blank
!
O0
1o
11
0010
EOA
DC 2
"
0011
EOM
DC 3
:1:1:
0100
EOT
DC4
STOP
0101
WRU
ERR
0110
RU
SYNC
&
.6
0111
BELL
LEM
y
z
1000
BKSP
SO
1001
HT
SI
i 010
LF
S2
1011
VT
S3
1 I00
FF
S4
1101
CR
S5
1110
SO
1111
SI
IZ
Z]
rn
.
_
S6
]S 7
/"
>'7
ESC
DEL
Figure 12. Eight-Bit Representation for American Standard Code for Information Interchange
for Use in Eight-Bit Environment (ASCII-8)
ter-to-storage operation; sI, a storage and immediateoperand operation; and ss, a storage-to-storage operation.
For purposes of describing the execution of instructions, operands are designated as first and second operands and, in the case of BRANCHON INDEX, third operands. These names refer to the manner in which the
operands participate. The operand to which a field in
an instruction format applies is generally denoted by
the number following the code name of the field, for
example, R1, B1, L~, D2.
In each format, the first instruction halfword consists of two parts. The first byte contains the operation code (op code). The length and format of an
instruction are specified by the first two bits of the
operation code.
INSTRUCTION
BIT POSITIONS
(0-1)
00
01
10
11
LENGTH
INSTRUCTION
LENGTH
One halfword
Two halfwords
Two halfwords
Three halfwords
RECORDING
INSTRUCTION
FORMAT
Address
RR
RX
RS or SI
SS
Generation
System Structure
13
I
I
Register
Register
Operand I Operand 2
Op ode J
7 8
11 12
15
Register
Address
Operand 1
perand 2
OpCode
J R1
7 8
X~I~
11 12
15 16
I
D2
I
19 20
I
I
Register
Operand 1 Operand 3
'%"''v
"~'','t
-v~
"
Address
O
Opera,rid
2
'
OpCode j "R1,,i Ra J B2 J
7 8
11 12
15 16
Operand
,
Op Code !
12
!~
SI Format
31
I
Address
I
I
perand 1
A
,'---.v-.-...~----v
p Code
11 12
I
I
I
D1
19 20
Operand 1 perand 2
7 8
J RS Format
31
'lr
15 16
Address
Operand 1
II
7 8
I Length
I
I
D2
1920
I Immediate M
RX Format
31
Register
r'
15 16
19 20
Address
Operand 2
A
D2
1
31
J SS Format
47
instructions.
Format
Add
7 8
11 12
15
Format
300
0
7 8
11 12
15 16
1920
A double word, the program status word (Psw), contains the information required for proper program
execution. The Psw includes the instruction address,
condition code, and other fields to be discussed. In
general, the Psw is used to control instruction sequencing and to hold and indicate the status of the
system in relation to the program being executed. The
active or controlling PSW is called the "current PSW."
By storing the current PSW during an interruption, the
status of the cPV can be preserved for subsequent inspection. By loading a new rsw or part of a PSW, the
state of the cPV can be initialized or changed. Figure
14 shows the PSW format.
System Structure
15
System Mask
I KeY I AMWPI
78
11 12
ilLCICC! ProgramMaskI
32 33 34 35 36
Interruption Code
15 16
Instruction Address
39 40
14
15
16-31
32-33
34-35
36-39
36
37
38
39
40-63
Interruption
The interruption system permits the cPv to change
state as a result of conditions external to the system,
in input/output ( # o ) units or in the cPu itself. Five
classes of interruption conditions are possible. #o,
program, supervisor call, external, and machine check.
Each class has two related Psw's called "old" and
"new" in unique main-storage locations (Figure 15).
In all classes, an interruption involves merely storing
the current Psw in its "old" position and making the
Psw at the "new" position the current Psw. The "old"
Psw holds all necessary status information of the system existing at the time of the interruption. If, at the
conclusion of the interruption routine, there is an instruction to make the old Psw the current Psw, the
system is restored to the state prior to the interruption
and the interrupted routine continues.
Address
0
8
16
24
32
40
48
56
64
72
76
80
84
88
96
104
112
120
128
0000 0000
0000 1000
0001 0000
0001 1000
0010 0000
0010 1000
0011 0000
0011 1000
0t00 0000
0100 1000
0 1 0 0 1100
0101 0000
0101 0100
0101 1000
0110 0000
0110 1000
0111 0000
0111 1000
1000 0000
Length
double
double
double
double
double
double
double
double
double
word
word
word
word
double
double
double
double
double
word
word
word
word
word
word
word
word
word
word
word
word
word
word
Purpose
Initial program Loading PSW
Initial program Loading CCW1
Inltlql program Loading CCW2
External old PSW
Supervisor call old PSW
Programold PSW
Machine check old PSW
Input/output old PSW
Channel status word
Channel address word
Unused
Timer
Unused
External new PSW
Supervisor call new PSW
Programnew PSW
Machine check new PSW
Input/output new PSW
Diagnostic scan-out area*
16
Interruptions are taken only when the cPu is interruptable for the interruption source. The system mask,
program mask, and machine check mask bits in the
PSW may be used to mask certain interruptions. When
masked off, an interruption either remains pending or
is ignored. The system mask may keep # o and external interruptions pending, the program mask may
cause four of the 15 program interruptions to be ignored, and the machine-check mask may cause machine-check interruptions to be ignored. Other interruptions cannot be masked off.
An interruption always takes place after one instruction execution is finished and before a new instruction execution is started. However, the occurence
of an interruption may affect the execution of the current instruction. To permit proper programmed action
following an interruption, the cause of the interruption is identified and provision is made to locate the
last executed instruction.
Input~Output Interruption
00000001
00000010
00000011
00000100
00000101
00000110
00000111
00001000
00001001
00001010
00001011
00001100
00001101
00001110
00001111
Program Interruption
Cause
Operation
Privileged operation
Execute
Protection
Addressing
Specification
Data
Fixed-point overflow
Fixed-polnt dlvlde
Decimal overflow
Decimal divide
Exponent overflow
Exponent underflow
Significance
Floating-point divide
Supervisor-Call Interruption
Externa 1
Interruption Cause
Timer
Interrupt key
External signal
External signal
External signal
External signal
External signal
External signal
Mask Bit
6
5
4
3
2
1
7
7
7
7
7
7
7
7
During execution of an instruction, several interruption requests may occur simultaneously. Simultaneous
interruption requests are honored in the following predetermined order:
Machine Cheek
Program or Supervisor Call
External
Input/Output
The program and supervisor-call interruptions are
Over-all cPu status is determined by four types of program-state alternatives, each of which can be changed
independently to its opposite and most of which are
indicated by a bit or bits in the Psw. The programstate alternatives are named stopped or operating,
running or waiting, masked or interruptable, and supervisor or problem state. These states differ in the way
they affect the cPu functions and the manner in which
their status is indicated and switched. All program
states are independent of each other in their functions,
indication, and status-switching.
Stopped or Operating States: The stopped state is
entered and left by manual procedure. Instructions are
not executed, interruptions are not accepted, and the
timer is not updated. In the operating state, the cPO
is capable of executing instructions and being interrupted.
Running or Waiting State: In the running state, instruction fetching execution proceeds in the normal
manner. The wait state is normally entered by the
program to await an interruption, for example, an I/O
interruption or operator intervention from the console.
In the wait state, no instructions are processed, the
timer is updated, and I/O and external interruptions
are accepted, unless masked. Running or waiting state
is determined by the setting of bit 14 in the Psw.
Masked or Interruptable State: The cPtr may be interruptable or masked for the system, program, and
machine interruptions. When the cPu is interruptable
for a class of interruptions, these interruptions are accepted. When the cPU is masked, the system interruptions remain pending, while the program and machine-check interruptions are ignored. The interruptable states of the cPu are changed by changing the
mask bits of the Psw.
System Structure
17
Protection Feature
The Protection Feature protects the contents of certain areas of storage from destruction due to erroneous storing of information during the execution of a
program. This protection is achieved by identifying
blocks of storage with a storage key and comparing
this key with a protection key supplied with the data
to be stored. The detection of a mismatch results in
a protection interruption.
For protection purposes, main storage is divided into blocks of 2,048 bytes. A four-bit storage key is associated with each block. When data are stored in a
storage block, the storage key is compared with the
protection key. When storing is specified by an instruction, the protection key of the current PSW is
used as the comparand. When storing is specified by
a channel operation, a protection key supplied by the
channel is used as the comparand. The keys are said
to match when they are equal or when either one is
zero.
The storage key is not part of addressable storage.
The key is changed by SET STORAGE KEY and is inspected by INSERT STORAGEKEY. The protection key in
the Psw occupies bits 8-11 of that control word. The
protection key of a channel is recorded in bits 0-3 of
the csw, which is stored as a result of the channel
operation. When a protection mismatch due to an instruction is detected, the execution of this instruction
is suppressed or terminated, and the program execution is altered by an interruption. The protected storage location always remains unchanged. Protection
mismatch due to an i/o operation causes the data
transmission to be terminated in such a way that the
protected storage location remains unchanged. The
mismatch is indicated in the csw stored as a result of
the operation.
Timer Feature
The timer is provided as an interval timer and may
be programmed to maintain the time of day. The
timer consists of a full word in main storage location
80. The timer word is counted down at a rate of 50
or 60 cycles per second, depending on line frequency.
The timer word is treated as a signed integer following the rules of fixed-point arithmetic. An external interruption condition is signaled when the value of the
18
Multisystem Feature
The design of System/360 permits communication between individual cpu's at several transmission rates.
The communication is possible through shared control units, through a channel connector and through
shared storage. These features are further augmented
by the direct control feature and the multisystem
feature. The direct control feature, described in
the previous section, can be used to signal from one
cPu to another. The multisystem feature provides direct address relocation, malfunction indications, and
electronic cPu initialization.
The relocation procedure applies to the first 4,096
bytes of storage. This area contains all permanent
storage assignments and, generally, has special significance to supervisory programs. The relocation is accomplished by inserting a 12-bit prefix in each address
which has the high-order 12 bits set to zero and hence,
pertains to location 0-4095. Two manually set prefixes
are available to permit the use of an alternative area
when storage malfunction occurs. The choice between
the prefixes is determined by a prefix trigger set during initial program loading.
To alert one cvu to the possible malfunction of another cvu, a machine check-out signal is provided,
which can serve as an external interruption to another
CPU.
Input~Output
Input/Output Instructions
The System/360 uses only four I/O instructions:
START I/O
Input/Output Interface
So that the cPu may control a wide variety of # o
devices, all control units are designed to respond to a
standard set of signals from the channel. This controlunit-to-channel connection is called the I/O interface.
It enables the cPu to handle all I/O operations with
only four instructions.
Channels
Channels connect with the cPu and main storage and,
via the I/O interface, with control units. Each channel has facilities for:
Accepting I/O instructions from the CPU
Addressing devices specified by I/O instructions
Fetching channel control information from main storage
Decoding control information
Testing control information for validity
Executing control information
Providing control signals to the I/O interface
Accepting control-response signals from the I/O interface
Buffering data transfers
Checking parity of bytes transferred
Counting the number of bytes transferred
Accepting status information from I/O devices
Maintaining channel-status information
Sending requested status information to main storage
Sequencing interruption requests from I/O devices
Signaling interruptions to the CPU
TEST CHANNEL
TEST I/O
HALT I/O
19
Command
Code
0
78
31
[ F,ogs
32
Data Address
36 37
Coon.,"39 40
47 4 8
63
[.Key
0
100001
34
Con~mand Address
78
]
31
Write
Input/Output Commands
Control
CPU
Channels
(Executes
Vo
(Executes
Instructions)
Commands)
Control Units
and
I/O Devices
(Executes
Orders)
Read
Sense
Transfer in Channel
The transfer-in-channel command specifies the location of the next ccw to be used by the channel whenever the programmer desires to break the existing
chain of ccw's and cause the channel to begin fetching a new chain of ccw's from a different area in
main storage.
External documents, such as punched cards or magnetic tape, may carry cow's that the channel can use
to govern reading of the external document being
read.
System C o n t r o l P a n e l
The system control panel provides the switches, keys,
and lights necessary to operate and control the system.
The need for operator manipulation of manual controls is held to a minimum by the system design and
the governing supervisory program. The result is fewer and less serious operator errors.
Input/Output Termination
Input/output operations normally terminate with device-end signal and channel-end conditions and an interruption signal to the cPu.
A command can be rejected during execution of
START #O, however, by a busy condition, program
check, etc. The rejection of the command is indicated
in the condition code in the PSW, and the details of
the conditions that precluded initiation of the # o operation are provided in the channel status word stored
when the command is rejected.
. Command Address
The store-and-display function permits manual intervention in the progress of a program. The function
may be provided by a supervisory program in conjunction
with proper I/o equipment and the interrupt
32
47 48
63
key. Or, the system-control-panel facilities may be
Bits 0-3 contains the storage-protection key used in the
used to place the cPu in the stopped state, and then
operation.
to store and display information in main storage, in
Bit 4-7 contain zeros.
Bits 8-31 specify the location of the last CCW used.
general and floating-point registers, and in instructionBits 32-47 contain an I/O device-status byte and a channel- address portion of the Psw.
0
34
78
31
status Byte. The status Bytes provide such information as datacheck, chaining check, control-unit end, etc.
Bits 48-63 contain the residual count of the last CCW used.
Input/Output Interruptions
Input/output interruptions are caused by termination
of an I/O operation or by operator intervention at the
21
22
Load light
Load-unit switches
Load key
Fixed-Point Arithmetic
The fixed-point instruction set performs binary arithmetic on operands serving as addresses, index quantities, and counts, as well as fixed-point data. In general,
both operands are signed and 32 bits long. Negative
quantities are held in two's-complement form. One
operand is always in one of the 16 general registers;
the other operand may be in main storage or in a
general register.
The instruction set provides for loading, adding,
subtracting, comparing, multiplying, dividing, and
storing, as well as for the sign control, radix conversion, and shifting of fixed-point operands. The entire
instruction set is included in the standard instruction
set.
The condition code is set as a result of all signcontrol, add, subtract, compare, and shift operations.
D a t a Format
JsJ
0
Integer
31
JSl
0
Integer
15
Number
Representation
23
Instruction
Format
Op Code
7 8
11 12
15
RX Format
OpCodo 1 R, I x2 ! B2 i
0
7 8
11 12
1516
D2
1920
RS Format
i PCdlR1 R31B21
0
Condition
Add H/F
Add Logical
Compare H/F
Load and Test
Load Complement
Load Negative
Load Positive
Shift Left Double
Shift Left Single
Shift Right Double
Shift Right Single
Subtract H/F
Subtract Logical
24
7 8
11 12
15 16
1920
Code
0
zero
zero
no carry
equal
zero
zero
zero
zero
zero
zero
zero
zero
zero
--
1
< zero
not zero,
no carry
low
< zero
< zero
~ zero
-< zero
< zero
< zero
< zero
< zero
not zero,
no carry
2
> zero
zero,
carry
high
> zero
> zero
. . .
> zero
> zero
~ zero
> zero
> zero
> zero
zero,
carry
3
overflow
not zero,
carry
--overflow
.
overflow
overflow
overflow
--overflow
not zero,
carry
In these formats, R1 specifies the address of the general register containing the first operand. The second
operand location, if any, is defined differently for each
format.
In the Rr~ format, the R2 field specifies the address of
the general register containing the second operand.
The same register may be specified for the first and
second operand.
In the l~x format, the contents of the general registers specified by the X2 and B2 fields are added to
the content of the D2 field to form an address designating the storage location of the second operand.
In the Rs format, the content of the general register
specified by the B2 field is added to the content of the
De field to form an address. This address designates
the storage location of the second operand in LOAD
MULTIPLE and STORE MULTIPLE. In the shift operations,
the address specifies the amount of shift. The Rs field
specifies the address of a general register in LOAD
MULTIPLE and STORE MULTIPLE and is ignored in the
shift operations.
A zero in an X2 or B2 field indicates the absence of
the corresponding address component.
An instruction can specify the same general register
both for address modification and for operand location. Address modification is always completed before
operation execution.
Results replace the first operand, except for STORE
and CONVERT TO DECIMAL, where the result replaces
the second operand.
The contents of all general registers and storage
locations participating in the addressing or execution
part of an operation remain unchanged, except for the
storing of the final result.
Instructions
Load
The fixed-point arithmetic instructions and their mnemonics, formats, and operation codes are listed in the
following table. The table also indicates when the condition code is set and the exceptional conditions that
cause a p r o g r a m interruption.
LR
NAME
MNEMONIC
Load
Load
Load Halfword
Load and Test
Load Complement
Load Positive
Load Negative
Load Multiple
Add
Add
Add Halfword
Add Logical
Add Logical
Subtract
Subtract
Subtract Halfword
Subtract Logical
Subtract Logical
Compare
Compare
Compare Halfword
Multiply
Multiply
Multiply Halfword
Divide
Divide
Convert to Binary
Convert to Decimal
Store
Store Halfword
Store Multiple
Shift Left Single
Shift Right Single
Shift Left Double
Shift Right Double
LR
L
LH
LTR
LCR
LPR
LNR
LM
AR
A
AH
ALR
AL
SR
S
SH
SLR
SL
CR
C
CH
MR
M
MH
DR
D
CVB
CVD
ST
STH
STM
SLA
SRA
SLDA
SRDA
TYPE
RR
RX
RX
RR
RR
RR
RR
RS
RR
RX
RX
RR
RX
RR
RX
RX
RR
RX
RR
RX
RX
RR
RX
RX
RR
RX
RX
RX
RX
RX
RS
RS
RS
RS
RS
EXCEPTIONS
A,S
A,S
C
C
C
C
IF
IF
A,S
C
C
C
C
C
C
C
C
C
C
C
C
C
IF
A,S, IF
A,S, IF
A,S
IF
A,S, IF
A,S, IF
A,S
A,S
A,S
S
A,S
A,S
S, IK
A,S, IK
A,S,D,IK
P,A,S
P,A,S
P,A,S
P,A,S
C
IF
C
C
S, IF
C
S
CODE
18
58
48
12
13
10
11
98
1A
5A
4A
1E
5E
1B
5B
4B
1F
5F
19
59
49
1C
5C
4C
1D
5D
4F
4E
50
40
90
8B
8A
8F
8E
!18
0
Addressing exception
Condition code is set
Data exception
Fixed-Point overflow exception
Fixed-point divide exception
Protection exception
Specification exception
IRilR21
7 8
11 12
15
7 8
11 12
15 16
RX
58
19 20
31
The second operand is placed in the first operand location. The second operand is not changed.
Condition Code: The code remains unchanged.
Program Interruptions:
Addressing ( L only)
Specification ( L only )
Load Halfword
LH
RX
48
D2
7 8
11 12
15 16
1920
31
Program Interruptions:
Addressing
Specification
NOTES
A
C
D
IF
IK
P
S
RR
RR
12
Programming Note
and
also
7 8
11 12
15
The second operand is placed in the first operand location, and the sign and m a g n i t u d e of the second operand determine the condition code. The second operand is not changed.
Fixed-Point Arithmetic
25
Result is zero
Result is less than zero
Result is greater than zero
-Program Interruptions: None.
Result is zero
--
2
3
Program Interruptions:
Fixed-point overflow
Programming Note
Load Negative
LNR
Load Complement
LCR
RR
11
7 8
11 12
15
RR
7 8
11 12
15
--
--
one.
Load Multiple
LM
RS
Program Interruptions:
Fixed-point overflow
98
Programming Note
Load Positive
LPR
I
0
RR
10
I R1 I R2i
7 8
11 12
15
D2
7 8
11 12
15 16
1920
Program Interruptions:
Addressing
Specification
Programming Note
RR
7 8
RX
sA
11 12
15
IRll21B21
7 8
11 12
15 16
2
1920
0
1
2
3
Program Interruptions:
Addressing
Specification
Fixed-point overflow
Add Logical
ALR
RR
1E
AL
Program Interruptions:
Addressing (A only )
Specification (A only)
Fixed-point overflow
Programming Note
4A
11 12
15 16
11 12
15
7 8
11 12
15 16
D2
5E
0 Sum is zero
1 Sum is less than zero
2 Sum is greater than zero
3 Overflow
7 8
7 8
RX
AH
Sum is zero
Sum is less than zero
Sum is greater than zero
Overflow
19 20
1920
31
0
1
2
3
Sum
Sum
Sum
Sum
is
is
is
is
27
Program Interruptions:
The halfword second operand is expanded to a fullword before the subtraction by propagating the signbit value through 16 high-order bit positions.
Subtraction is performed by adding the one's complement of the expanded second operand and a loworder one to the first operand. All 32 bits of both operands participate, as in noD. If the carries out of the
sign-bit position and the high-order numeric bit position agree, the difference is satisfactory; if they disagree, an overflow occurs. The overflow causes a program interruption when the fixed-point overflow mask
bit is one.
RR
1B
S
I R1 I
.....I
7 8
11 12
15
7 8
11 12
1516
RX
D2
0
0 Difference is zero
1 Difference is less than zero
2 Difference is greater than zero
3 Overflow
1920
The second operand is subtracted from t h e first operand, and the difference is placed in the first operand
location.
Subtraction is performed by adding the one's complement of the second operand and a low-order one to
the first operand. All 32 bits of both operands participate, as in ADD. If the carries out of the sign-bit position and the high-order numeric bit position agree, the
difference is satisfactory; if they disagree, an overflow
occurs. The overflow causes a program interruption
when the fixed-point overflow mask bit is one.
Program Interruptions:
Addressing
Specification
Fixed-point overflow
Subtract Logical
SLR
RR
1F
Program Interruptions:
Addressing (S only)
Specifications (S only)
Fixed-point overflow
SL
RX
IRIlR21
7 8
5F
11 12
15
I Rllx21B21
7 8
11 12
15 16
1920
Programming Note
RX
D2
4B
0
7 8
11 12
1516
1920
31
The second operand is subtracted from the first operand, and the difference is placed in the first operand
location. The occurrence of a carry out of the sign
position is recorded in the condition code.
Logical subtraction is performed by adding the one's
complement of the second operand and a low-order
one to the first operand. All 32 bits of both operands
participate, without further change to the resulting
sign bit. The instruction differs from SUBTRACTin the
meaning of the condition code and in the absence of
the interruption for overflow.
If a carry out of the sign position occurs, the leftmost bit of the condition code (Psw bit 34) is made
one. In the absence of a carry, bit 34 is made zero.
When the sum is zero, the rightmost bit of the condition code (PSW bit 35) is made zero. A nonzero sum
is indicated by a one in bit 35.
--
Program Interruptions:
Addressing ( SL only)
Specification ( SL only)
Program Interruptions:
Programming Note
Addressing
Specification
Multiply
Compare
CR
MR
RR
19
C
IRllR2
7 8
. . . . . . .
11 12
15
RX
02
59
7 8
11 12
15 16
19 20
11 12
15
7 8
11 12
1516
RX
Program Interruptions:
Addressing ( C only)
Specification ( C only)
Compare Halfword
CH
7 8
D2
31
The first operand is compared with the second operand, and the result determines the setting of the
condition code.
Comparison is algebraic, treating both comparands
as 32-bit signed integers. Operands in registers or
storage are not changed.
0
1
2
3
RR
RX
1920
1
31
Program Interruptions:
78
1112
1516
19 20
31
Addressing ( M only)
Specification
Programming Note
The first operand is compared with the halfword second operand, and the result determines the setting of
the condition code.
The halfword second operand is expanded to a fullword before the comparison by propagating the signbit value through the 16 high-order bit positions.
29
Multiply Halfword
MH
RX
02
4C
7 8
11 12
15 16
1920
i
31
The product of the halfword multiplier (second operand) and multiplicand (first operand) replaces the
multiplicand.
Both multiplicand and product are 32-bit signed
integers and may be located in any general register.
The halfword multiplier is expanded to a fullword
before multiplication by propagating the sign-bit value
through the 16 high-order bit positions. The multiplicand is replaced by the low-order part of the product. The bits to the left of the 32 low-order bits are
not tested for significance; no overflow indication is
given.
The sign of the product is =determined by the rules
of algebra from the multiplier and multiplicand sign,
except that a zero result is always positive.
Condition Code: The code remains unchanged.
Program Interruptions:
Addressing
Specification
The significant part of the product usually occupies 46
bits or fewer, the exception being 47 bits when both
operands are maximum negative. Since the low-order
32 bits of the product are stored unchanged, ignoring
all bits to the left, the sign bit of the result may differ
from the true sign of the product in the ease of overflow.
Divide
RR
7 8
11 12
15
7 8
11 12
15 16
RX
19 20
31
Program Interruptions:
Addressing ( D only)
Specification
Fixed-point divide
Programming Note
Convert to Binary
Programming Note
DR
CVB
RX
D2
4F
7 8
11 12
15 16
1920
!
31
The radix of the second operand is changed from decimal to binary, and the result is placed in the first
operand location. The number is treated as a rightaligned signed integer both before and after conversion.
The second operand has the packed decimal data
format and is checked for valid sign and digit codes.
Improper codes are a data exception and cause a program interruption. The decimal operand occupies a
double-word storage field, which must be located on
an integral boundary. The low-order four bits of the
field represent the sign. The remaining 60 bits contain
15 binary-coded-decimal digits in true notation. The
packed decimal data format is described under "Decimal Arithmetic."
The result of the conversion is placed in the general
register specified by R1. The maximum number that
can be converted and still be contained in a 32-bit
register is 2,147,483,647; the minimum number is
-2,147,483,648. For any decimal number outside this
range, the operation is completed by placing the 32
low-order binary bits in the register; a fixed-point
The 32 bits in the general register are placed unchanged at the second operand location.
Condition Code: The code remains unchanged.
Program Interruptions:
Program Interruptions:
Protection
Addressing
Specification
Addressing
Specification
Data
Fixed-point divide
Store Halfword
STH
RX
Convert to Decimal
CVD
D2
RX
0
7 8
11 12
15 16
1920
Program Interruptions:
Protection
Addressing
Specification
Store
ST
!
0
RX
5o
7 8
11 12
1516
1920
31
7 8
11 12
15 16
1920
31
Program Interruptions:
Protection
Addressing
Specification
Store Multiple
STM
RS
D2
0
78
11 12
1516
1920
31
Program Interruptions:
Protection
Addressing
Specification
Fixed-Point Arithmetic
31
0
1
2
3
RS
!', F////A
7 8
11 12
15 16
',
[
19 20
D2
[
31
Result is zero
Result is less than zero
Result is greater than zero
--
Program Interruptions:
The integer part of the first operand is shifted left the
number of bits specified by the second operand address.
The second operand address is not used to address
data; its low-order six bits indicate the number of bit
positions to be shifted. The remainder of the address
is ignored.
The sign of the first operand remains unchanged. All
31 integer bits of the operand participate in the left
shift. Zeros are supplied to the vacated low-order register positions.
If a bit unlike the sign bit is shifted out of position
1, an overflow occurs. The overflow causes a program
interruption when the fixed-point overflow mask bit
is one.
Fixed-point overflow
Programming Note
i,
0
RS
7 8
11 1"2
15 16
19 20
Programming Note
Result is zero
Result is less than zero
Result is greater than zero
Overflow
Program Interruptions:
SRA
None.
RS
7 8
11"12
15 16
1,,
1920
Program Interruptions:
Specification
Fixed-point overflow
RS
7 8
11 "12
15 16
19 20
--
Program Interruptions:
Specification
Programming Note
A zero shift amount in the double-shift operations
provides a double-length sign and magnitude test.
Fixed-Point Arithmetic
33
Decimal Arithmetic
D a t a Format
Representation
Numbers are represented as right-aligned true integers with a plus or minus sign.
The digits 0-9 have the binary encoding 0000-1001.
The codes 1010-1111 are invalid as digits. This set of
Instructions
Condition Code
0
zero
equal
zero
zero
Add Decimal
Compare Decimal
Subtract Decimal
Zero and Add
1
< zero
low
< zero
< zero
2
> zero
high
> zero
> zero
3
overflow
-overflow
overflow
The dt~cimal arithmetic instructions and their mnemonics and operation codes follow. All instructions
use the ss format and assume packed operands and
results. The only exceptions are PACK, which has a
zoned operand, and UNPACK, which has a zoned result.
The tab|e indicates the feature to which each instruction belongs, when the condition code is set, and the
exception that causes a program interruption.
NAME
SS Format
1
0
7 8
11 12
15 16
Ill I
1920
31 32
Ill"
35 36
47
TYPE
AP
SP
ZAP
CP
MP
DP
PACK
UNPK
MVO
SS
SS
SS
SS
SS
SS
SS
SS
SS
T,C
T,C
T,C
T,C
T
T
EXCEPTIONS
CODE
P,A, D,DF
P,A, D,DF
P,A, D,DF
A, D
P,A,S,D
P,A,S,D,DK
P,A
P,A
P,A
FA
FB
F8
F9
FC
FD
F2
F3
F1
NOTES
A
C
D
DF
DK
P
S
T
Instruction Format
MNEMONIC
Add Decimal
Subtract Decimal
Zero and Add
Compare Decimal
Multiply Decimal
Divide Decimal
Pack
Unpack
Move with Offset
Addressing exception
Condition code is set
Data exception
Decimal-overflow exception
Decimal-divide exception
Protection exception
Specification exception
Decimal feature
Programming Note
The moving, editing, and logical comparing instructions may also be used in decimal calculations.
Add Decimal
AP
I,
0
SS
7 8
11 12
15 16
1920
D,I
31 32
I1;
35 36
47
35
Subtract Decimal
$S
FB
7 8
11 12
15 16
1920
31 32
35 36
47
The second operand is subtracted from the first operand, and the difference is placed in the first operand
location.
Subtraction is algebraic, taking into account sign
and all digits of both operands. The SUBTRACT DECIMAL
is similar to ADD DECIMAL, except that the sign of the
second operand is changed from positive to negative
or from negative to positive after the operand is obtained from storage and before the arithmetic.
The sign of the result is determined by the rules of
algebra. A zero difference is always positive. When
36
Program Interruptions:
Operation (if decimal feature is not installed)
Protection
Addressing
Data
Decimal overttow
Programming Note
0 Difference is zero
1 Difference is less than zero
2 Difference is greater than zero
3 Overflow
SS
F8
7 8
Program Interruptions:
SP
ZAP
11 12
15 16
ill ,l
1920
31 32
ill
35 36
47
Result is zero
Result is less than zero
Result is greater than zero
Overflow
Program Interruptions:
Operation (if decimal feature is not installed)
Protection
Addressing
Data
Decimal overflow
Compare Decimal
Cp
SS
! L1 ,i
F9
7 8
11 12
1920
31 32
35 36
47
Program Interruptions:
Operation (if decimal feature is not installed)
Protection
Addressing
Specification
Data
Programming Note
--
Program Interruptions:
Operation (if decimal feature is not installed)
Addressing
Data
Divide Decimal
DP
Programming Note
!,
Multiply Decimal
MP
SS
FC
7 8
11 12
1920
31 32
35 36
i
47
SS
7 8
11 12
1B l tiD,l 2 llI
15 16
1920
31 32
35 36
47
37
Program Interruptions:
Operation ( if decimal feature is not installed)
Protection
Addressing
Specification
Data
Decimal divide
Pack
SS
7 8
11 12
15 16
1920
31 32
ill
35 36
47
Unpack
UNPK
SS
F3
1::2
Protection
Addressing
Programming Note
PACK
78
11 12
15 16
lllD, I
1920
31 32
Ill
35 36
47
Program Interruptions:
Addressing
Protection
SS
7 8
11 12
15 16
IliD, I
1920
31 32
!17
35 36
47
The second operand is placed to the left of and adjacent to the low-order four bits of the first operand.
The low-order four bits of the first operand are attached as low-order bits to the second operand, the
second operand bits are offset by four bit positions,
and the result is placed in the first operand location.
The first and second operand bytes are not checked
for valid codes.
The fields are processed right to left. If necessary,
the second operand is extended with high-order zeros.
Program Interruptions:
Protection
Addressing
Programming Note
Addressing: An address designates a location outside the available storage for the installed system.
In the two preceding exceptions, the operation is
terminated. The result data and the condition code
are unpredictable and should not be used for further
computation.
These address exceptions do not apply to the components from which an address is generated - the
contents of the D1 and D2 fields and the contents of
the registers specified by Bi and B2.
Specifications: A multiplier or a divisor size exceeds 15 digits and sign or exceeds the multiplicand
or dividend size. The instruction is suppressed;
therefore, the condition code and data in storage and
registers remain unchanged.
Data: A sign or digit code of an operand in ADD
DECIMAL, SUBTRACT DECIMAL, ZERO AND ADD, COMPARE
Decimal Arithmetic
39
Floating-Point Arithmetic
Data
Format
Floating-point data occupy a fixed-length format,
which may be either a fullword short format or a
double-word long format. Both formats may be used
in main storage and in the floating-point registers. The
four floating-point registers are numbered 0, 2, 4,
and 6.
Short Floating-Point Number
JSJ Character;strc[
0
40
78
FractTon
31
i
7 8
'
o ,ion
, ii
63
The first bit in either format is the sign bit (S). The
subsequent seven bit positions are occupied by the
characteristic. The fraction field may have either six
or 14 hexattecimal digits.
The entire set of floating-point instructions is available for both short and long operands. When shortprecision is specified, all operands and results are 32bit floating-point words, and the rightmost 132 bits of
the floating-point registers do not participate in the
operations and remain unchanged. An exception is the
product in MULTIPLY, which is a 64-bit word and occupies a full register. When long-precision is specified,
all operands and results are 64-bit floating-point words.
Although final results in short-precision have six
fraction digits, intermediate results in addition, subtraction, and division may extend to seven fraction
digits. The low-order digit of a seven-digit fraction is
called the guard digit and serves to increase the precision of the final result. Intermediate results in longprecision do not exceed 14 fraction digits.
N u m b e r Representation
The fraction of a floating-point number is expressed in
hexadecimal digits. The radix point of the fraction is
assumed to be immediately to the left of the highorder fraction digit. To provide the proper magnitude
for the floating-point number, the fraction is considered to be multiplied by a power of 16. The characteristie portion, bits 1-7 of both floating-point formats, indicates this power. The characteristic is treated as an
excess 64 number with a range from -64 through --[--63,
coresponding to the binary values 0-127.
Both positive and negative quantities have a true
fraction, the difference in sign being indicated by the
sign bit. The number is positive or negative accordingly as the sign bit is zero or one.
The range covered by the magnitude (M) of a
normalized floating-point number is
in short precision 16 -65 -~ M ~ (1 - 1 6 -6) 16ca, and
in long precision 16 -65 ~ M -~ (1 - 1 6 -14) 1663,
or approximately 2.4 10 -78 ~ M ~ 7.2 10TM
in either precision.
Normalization
A quantity can be represented with the greatest precision by a floating-point number of given fraction
length when that number is normalized. A normalized
floating-point number has a nonzero high-order hexadecimal fraction digit. If one or more high-order
fraction digits are zero, the number is said to be unnormalized. The process of normalization consists of
shifting the fraction left until the high-order hexadecimal digit is nonzero and reducing the characteristic by
the number of hexadecimal digits shifted. A zero fraction can not be normalized, and its associated characteristic therefore remains unchanged when normalization is called for.
Normalization usually takes place when the intermediate arithmetic result is changed to the final result.
This function is called postnormalization. In performing multiplication and division, the operands are
normalized prior to the arithmetic process. This function is called prenrmalizatin"
Floating-point operations may be performed with
or without normalization. Most operations are performed in only one of these two ways. Addition and
subtraction may be specified either way.
When an operation is performed without normalization, high-order zeros in the result fraction are not
eliminated. The result may or may not be normalized,
depending upon the original operands.
In both normalized and unnormalized operations,
the initial operands need not be in normalized form.
Also, intermediate fraction results are shifted right
Condition
Code
The results of floating-point sign-control, add, subtract, and compare operations are used to set the condition code. Multiplication, division, loading, and
storing leave the code unchanged. The condition code
can be used for d e c i s i o n - m a k i n g b y s u b s e q u e n t
branch-on-condition instructions.
The condition code can be set to reflect two types
of results for floating-point arithmetic. For most operations, the states 0, 1, or 2 indicate the content of the
result register is zero, less than zero, or greater than
zero. A zero result is indicated whenever the result
fraction is zero, including a forced zero. State 3 is used
when the exponent of the result overflows.
For comparison, the states 0, 1, or 2 indicate that the
first operand is equal, low, or high.
C O N D I T I O N CODE S E T T I N G F O R F L O A T I N G - P O I N T
0
Add Normalized S/L zero
Add Unnormalized S/L zero
Compare S/L
equal
Load and Test S/L
zero
Load Complement S/L zero
Load Negative S/L
zero
Load Positive S/L
zero
Subtract
Normalized S/L
zero
Subtract
Unnormalized S/L zero
ARITHMETIC
1
< zero
< zero
low
~ zero
< zero
< zero
--
2
3
~> zero overflow
> zero overflow
high
-> zero
-> zero
-. . . .
> zero
--
< zero
> zero
overflow
< zero
> zero
overflow
Instruction F o r m a t
Floating-point
formats:
use the
instructions
following two
RR Format
Op Code
7 8
11 12
15
RX Format
[- Op Code i RIIX2 I B2 I
0
7 8
11 12
1516
,D2
1920
In these formats, R1 designates the address of a floating-point register. The contents of this register will be
Floating-Point Arithmetic
41
Instructions
The floating-point arithmetic instructions and their
mnemonics, formats, and operation codes follow. All
operations can be specified in short and long precision
and are part of the floating-point feature. The following table indicates when normalization occurs, when
the condition code is set, and the exceptions that
cause a program interruption.
NAME
MNEMONIC
Load (Long)
Load (Long)
Load (Short)
Load (Short)
Load and Test
(Long)
Load and Test
(Short)
Load Complement
(Long)
Load Complement
(Short)
LDR
LD
LER
LE
RR
RX
RR
RX
LTDR
42
TYPE
F
F
F
F
EXCEPTIONS
CODE
S
A,S
S
A,S
28
68
38
78
RR F,C
22
LTER
RR F,C
32
LCDR
RR F,C
23
LCER
RR F,C
33
NAME
MNEMONIC
TYPE
CODE
20
R'R F,C
RR F,C
RR F,C
S
S
S
30
21
31
RR F,C
S,U,E,LS 2A
RX F,C
A,S,U,E,LS 6A
RR F,C
S,U,E,LS 3A
RX F,C
A,S,U,E,LS 7A
RR F,C
S, E,LS 2E
RX F,C
A,S, E,LS 6E
RR F,C
S, E,LS 3E
RR F,C
A,S, E,LS 7E
RR F,C
S,U,E,LS 2B
RX F,C
A,S,U,E,LS 6B
RR F,C
S,U,E,LS 3B
RX F,C
A,S,U,E,LS 7B
RR F,C
S, E,LS 2F
RX F,C
RR F,C
RX
RR
RX
RR
RX
RR
RR
RR
RX
RR
RX
RR
RX
RR
RX
RX
RX
F,C
F,C
F,C
F,C
F,C
F
F
F
F
F
F
F
F
F
F
F
F
NOTES
A
C
E
F
FK
LS
N
P
S
U
EXCEPTIONS
RR F,C
Addressing exception
Condition code is set
Exponent-overflow exception
Floating-point feature
Floating-point divide exception
Significance exception
Normalized operation
Protection exception
Specification exception
Exponent-underflow exception
A,S, E,LS
6F
S, E,LS 3F
A,S, E,LS
S
A,S
S
A,S
S
S
S,U,E
A,S,U,E
S,U,E
A,S,U,E
S,U,E,FK
A,S,U,E,FK
S,U,E,FK
A,S,U,E,FK
P,A,S
P,A,S
7F
29
69
39
79
24
34
2C
6C
3C
7C
2D
6D
3D
7D
60
70
Program Interruptions:
Load
LER
RR
(Short Operands)
. . . .
38
7 B
11 12
15
Programming Note
LE
RX
(ShortOperands)
78
7 8
LDR
RR
11 12
15 16
19 20
31
(Long Operands)
Load Complement
28
LCER
7 8
LD
RX
11 12
(LongOperands)
02
68
7 8
11 12
15 16
19 20
Program Interruptions:
Operation (if floating-point feature is not installed )
Addressing (LE, LD only)
Specification
LCDR
RR
7 8
11 12
15
--
15
Interruptions:
15
(Long Operands)
11 12
22
15
(LongOperands)
7 8
Program
11 12
11 t2
23
(ShortOperands)
7 8
LTDR
RR
7 8
1
31
LTER
(ShortOperands)
RR
15
Load Positive
LPER
RR
LPDR
(ShortOperands)
7 8
RR
11 12
15
(Long Operands)
[
7 8
11 12
15
43
ADR
RR
(Long Operands)
2A
7 8
11 12
15
--
Program Interruptions:
Operation (if floating-point feature is not installed )
Specification
Load Negative
LNER
RR
(Short Operands)
31
7 8
LNDR
RR
11 12
15
(LongOperands)
7 8
11 12
15
--
Program Interruptions:
Operation (if floating-point feature is not installed )
Specification
Add Normalized
AER
RR
(Short Operands)
3A
7 8
AE
RX
11 12
15
(ShortOperands)
7A
D2
7 8
44
11 12
15 16
1920
[
0
RX
(LongOperands)
7 8
11 12
15 16
1920
!
31
The short intermediate sum consists of seven hexadecimal digits and possible carry. The low-order
digit is a guard digit retained from the fraction which
is shifted right. Only one guard digit participates in
the fraction addition. The guard digit is zero if no shift
occurs. The long intermediate sum consists of 14 hexadecimal digits and a possible carry. No guard digit
is retained.
After the addition, the intermediate sum is leftshifted as necessary to form a normalized fraction;
vacated low-order digit positions are filled with zeros
and the characteristic is reduced by the amount of
shift.
If normalization causes the characteristic to underflow, characteristic and fraction are made zero, an
exponent-undertow exception exists, and a program
interruption occurs if the corresponding mask bit is
one. If no left shift takes place the intermediate sum
is truncated to the proper fraction length.
When the intermediate sum is zero and the significance mask bit is one, a significance exception exists,
and a program interruption takes place. No normalization occurs; the intermediate sum characteristic
remains unchanged. When the intermediate sum is
zero and the significance mask bit is zero, the program
Result
Result
Result
Result
fraction is zero
is less than zero
is greater than zero
exponent overflows
Program Interruptions:
Operation (if floating-point feature is not installed )
Addressing ( ~ and AD only)
Specification
Significance
Exponent overflow
Exponent underflow
Result
Result
Result
Result
fraction is zero
is less than zero
is greater than zero
exponent overflows
Program Interruptions:
Operation (if floating-point feature is not installed )
Addressing (Atr and Aw only)
Specification
Significance
Exponent overflow
Programming Note
Add Unnormalized
AUR
j'.....
RR
Subtract Normalized
(Short Operands)
SER
3E
7 8
11 12
RR
(Short Operands)
3B
15
7 8
AU
RX
SE
7 8
11 12
15 16
1920
31
r '
RX
i,,
RR
7 8
SDR
7 8
11 ~
15
'
RR
1516
1920
RX
(Long Operands)
2B
7 8
AW
11 12
(LongOperands)
2E
(Short Operands)
7B
AWR
15
(Short Operands)
7E
11 12
11 12
15
(Long Operands)
SD
6E
7 8
11 12
15 16
1920
RX
(LongOperands)
31
7 8
11 12
15 16
19 20
The second operand is subtracted from the first operand, and the normalized difference is placed in the
first operand location.
Floating-Point Arithmetic
45
In short-precision, the low-order halves of the floating-point registers are ignored and remain unchanged.
The SVBWrtnCTNORMALIZEDis similar to ADD NORMALIZED, except that the sign of the second operand is
inverted before addition.
The sign of the difference is derived by the rules of
algebra. The sign of a difference w i t h zero result
fraction is always positive.
The SUBTRACTUNNORMALIZED is similar to ADD UNNORMALIZED, except for the inversion of the sign of the
second operand before addition.
The sign of the difference is derived by the rules of
algebra. The sign of a difference with zero result
fraction is always positive.
Result
Result
Result
Result
fraction is zero
is less than zero
is greater than zero
exponent overflows
Result
Result
Result
Result
Program Interruptions:
Operation (if floating-point feature is not installed )
Addressing (sw and so only)
Specification
Significance
Exponent overflow
Program Interruptions:
Operation (if floating-point feature is not installed)
Addressing (SD and sE only)
Specification
Significance
Exponent overflow
Exponent underflow
Compare
CER
Subtract Unnormalized
RR
RR
7 8
78
11 12
RX
RX
(ShortOperands)
' 79
D2
i5
15
1-SU
11 12
(ShortOperands)
CE
(Short Operands)
39
SUR
fraction is zero
is less than zero
is greater than zero
exponent overflows
7 8
11 12
1.5 16
1920
31
(Short Operands)
7F
D2
7 8
11 12
15 16
CDR
RR
1920
SWR
RR
(Long Operands)
7 8
11 12
15
(Long Operands)
CD
RX
(LongOperands)
2F
0
7 8
11 12
15
0
SW
RX
(LongOperands)
D2
7 8
11 12
1516
19 20
The second operand is subtracted from the first operand, and the unnormalized difference is placed in
the first operand location.
In short-precision, the low-order halves of the floating-point register are ignored and remain unchanged.
46
7 8
11 12
15 16
19 20
31
The first operand is compared with the second operand, and the condition code indicates the result.
In short-precision, the low-order halves of the floating-point registers are ignored.
Comparison is algebraic, taking into account the
sign, fraction, and exponent of each number. An exponent inequality is not decisive for magnitude determination since the fractions may have different numbers
of leading zeros. An equality is established by following the rules for normalized floating-point subtraction.
When the intermediate sum, including a possible
Multiply
MER
RR
(Short Operands)
3C
0
ME
7 8
RX
11 12
15
(ShortOperands)
--
Program Interruptions:
D2
MDR
7 8
RR
11 12
15'16
1920
|
31
(Long Operands)
Programming Note
MD
Halve
HER
RR
15
(Long Operands)
D2
7 8
11 12
15 16
1920
34
7 8
HDR
RX
11 12
(ShortOperands)
0
7 8
RR
11 12
15
(LongOperands)
7 8
11 '12
15
Program Interruptions:
Operation (if floating-point feature is not installed )
Specification
Programming Note
The normalized product of multiplier (the second operand) and multiplicand (the first operand) replaces
the multiplicand.
The multiplication of two floating-point numbers
consists of a characteristic addition and a fraction
multiplication. The sum of the characteristics less 64 is
used as the characteristic of an intermediate product.
The sign of the product is determined by the rules of
algebra.
The product fraction is normalized by prenormalizing the operands and postnormalizing the intermediate
product, if necessary. The intermediate product characteristic is reduced by the number of left-shifts. For
long operands, the intermediate product fraction is
truncated before the left-shifting, if any. For short
operands (six-digit fractions), the product fraction has
the full 14 digits of the long format, and the two loworder fraction digits are accordingly always zero.
Exponent overflow occurs if the final product characteristic exceeds 127. The operation is terminated,
and a program interruption occurs. The overflow exception does not occur for an intermediate product
characteristic exceeding 127 when the final characteristic is brought within range because of normalization.
Exponent underflow occurs if the final product char-
Floating-Point Arithmetic
47
Program Interruptions:
Operation (if floating-point feature is not installed )
Addressing ( MD and ME only)
Specification
Exponent overflow
Exponent underflow
Programming Note
DER
RR
(ShortOperands)
7 8
DE
I-
RX
D2
, ,7D
11 12
15 16
1920
(Long Operands)
RR
DDR
2D
7 8
DD
15
(Short Operands)
7 8
11 12
RX
11 12
Program Interruptions:
15
(Long Operands)
D2
7 g
48
1I 12
1516
1920
Store
STE
RX
(Short Operands)
70
7 8.
STD
] 1 '12
15 16
19 20
(Long Operands)
RX
D2
7 8
'111 12
1516
1920
Program Interruptions:
Operation (if floating-point feature is not installed )
Addressing
Protection
Specification
Exceptional instructions, data, or results cause a program interruption. When the interruption occurs, the
current Psw is stored as an old rsw, and a new Psw
is obtained. The interruption code in the old Psw identifies the cause of the interruption. The following exceptions cause a program interruption in floating-point
arithmetic.
Operation: The Floating-Point Feature is not installed, and an attempt is made to execute a floatingpoint instruction. The instruction is suppressed. The
condition code and data in registers and storage remain unchanged.
Protection: The storage key of a result location does
not match the protection key in the Psw. The operation is suppressed. Therefore, the condition code and
data in registers and storage remain unchanged.
Floating-Point Arithmetic
49
Logical Operations
A set of instructions is provided for the logical manipulation of data. Generally, the operands are treated
as eight-bit bytes. In a few cases the left or right four
bits of a byte are treated separately or operands are
shifted a bit at a time. The operands are either in
storage or in the general register. Some operands are
introduced from the instruction stream.
Processing of data in storage proceeds left to right
through fields which may start at any byte position. In
the general registers, the processing, as a rule, involves the entire register contents.
Except for the editing instructions, data are not
treated as numbers. Editing provides a transformation
from packed decimal digits to alphanumeric characters.
The set of logical operations includes moving, comparing, bit connecting, bit testing, translating, editing,
and shift operations. All logical operations other than
editing are part of the standard instruction set. Editing instructions are part of the decimal feature.
The condition code is set as a result of all logical
comparing, connecting, testing, and editing operations.
Data F o r m a t
Data reside in general registers or in storage or are
introduced from the instruction stream. The data size
may be a single or double word, a single character, or
variable in length. When two operands participate
they have equal length, except in the editing instructions.
Fixed-Length Logical Information
I
0
Logical Data
31
I......
16
Character
Instruction
Format
78
1112
15
7 8
11 12
15 16
19 20
7 8
11 12
15 16
19 20
RX Format
D2
l' Op Code
0
31
RS Format
D2
p Code
SI Format
Condition
Code
And
Compare Logical
Edit
Edit and Mark
Exclusive Or
Or
Test Under Mask
Translate and Test
zero
equal
zero
zero
zero
zero
zero
zero
not z e r o
. . . .
low
high
-.~ zero
~> zero
-< zero
> zero
-not z e r o
. . . .
not z e r o
. . . .
mixed
-one
incomplete complete
--
I OpCo el
0
L2
7 8
IBll
15 16
,01
19 20
31
SS Format
Op Code
0
I
78
15 16
19 20
31 32
Ill I
35 36
47
In the RR, nx, and as formats, the content of the register specified by R1 is called the first operand.
In the sI and ss formats, the content of the general
register specified by B1 is added to the content of the
D~ field to form an address. This address designates
the leftmost byte of the first operand field. The number of bytes to the right of this first byte is specified
by the L field in the ss format. In the si format the
operand size is one byte.
In the RR format, the R2 field specifies the register
containing the second operand. The same register may
be specified for the first and second operand.
In the RX format, the contents of the general registers specified by the X2 and B2 fields are added to the
content of the D2 field to form the address of the second operand.
In the RS format, used for shift operations, the content of the general register specified by the B2 field
is added to the content of the D2 field. This sum is not
used as an address but specifies the number of bits of
the shift. The R3 field is ignored in the shift operations.
Logical Operations
51
NAME
MNEMONIC
TYPE
EXCEPTIONS
CODE
SLL
RS
89
SRL
RS
88
SLDL
RS
8D
SRDL
RS
8C
Addressingexception
Condition code is set
Data exception
Protectionexception
Specificationexception
Decimalfeature
Programming Note
Move
MV!
SI
Instructions
Move
Move
Move Numerics
Move Zones
Compare Logical
Compare Logical
Compare Logical
Compare Logical
AND
AND
AND
AND
OR
OR
OR
OR
Exclusive OR
Exclusive OR
Exclusive OR
Exclusive OR
Test Under Mask
Insert Character
Store Character
Load Address
Translate
Translate and Test
Edit
Edit and Mark
52
MNEMONIC
MVI
MVC
MVN
MVZ
CLR
CL
CLI
CLC
NR
N
NI
NC
OR
O
Oi
OC
XR
X
XI
XC
TM
IC
STC
LA
TR
TRT
ED
EDMK
TYPE
SI
SS
SS
SS
RR C
RX C
SI
C
SS
C
RR C
RX C
SI
C
SS
C
RR C
RX C
SI
C
SS
C
RR C
RX C
SI
C
SS
C
SI
C
RX
RX
RX
SS
SS
C
SS T,C
SS T,C
EXCEPTIONS
P,A
P,A
P,A
P,A
A,S
A
A
A,S
P,A
P,A
A,S
P,A
P,A
A,S
P,A
P,A
A
A
P,A
P,A
A
P,A, D
P,A, D
CODE
92
D2
D1
D3
15
55
95
D5
14
54
94
D4
16
56
96
D6
17
57
97
D7
91
43
42
41
DC
DD
DE
DF
921
,2
7 8
MVC
I,
0
Bll
ol
1516
19 20
19 20
I
31
SS
D2
!
78
15 16
IIID I
31 32
Ill
35 36
47
Program Interruptions:
Protection
Addressing
Programming Note
Move Numerics
Compare Logical
MVN
CLR
SS
D1
7 8
15 16
i il D,I
19 20
31 32
Ill
35 36
47
The low-order four bits of each byte in the second operand field, the numerics, are placed in the low-order
bit positions of the corresponding bytes in the first
operand fields.
The instruction is storage to storage. Movement is
left to right through each field one byte at a time, and
the fields may overlap in any desired way.
The numerics are not changed or checked for validity. The high-order four bits of each byte, the zones,
remain unchanged in both operand fields.
78
-1 B1 l~,t D, I
15 16
1920
31 32
2 111
35 36
47
11 12
15
7 8
11 12
15 16
,2
19 20
31
S!
195
0
7 8
IBll
15 16
1920
31
SS
D5
it
78
] B, IllD, i B2
15 16
19 20
31 32
Ill
35 36
D2
47
The first operand is compared with the second operand, and the result is indicated in the condition code.
The instructions allow comparisons that are register
to register, storage to register, instruction to storage,
and storage to storage.
Comparison is binary, and all codes are valid. The
operation proceeds left to right and terminates as soon
as an inequality is found.
SS
D3
CLI
Move Zones
7 8
RX
Protection
Addressing
CL
CLC
Program Interruptions:
MVZ
RR
Program Interruptions:
Addressing (CL, CLI, CLC only)
Specification (CL only)
Programming Note
Logical Operations
53
AND
OR
OR
RR
NR
7 8
11 12
15
7 8
NI
11 12
1516
1920
31
SI
94
12
NC
I Bll
15 16
D4
31
OC
78
1516
IItD,I
19 20
31 32
Ill
35 36
47
Result is zero
Result not zero
--
--
15
7 8
11 12
15 16
1920
31
7 8
1516
1920
31
7 8
15 16
19 20
1920
SS
11 12
Si
o!
7 8
7 8
RX
RX
RR
Program Interruptions:
Protection (NI, NC only)
Addressing (N, NI, NC only)
Specification (N only)
SS
31 32
4.7
The logical sum (on) of the bits of the first and second operand is placed in the first operand location.
Operands are treated as unstructured logical quantities, and the connective inclusive on is applied bit by
bit. All operands and results are valid.
Result is zero
Result not zero
--
--
Program Interruptions:
Protection (oI, oc only)
Addressing (o, oI, oc only)
Specification (o only)
Programming Note
Programming Note
54
35 36
Exclusive OR
XR
!"~
RR
17
7 8
11 12
15
RX
J RIJx2 I
57
7 8
X!
S!
" 97 '
11 12
B2
15~6
'
D2
1920
31
D1
i2
15 16
78
19 20
The byte of immediate data, I2, is used as an eightbit mask. The bits of the mask are made to correspond
one for one with the bits of the character in storage
specified by the first operand address.
A mask bit of one indicates that the storage bit is
selected. When the mask bit is zero, the storage bit is
ignored. When all storage bits thus selectedare zero,
the condition code is made 0. The code is also made
0 when the mask is all-zero. When the selected bits
are all-one, the code is made 3; otherwise, the code is
made 1. The character in storage is not changed.
Program Interruptions:
31
Addressing.
XC
SS
D7
' L
7 8
'J
15 16
liID11
19 20
31 32
35 36
Insert Character
47
IC
Result is zero
Result not zero
---
RX
43
7 8
11 12
15 16
19 20
31
Program Interruptions:
Store Character
STC
Programming Note
S!
91
!
7 8
1'2
IBll
15 16
I
19 20
RX
7 8
11 12
15 16
19 20
31
Program Interruptions:
The state of the first operand bits selected by a mask
is used to set the condition code.
Protection
Addressing
Logical Operations
55
Load Address
LA
RX
Protection
Addressing
7 8
11 12
15 16
1920
31
i
0
SS
pc
J
78
15 16
19 20
31 32
35 36
47
i
0
SS
!
7 8
I B1 i ll l I
15 16
19 20
31 32
o2 I
35 36
47
Program Interruptions:
Addressing
Programming Note
The TRANSLATEAND TEST is useful for scanning an input stream and locating delimiters. The stream can
thus be rapidly broken into statements or data fields
for further processing.
Edit
ED
SS
!..... oE
0
7 8
"
15 16
19 20
! 211 -- 5 -]
31 32
35 36
47
Logical Operations
57
58
EXAM-
TRIG-
RESULT
TRIG-
ACTER
NAME AND
INE
GER
DIGIT
CHAR-
GER
CODE
PURPOSE
DIGIT
STATUS
STATUS
ACTER
SET
digit select
yes
s=l
s_--0 dnot0
s=0
d=0
s= 1
s z 0 dnot0
s=0
d=0
digit
digit
fill
digit
digit
fill
fill
s-- 1
s=0
leave
fill
CHAR-
0010 0000
0010 0001
0010 0010
other
significance
start
yes
field
separator
message
insertion
no
no
s=l
s=l
s=l
s=0
NOTES
Source digit
S trigger (1: minus sign, digits, or pattern used; 0:
plus sign, fill used)
A source digit replaces the pattern character.
The fill character replaces the pattern character.
The pattern character remains unchanged.
d
S
digit
fill
leave
--
Program Interruptions:
Operation (if decimal feature is not installed)
Protection
Addressing
Data
Programming Note
As a rule the source operand is shorter than the pattern since it yields two digits or a digit and a sign for
each source number.
When a single instruction is used to edit several
numbers, the zero-field identification is provided only
for the last field.
!
0
SS
DF
!
78
i
15 16
I,ltD, I B2 ill D2 !
19 20
31 32
35 36
47
The operation is identical to EDIT, except for the additional function of inserting a byte address in general
register 1. The use of general register 1 is implied.
The byte address is inserted in bits 8-31 of this register. The byte address is inserted each time the S trigger is in the zero state and a nonzero digit is inserted
in the result field. The address is not inserted when
significance is forced by the significance-start character of the pattern, while inserting a fill character in the
result field. Bits 0-7 are not changed.
--
Programming Notes
SLDL
J
15 16
1920
D2
]
31
15 16
1920
RS
i- '
RS
11 12
11 12
7 8
7 8
Program Interruptions:
SLL
RS
i ', l //A
7 8
11 12
15 16
19 20
,,,
31
Program Interruptions:
Specification
Logical Operations
59
SRDL
RS
7 8
11 12
15 16
19 20
Program Interruptions:
Specification
Programming Note
The
that
not
and
60
Branching
Instructions are performed by the central processing unit primarily in the sequential order of their
locations. A departure from this normal sequential
operation may occur when branching is performed.
The branching instructions provide a means for making a two-way choice, to reference a subroutine, or to
repeat a segment of coding, such as a loop.
Branching is performed by introducing a branch address as a new instruction address.
The branch address may be obtained from one of
the general registers or it may be the address specified
by the instruction. The branch address is independent
of the updated instruction address.
The detailed operation of branching is determined
by the condition code which is part of the program
status word (rsw) or by the results in the general registers which are specified in the loop-closing operations.
During a branching operation, the rightmost half of
the psw, including the updated instruction address,
may be stored before the instruction address is replaced by the branch address. The stored information
may be used to link the new instruction sequence with
the preceding sequence.
The instruction EXECUTEis grouped with the branching instructions. The branch address of EXECtrTEdesignates a single instruction to be inserted in the instruction sequence. The updated instruction address normally is not changed in this operation, and only the instruction located at the branch address is executed.
All branching operations are provided in the standard instruction set.
Instructions occupy a halfword or a multiple thereof. An instruction may have up to three halfwords.
The number of halfwords in an instruction is specified
by the first two instruction bits. A 00 code indicates a
halfword instruction, codes 01 and 10 indicate a twohalfword instruction, and code 11 indicates a threehalfword instruction.
Halfword Format
Op Code
78
15
Two-Halfword Format
7 8
15 16
19 20
31
Three.Halfword Format
I OpCode
0
IB21
32
B1 !
7 8
35 36
o2
15 16
'
1920
I
31
I
,47
Storage wraps around from the maximum addressable storage location, byte location 16,777,215, to byte
location 0. An instruction having its last halfword at
the maximum storage location is followed by the instruction at address 0. Also, a multiple-halfword instruction may straddle the upper storage boundary; no
special indication is given in these cases.
Conceptually, an instruction is fetched from storage
after the preceding operation is completed and before
execution of the current operation, even though physical storage word size and overlap of instruction execution with storage access may cause actual instruction
fetching to be different.
A change in the sequential operation may be caused
by branching, status-switching, interruption, or manual intervention. Sequential operation is initiated and
terminated from the system control panel.
Branching
61
Programming Note
Branching may be conditional or unconditional. Unconditional branches replace the updatec~ instruction
address with the branch address. Conditional branches
may use the branch address or may leave the updated
instruction address unchanged. When branching takes
place, the instruction is called successful; otherwise, it
is called unsuccessful.
62
Formats
Format
7 8
11 12
15
RX Format
I-
i*M,I
OpCode
7 8
B2 I
11 12
15 16
19 20
11 12
1,5 16
19 20
D2
RS Format
!
0
Op Code
7 8
31
In these formats R1 specifies the address of a general register. In BRANCH ON CONDITION a mask field
(Mi) identifies the bit values of the condition code.
The branch address is defined differently for the three
formats.
In the an format, the la,2 field specifies the address of
a general register containing the branch address, except when R2 is zero, which indicates no branching.
The same register may be specified by R~ and R2.
In the ax format, the contents of the general registers specified by the X2 and B2 fields are added to
the content of the D2 field to form the branch address.
In the Rs format, the content of the general register
specified by the B2 field is added to the content of the
D~ field to form the branch address. The R~ field in
this format specifies the location of the second operand
and implies the location of the third operand. The first
operand is specified by the Ri field. The third operand
location is always odd. If the R3 field specifies an even
register, the third operand is obtained from the next
higher addressed register. If the R3 field specifies an
odd register, the third operand location coincides with
the second operand location.
A zero in a B2 or X2 field indicates the absence of
the corresponding address component.
An instruction can specify the same general register
for both address modification and operand location.
The order in which the contents of the general registers are used for the different parts of an operation
is"
1. Address computation.
Branching
Instructions
The branching instructions and their mnemonics, formats, and operation codes follow. The table also shows
the exceptions that cause a program interruption. The
subject instruction of EXECUTEfollows its own rules for
interruptions. The condition code is never changed for
branching instructions.
NAME
MNEMONIC TYPE EXCEPTIONS CODE
Branch on
Condition
BCR
RR
07
Branch on
Condition
BC
RX
47
Branch and Link
BALR
RR
05
Branch and Link
BAL
RX
45
Branch on Count
BCTR
RR
06
Branch on Count
BCT
RX
46
Branch on Index
High
BXH
RS
86
Branch on Index
Low or Equal
BXLE
RS
87
Execute
EX
RX
A,S, EX 44
NOTES
A
EX
S
Addressingexception
Executeexception
Specificationexception
Branch On Condition
RR
BCR
07
BC
IM11R2 !
7 8
11 12
15
78
il 12
,5,6
RX
Programming Note
47
CODE
I~ ~
~92o
]
3,
BIT
2 ~ >
10
3
11
The branch is successful whenever the condition
code has a corresponding mask bit of one.
C o n d i t i o n C o d e : The code remains unchanged.
P r o g r a m I n t e r r u p t i o n s : None.
Branching
63
Programming Note
When all four mask bits are ones, the branch is unconditional. When all four mask bits are zero or when
the R2 field in the Ra format contains zero, the branch
instruction is equivalent to a no-operation.
Branch and Link
BALR
RR
7 8
11 12
15
BAL
RX
7 8
11 12
15 16
1920
31
The rightmost 32 bits of the Psw, including the updated instruction address, are stored as link information in the general register specified by R1. Subsequently, the instruction address is replaced by the
branch address.
The branch address is determined before the link
information is stored. The link information contains
the instruction length code, the condition code, and
the program mask bits, as well as the updated instruction address. The instruction-length code is I or 2,
depending on the format of the BRANCHAND LINK,
Condition Code: The code remains unchanged.
Program Interruptions: None.
Programming Note
RR
BCT
7 8
11 12
15
7 8
11 12
15 16
RX
132
19 20
RS
D2
0
7 8
11 12
1516
1920
BXLE
RS
7 8
11 12
1516
1920
31
EX
Program Interruptions:
Execute
Addressing
Specification
Programming Notes
RX
7 8
11 12
15 16
1920
31
The single instruction at the branch address is modified by the content of the general register specified by
R,, and the resulting subject instruction is executed.
Bits 8-15 of the instruction designated by the branch
address are offed with bits 24-31 of the register specified by R1, except when register 0 is specified, which
indicates that no modification takes place. The subiect instruction may be !6, 82, or 48 bits in length.
The oR'ing does not change either the content of the
register specified by R1 or the instruction in storage
and is effective only for the interpretation of the instruction to be executed.
The execution and exception handling of the subject instruction are exactly as if the subject instruction
were obtained in normal sequential operation, except
for instruction address and instruction-length recording.
Exceptional instructions cause a program interruption. When the interruption occurs, the current I,SW is
stored as an old psw, and a new psw is obtained. The
interruption code in the old vsw identifies the cause.
Exceptions that cause a program interruption in
branching are:
Execute: An EXECUTE instruction has as its subject
instruction another EXECUTE.
Addressing: The branch address of EXECUTE designates an instruction-halfword location outside the
available storage for the particular installation.
Specification: The branch address of EXECUTE is odd.
The last three exceptions occur only for EXECUTE.
The instruction is suppressed. Therefore, the condition
code and data in registers and storage remain unchanged.
Exceptions arising for the subject instruction of EXECUTE are the same as would have arisen had the subject instruction been in the normal instruction stream.
However, the instruction address stored in the old
Branching
65
P s w is t h e a d d r e s s of t h e i n s t r u c t i o n f o l l o w i n g EXECVTE.
S i m i l a r l y , t h e i n s t r u c t i o n - l e n g t h c o d e in t h e o l d PSW
is t h e i n s t r u c t i o n - l e n g t h c o d e ( 2 ) of EXECUTe.
T h e address restrictions do not a p p l y to the components from which
an address
is g e n e r a t e d
the
c o n t e n t of t h e D1 field a n d t h e c o n t e n t of t h e r e g i s t e r
s p e c i f i e d b y B1.
Logical Operations
And
Compare Logical
Edit
Edit and Mark
Exclusive Or
Or
Test Under Mask
Translate and Test
zero
equal
zero
zero
zero
zero
zero
zero
not zero
. . . .
low
high
-< zero
> zero
-< zero
> zero
-not zero
. . . .
not zero
. . . .
mixed
-one
incomplete complete
--
Programming Note
A n u n a v a i l a b l e o r o d d b r a n c h a d d r e s s of a s u c c e s s f u l
branch
is d e t e c t e d
d u r i n g t h e e x e c u t i o n of t h e n e x t
i n s t r u c t i o n a n d n o t as p a r t of t h e b r a n c h .
Input-Output Operations
Halt I / O
not
working
halted
stopped
not oper
Start I / O
available
CSW
stored
busy
not oper
not
working
CSW
ready
working
not oper
available
CSW
stored
working
not oper
Test Channel
Fixed-Point Arithmetic
Add H / F
Add Logical
Compare H / F
Load and Test
Load Complement
Load Negative
Load Positive
Shift Left Double
Shift Left Single
Shift Right Double
Shift Right Single
Subtract H / F
zero
zero,
no carry
equal
zero
zero
zero
zero
zero
zero
zero
zero
zero
< zero
not zero,
no carry
low
< zero
< zero
< zero
-< zero
< zero
< zero
< zero
< zero
Subtract Logical
--
zero
equal
zero
zero
overflow
not zero,
carry
-carry
overflow
> zero
> zero
> zero
> zero
overflow
overflow
overflow
--
> zero
--
overflow
not zero,
no carry
> zero
carry
zero,
carry
CSW stored
equal
F
not zero,
carry
H
halted
< zero
low
< zero
< zero
> zero
high
> zero
> zero
overflow
-overflow
overflow
zero
< zero
> zero
overflow
zero
equal
zero
< zero
low
< zero
> zero
high
> zero
overflow
---
zero
zero
zero
< zero
< zero
--
> zero
-. . . . .
> zero
--
zero
< zero
> zero
overflow
zero
< zero
> zero
overflow
Floating-Point Arithmetic
Add Normalized
S/L
Add Unnormalized
S/L
Compare S/L
Load and Test S/L
Load Complement
S/L
Load Negative S/L
Load Positive S/L
Subtract Normalized S/L
Subtract Unnormalized S/L
66
NOTES
available
busy
carry
complete
CSW ready
zero
Decimal Arithmetic
Add Decimal
Compare Decimal
Subtract Decimal
Zero and Add
Test I / O
> zero
zero,
carry
high
> zero
> zero
high
incomplete
L
< zero
low
mixed
not oper
not working
not zero
one
overflow
S
stopped
working
zero
NOTE: T h e c o n d i t i o n c o d e also m a y b e c h a n g e d b y
LOAD PSW, SET SYSTEM MASK, a n d DIAGNOSE a n d b y a n
interruption.
Status-Switching
Program States
The four types of program-state alternatives, which
determine the over-all cPu status, are named Problem/
Supervisor, Wait/Running, Masked/Interruptable, and
Stopped/Operating. These states differ in the way they
affect the cPu functions and in the way their status is
indicated and switched. The masked states have several alternatives; all other states have only one alternative.
All program states are independent of each other in
their function, indication, and status-switching. Statusswitching does not affect the contents of the arithmetic registers or the execution of i/o operations but
may affect the timer operation.
Problem State
The choice between supervisor and problem state determines whether the full set of instructions is valid.
The names of these states reflect their normal use.
In the problem state all I/o, protection, and directcontrol instructions are invalid, as well as LOaD PSW,
SET SYSTEMMASK, and DIAGNOSE.These are called privileged instructions. A privileged instruction encountered in the problem state constitutes a privileged-operation exception and causes a program interruption.
In the supervisor state all instructions are valid.
When bit 15 of the vsw is zero, the c r c is in the
supervisor state. When bit 15 is one, the cPv is in the
problem state. The supervisor state is not indicated on
the operator sections of the system control panel.
The ceu is switched between problem and supervisor state by changing bit 15 of the Psw. This bit can
be changed only by introducing a new PSW. Thus
status-switching may be performed by LOADrsw, using
a new rsw with the desired value for bit 15. Since
LOAD PSW is a privileged instruction, the cru must be
in the supervisor state prior to the switch. A new PSW
is also introduced when the cPu is interrupted. The
SUPERVISOR CALL causes an interruption and thus may
change the c r u state. Similarly, initial program loading introduces a new vsw and with it a new cru state.
The new Psw may introduce the problem or supervisor
state regardless of the preceding state. No explicit operator control is provided for changing the supervisor
state.
Timer updating is not affected by the choice between supervisor and problem state.
Programming Note
Wait State
In the wait state no instructions are processed, and
storage is not addressed repeatedly for this purpose,
whereas in the running state, instruction fetching and
execution proceed in the normal manner.
When bit 14 of the Psw, is one, the cPv is waiting.
When bit 14 is zero, the cPU is in the running state.
The wait state is indicated on the operator control
section of the system control panel by the wait light.
The cPu is switched between wait and running state
by changing bit 14 of the vsw. This bit can be changed
only Ly introducing an entire new vsw, as is the case
with the problem-state bit. Thus, switching from the
Status Switching
67
running state may be achieved by the privileged instruction LOAD PSW, by an interruption such as for
SUPERVmOn CALL, or b y initial program loading. Switching from the wait state may be achieved by an i/o or
external interruption or, again, by initial program
loading. The new Psw may introduce the wait or running state regardless of the preceding state. No explicit operator control is provided for changing the
wait state.
Timer updating is not affected by the choice between running and wait state.
Programming Note
masked status may be achieved by the privileged instruction LOAD PSW, by an interruption such as for SUPERVISOR CALL, or by initial program loading. The new
Psw may introduce a new masked state regardless of
the preceding state. No explicit operator control is
provided for changing the masked state.
Timer updating is not affected by the choice between masked or interruptable states.
Programming Note
To prevent an interruption-handling routine from being interrupted before necessary housekeeping steps
are performed, the new rsw for that interruption
should mask the cPu for further interruptions of the
kind that caused the interruption.
Stopped State
Masked States
The cPu may be masked or interruptable for all systems and machine-check interruptions and for some
program interruptions. When the cPu is interruptable
for a class of interruptions, these interruptions are
accepted. When the cPu is masked, the system interruptions remain pending, while the program and machine-check interruptions are ignored.
The system mask bits (Psw bits 0-7), the program
mask bits (esw bits 86-89), and the machine-check
mask bit (PSW bit 18) indicate as a group the masked
state of the cPu. When a mask bit is one, the crtr is
interruptible for the corresponding interruptions.
When the mask bit is zero, these interruptions are
masked off. The system mask bits indicate the masked
state of the cPu for the multiplexor channel, the six
selector channels, and the external signals. The program mask bits indicate the masked state for four of
the 15 types of program exceptions. The machinecheck mask bit pertains to all machine checks. Program interruptions not maskable, as well as the supervisor-call interruption, are always taken. The masked
states are not indicated on the operator sections of the
system control panel.
Most mask bits do not affect the execution of cPv
operations. The only exception is the significance mask
bit, which determines the manner in which a floatingpoint operation is completed when a significance exception occurs.
The interruptable state of the cru is switched by
changing the mask bits in the Psw. The program mask
may be changed separately by SET rROGrtaM MASK, and
the system mask may be changed separately by the
privileged instruction SET SYSTEM MASK. The machinecheck mask bit can be changed only by introducing an
entire new PSW, as is the case with the problem-state
and wait-state bits. Thus, a change in the entire
68
Except {or timing considerations, execution of a program is not affected by stopping the cPu.
Storage Protection
Storage protection is provided to protect the contents
of certain areas of storage from destruction caused by
erroneous storing of information during the execution
of a program. This protection is achieved by identifying blocks of storage with a storage key and comparing this key with a protection key supplied with the
data to be stored. The detection of a mismatch is a
protection exception and results in a program interruption.
Area
Identification
Action
Protected
Status Word
ProgramStatusWord!
! SystemMask
Key IAMW~ !
0
7 8
[
32 33 34 s5 36
11 12
InterruptionCode
15 16
InstructionAddress
s940
Status Switching
69
0
1
2
3
4
5
6
7
7
7
INTERRUPTION
SOURCE
Multiplexor
channel
Selector channel 1
Selector channel 2
Selector channel 3
Selector channel 4
Selector channel 5
Selector channel 6
Timer
Interrupt key
External signal
36
37
38
39
PROGRAM
EXCEPTION
Fixed-point overflow
Decimal overflow
Exponent underflow
Significance
Instruction Address: Bits 40-63 of the PSW are the instruction address. This address specifies the leftmost
eight-bit byte position of the next instruction.
Multisystem Operation
Various features are provided to permit communication between individual systems. Messages may be
transmitted by means of a shared I/o device, a channel connector, or a shared storage unit. Signaling may
be accomplished when the direct control feature is installed by WRITE DIRECT and READ DIRECT and by the
signal-in lines of the external interruption.
The multisystem feature adds to these facilities the
ability to relocate direct addressed locations, to signal
the machine malfunction of one system to another,
and to initiate system operation from another system.
Malfunction Indication
A machine cheek out-signal occurs whenever a machine check is recognized and the machine-check mask
bit is one. The signal has 0.5-microsecond to 1.0-microsecond duration and is identical in electronic characteristics to the signals on the signal-out lines of the
direct control feature.
The machine check out-signal is given during machine-check handling and has a high probability of
being issued in the presence of machine malfunction.
RR Format
I PCde i R11 R2 !
0
7 8
Instruction
Format
15
SI Format
l OpC, ode !
0
7 8
!2
B1 ]
15 16
D1
19 20
In the m~ format, the R1 field specifies a general register, except for SUPERVISOR CALL. The R2 field specifies a general register in SET STORAGE KEY and INSEaT
STORAGE KEY/The ~ and R2 fields in SUPE1RVlSOlaCALL
contain an identification code. In SET PROGRAM MASK
the R2 field is ignored.
In the sI format the eight-bit immediate field (I2)
of the instruction contains an identification code. The
I2 field is ignored in LOAD PSW and SET S Y S T E M M A S K .
The content of the general register specified by B~ is
added to the content of the D1 field to form an address
designating the location of an operand in storage.
Only one operand location is required in status-switching operations.
A zero in the B~ field indicates the absence of the
corresponding address component.
Instructions
System Initialization
A main IPL in-line and an alternate IPL in-line respond
to 0.5-microsecond to 1.0-microsecond pulses. Either
line, when pulsed, sets the prefix trigger to the state
indicated by its name and subsequently starts initial
program loading. Thus, these lines permit electronic
initiation of IPL.
The definition of the signal to which these lines respond is identical in electronic characteristic to the
definition for the signal-in lines of the external interruption.
11 12
Load PSW
Set Program Mask
Set System Mask
Supervisor Call
Set Storage Key
Insert Storage Key
Write Direct
Read Direct
Diagnose
MNEMONIC
LPSW
SPM
SSM
SVC
SSK
ISK
WRD
RDD
TYPE
SI
RR
SI
RR
RR
RR
SI
SI
SI
EXCEPTIONS
L
L
M, A,S
M, A
Z
Z
Y
Y
M, A,S
M, A,S
M, A
M,P,A
M, A,S
CODE
82
04
80
0A
08
09
84
85
83
NOTES
A
L
M
P
S
Y
Z
Addressingexception
New condition code loaded
Privileged-operationexception
Protectionexception
Specificationexception
Directcontrol feature
Protectionfeature
Programming Note
71
Load PSW
LPSW
SPM
SI
RR
04
7 8
15 16
19 20
7 8
31
Programming Note
The cPtr enters the problem state when LOAO PSW loads
a double word with a one in bit position 15 and similarly enters the wait state if bit position 14 is one.
The LOAD PSW is the only instruction available for
entering the problem state or the wait state.
72
15
S!
7 8
15 16
19 20
31
Program Interruptions:
Privileged operation
Addressing
Specification
11 12
Supervisor Call
SVC
RR
oA I
7 8
1 21
11 12
15
Program Interruptions:
Operation ( if protection feature is not installed)
Privileged operation
Addressing
Specification
RR
Write Direct
08
RI j R2'J
7 8
11 12
Program Interruptions:
Operation ( if protection feature is not installed)
Privileged operation
Addressing
Specification
WRD
Si
15
RR
7 8
15 16
19 20
31
Program Interruptions:
0
7 8
11 12
15
The key of the storage block addressed by the register designated by R2 is inserted in the register designated by R1.
The storage block 2,048 bytes, located on a multiple of the block length, is addressed by bits 8-20 of
the register designated by the R2 field. Bits 0-7 and
Status Switching
73
Read Direct
RDD
SI
SI
[i,,85
0
Diagnose
!'2
7 8
IBll
15 16
19 20
I
31
Program Interruptions:
Operation (if direct control feature is not installed)
Privileged operation
Protection
Addressing
J
0
83
J
7 8
12
IBiJ
15 16
DI
1920
J
31
Program Interruptions:
Privileged operation
Specification
Addressing
Programming Note
74
Status-Switching Exceptions
Exceptional instructions or data cause a program interruption. When the interruption occurs, the current
PSW is stored as an old rsw, and a new PSW is obtained.
The interruption code inserted in the old PSW identifies the cause of the interruption. The following exception conditions cause a program interruption in
status-switching operations.
Operation: The direct control feature is not installed,
and the instruction is READDIRECT or WPaTE DIRECT; or,
the protection feature is not installed and the instruction is SET STORAGE KEY o r INSERT STORAGE KEY.
Privileged Operation: A LOADPSW, SET SYSTEMMASK,
SET STORAGE KEY, INSERT STORAGE KEY, W R I T E DIRECT,
Status Switching
75
Interruptions
Interruption Action
An i n t e r r u p t i o n consists of storing the current PSW as
an old PSW a n d f e t c h i n g a n e w PSW.
Processing r e s u m e s in the state indicated by the
n e w PSW. T h e old PSW contains the address of the instruction t h a t w o u l d have b e e n executed next if an
i n t e r r u p t i o n h a d not o c c u r r e d and the instructionl e n g t h code of the last-interpreted instruction.
I n t e r r u p t i o n s are taken only w h e n the cPU is interr u p t a b l e for the i n t e r r u p t i o n source. I n p u t / o u t p u t and
external interruptions m a y be m a s k e d by the system
mask, four of the 15 p r o g r a m interruptions m a y be
m a s k e d by the p r o g r a m mask, and the m a c h i n e - c h e c k
interruptions m a y be m a s k e d by the m a c h i n e - c h e e k
mask.
An i n t e r r u p t i o n always takes place after one instruction i n t e r p r e t a t i o n is finished a n d before a n e w instruction i n t e r p r e t a t i o n is started. H o w e v e r , the occ u r r e n c e of an i n t e r r u p t i o n m a y affect the execution
of the c u r r e n t instruction. To p e r m i t p r o p e r p r o g r a m m e d action following an interruption, the cause of the
interruption is identified and provision is m a d e to
locate the l a s t - i n t e r p r e t e d instruction.
W h e n the cPU is c o m m a n d e d to stop, the c u r r e n t
instruction is finished, and all interruptions that are
p e n d i n g or b e c o m e p e n d i n g before the end of the
instruction, and which are not masked, are taken.
The details of instruction execution, source identification, and location d e t e r m i n a t i o n are explained in
later sections and are s u m m a r i z e d in the following
table.
Programming Note
76
SOURCE
IDENTIFICATION
INTERRUPTION CODE
P S W BITS
16-31
MASK
ILC
EXE-
BITS
SET
CUTION
00000000
00000001
00000010
00000011
00000100
00000101
00000110
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
aaaaaaaa
0
1
2
3
4
5
6
x
x
x
x
x
x
x
complete
complete
complete
complete
complete
complete
complete
00000000
00000000
00000000
00000000
00000001
00000010
00000011
00000100
Addressing
00000000 00000101
Specification
Data
Fixed-point overflow
Fixed-point divide
00000000
00000000
00000000
00000000
Decimal overflow
Decimal divide
Exponent overflow
Exponent underflow
Significance
Floating-point divide
00000000 00001010
00000000 00001011
00000000 00001100
00000000 00001101
00000000 00001110
00000000 00001111
00000110
00000111
00001000
00001001
36
37
38
39
1,2,3 suppress
1,2 suppress
2
suppress
0,2,3 suppress/
terminate
0,1,2,3 suppress/
terminate
1,2,3 suppress
2,3 terminate
1,2 complete
1,2 suppress/
complete
3
complete
3
suppress
1,2 terminate
1,2 complete
1,2 complete
1,2 suppress
00000000 r r r r r r r r
complete
00000000 xxxxxxxl
00000000 xxxxxxlx
00000000 xxxxxlxx
00000000 xxxxlxxx
00000000 xxxlxxxx
00000000 xxlxxxxx
00000000 xlxxxxxx
00000000 lxxxxxxx
7
7
7
7
7
7
7
7
x
x
x
x
x
x
x
x
complete
complete
complete
complete
complete
complete
complete
complete
13
NOTES
a
r
x
terminate
Instruction Execution
An interruption occurs when the preceding instruction
is finished and the next instruction is not yet started.
The manner in which the preceding instruction is
finished may be influenced by the cause of the interruption. The instruction is said to have been completed, terminated, or suppressed.
In the case of instruction completion, results are
stored and the condition code is set as for normal instruction operation, although the result may be influenced by the exception which has occurred.
In the case of instruction termination, all, part, or
none of the result may be stored. Therefore, the result
data are unpredictable. The setting of the condition
code, if called for, may also be unpredictable. In
general, the results should not be used for further
computation.
In the case of instruction suppression, the execution
proceeds as if no operation were specified. Results
are not stored, and the condition code is not changed.
Source Identification
The five classes of interruptions are distinguished by
the storage locations in which the old PSW is stored
and from which the new PSW is fetched. The detailed
causes are further distinguished by the interruption
code of the old PSW, except for the machine-check
interruption. The bits of the interruption code are
numbered 16-31, according to their position in the esT.
For I/o interruptions, additional information is provided by the contents of the channel status word
stored as part of the I/o interruption.
For machine-check interruptions, additional information is provided by the diagnostic procedure, which
is part of the interruption.
The following table lists the permanently allocated
main-storage locations.
ADDRESS
LENGTI-I
PURPOSE
Location Determination
For some interruptions, it is desirable to locate the instruction being interpreted when the interruption occurred. Since the instruction address in the old Psw
designates the instruction to be executed next, it is
necessary to know the length of the preceding instruction. This length is recorded in bit positions 32 and
33 of the rsw as the instruction-length code.
The instruction-length code is predictable only for
program and supervisor-call interruptions. For I/O
and external interruptions, the interruption is not
caused by the last-interpreted instruction, and the
code is not predictable for these instructions. For
machine-check interruptions, the setting of the code
may be affected by the malfunction and, therefore, is
unpredictable.
For the supervisor-call interruption, the instructionlength code is 1, indicating the halfword length of
SUPERVISOR CALL. For program interruptions, the codes
1, 2, and 3 indicate the instruction length in halfwords.
The code 0 is reserved for program interruptions
where the length of the instruction is not available because of certain overlapping conditions in instruction
fetching. In code-0 cases, the instruction address in
the old PSW does not represent the next instruction
address. Instruction-length code 0 can occur for a
program interruption only when the interruption is
caused by a protected or an unavailable data address.
The following table shows the states of the instructionlength code.
INSTRUC-
ILC
0
1
2
2
3
PSW BITS
TION
3fi-33
BITS0-1
00
01
10
10
11
00
01
10
11
INSTRUCTION
LENGTH
Not available
One halfword
Two halfwords
Two halfwords
Three halfwords
FORMAT
RR
RX
RS or SI
SS
Programming Notes
77
Input/Output Interruption
The # o interruption provides a means by which the
cPu responds to signals from # o devices.
A request for an # o interruption may occur at any
time, and more than one request may occur at the
same time. The requests are preserved in the # o
section until accepted by the cPu. Priority is established among requests so that only one interruption
request is processed at a time.
An # o interruption can occur only after execution
of the current instruction is completed and while the
cPv is interruptable for the channel presenting the
request. Channels are masked by system mask bits 0-6.
Interruptions masked off remain pending.
The # o interruption causes the old PSW to be stored
at location 56 and causes the channel status word associated with the interruption to be stored at location
64. Subsequently, a new PSW is loaded from location
120.
The interruption code in the old PSW identifies the
channel and device causing the interruption in bits
21-23 and 24-31, respectively. Bits 16-20 of the old Psw
are made zero. The instruction-length code is unpredictable.
Operation Exception
When an operation code is not assigned or the assigned operation is not available on the particular
model, an operation exception is recognized. The operation is suppressed.
The instruction-length code is 1, 2, or 3.
Privileged-Operation Exception
When a privileged instruction is encountered in the
problem state, a privileged-operation exception is recognized. The operation is suppressed.
The instruction-length code is 1 or 2.
Execute Exception
Program Interruption
Exceptions resulting from improper specification or
use of instructions and data cause a program interruption.
The current instruction is completed, terminated, or
suppressed. Only one program interruption occurs for
a given instruction and is identified in the old Psw.
The occurrence of a program interruption does not
preclude the simultaneous occurrence of other program-interruption causes. Which of several causes is
identified may vary from one occasion to the next and
from one model to another.
A program interruption can occur only when the
corresponding mask bit, if any, is one. When the mask
bit is zero, the interruption is ignored. Program interruptions do not remain pending. Program mask bits
36-39 permit masking of four of the 15 interruption
causes.
The program interruption causes the old PSW to be
stored at location 40 and a new PSW to be fetched
from location 104.
The cause of the interruption is identified by interruption-code bits 28-31. The remainder of the interruption code, bits 16-27 of the PSW, are made zero. The
instruction-length code indicates the length of the
preceding instruction in halfwords. For a few cases,
78
Protection Exception
When the storage key of a result location does not
match the protection key in the PSW, a protection exception is recognized.
The operation is suppressed, except in the case of
STORE MULTIPLE, READ DmECT, and variable-length operations, which are terminated.
The instruction-length code is 0, 2, or 3.
Addressing Exception
When an address specifies any part of data, an instruction, or a control word outside the available
storage for the particular installation, an addressing
exception is recognized.
The operation is terminated for an invalid data
address. Data in storage remain unchanged, except
when designated by valid addresses. The operation is
suppressed for an invalid instruction address.
The instruction-length code normally is 1, 2 or 3;
but may be 0 in the case of a data address.
Specification Exception
Decimal-Overflow Exception
Data Exception
A data exception is recognized when:
1. The sign or digit codes of operands in decimal
arithmetic or editing operations or in CONVERT TO
BINARY are incorrect.
2. Fields in decimal arithmetic overlap incorrectly.
3. The decimal multiplicand has too many highorder significant digits.
The operation is terminated. The instruction-length
code is 2 or 3.
Fixed-Point-Overflow Exception
When a high-order carry occurs or high-order significant bits are lost in fixed-point add, subtract, shift, or
sign-control operations, a fixed-point-overflow exception is recognized.
The operation is completed by ignoring the information placed outside the register. The interruption
may be masked by psw bit 36.
The instruction-length code is i or 2.
Fixed-Point-Divide Exception
A fixed-point-divide exception is recognized when a
quotient exceeds the register size in fixed-point division, including division by zero, or the result of CONVEnT TO mNAnV exceeds 31 bits.
Division is suppressed. Conversion is completed by
ignoring the information placed outside the register.
The instruction-length code is I or 2.
Decimal-Divide Exception
When a quotient exceeds, the specified data field
size, a decimal-divide exception is recognized. The
operation is suppressed.
The instruction-length code is 3.
Exponent-Overflow Exception
When the result characteristic exceeds 127 in floatingpoint addition, subtraction, multiplication, or division,
an exponent-overflow exception is recognized. The
operation is terminated.
The instruction-length code is i or 2.
Exponent-Underflow Exception
When the result characteristic is less than zero in
floating-point addition, subtraction, multiplication, or
division, an exponent-underflow exception is recognized.
The operation is completed by making the result a
true zero. The interruption may be masked by PSW
bit 38.
The instruction-length code is 1 or 2.
Significance Exception
When the result of a floating-point addition or subtraction has an all-zero fraction, a significance exception is recognized.
The operation is completed. The interruption may
be masked by PSW bit 39. The manner in which the
operation is completed is determined by the mask bit.
The instruction-length code is i or 2.
Floating-Point-Divide Exception
When division by a floating-point number with zero
fraction is attempted, a floating-point divide exception
is recognized. The operation is suppressed.
The instruction-length code is i or 2.
Supervisor.Call Interruption
The supervisor-call interruption occurs as a result of
the execution of SUPERVISORCALL.
The supervisor-call interruption causes the old PSW
to be stored at location 32 and a new rsw to be
fetched from location 96.
Interruptions
79
Programming Notes
The name "supervisor call" indicates that one of the
major purposes of the interruption is the switching
from problem to supervisor state. This major purpose
does not preclude the use of this interruption for other
types of status-switching.
The interruption code may be used to convey a
message from the calling program to the supervisor.
When SUPERVISOR CALL iS performed as the subject
instruction of EXECUTE, the instruction-length code is 2.
External Interruption
The external interruption provides a means by which
the cr, v responds to signals from the timer, from the
interrupt key, and from external units.
A request for an external interruption may occur at
any time, and requests from different sources may
occur at the same time. Requests are preserved until
honored by the cPu. All pending requests are presented simultaneously when an external interruption
occurs. Each request is presented only once. When
several requests from one source are made before the
interruption is taken, only one interruption occurs.
An external interruption can occur only when system mask bit 7 is one and after execution of the current instruction is completed. The interruption causes
the old Psw to be stored at location 24 and a new
Psw to be fetched from location 88.
The source of the interruption is identified by interruption-code bits 24-31. The remainder of the interruption code, Psw bits 16-23, is made zero. The instruction-length code is unpredictable for external interruptions.
Timer
A timer value changing from positive to negative
causes an external interruption with bit 24 of the interruption code turned on.
i
0
Timer
!! Ii!111
23 24 25 26 27 28 29 30 31
FREQUENCY
RESOLUTION
23
300 cps
3.33 ms
24
600 cps
1.67 ms
25
1.2 kc
833/is
26
2.4 kc
417/is
27
4.8 kc
208/is
28
9.6 kc
104 ~s
29
19.2 kc
52/is
30
38.4 kc
26 gs
31
76.8 kc
13 gs
The count is treated as a signed integer by following
the rules for fixed-point arithmetic. The negative overflow, occurring as the timer is counted from a large
negative number to a large positive number, is ignored. The interruption is initiated as the count proceeds from a positive number, including zero, to a
negative number.
The timer is updated whenever access to storage
permits. An updated timer value is normally available
at the end of each instruction execution; thus, a realtime count can be maintained. Timer updating may be
omitted when I/O data transmission approaches the
limit of storage capability and when the instruction
time for hEAD DInECT is excessive.
After an interruption is initiated, the timer may
have "been updated several times before the c r u is
actually interrupted, depending upon instruction execution time.
The timer remains unchanged when the cPu is in
the stopped state or when the rate switch on the
operator intervention panel is set to XNSTmrCTmN STEP.
The timer value may be changed at any time by
storing a new value in storage location 80 (except
when this location is protected ).
The timer is an optional feature on some models.
Programming Note
The timer in association with a program can serve both
as a real-time clock and as an interval timer.
Interrupt Key
Pressing the interrupt key on the operator control
section of the system control panel causes an external
External Signal
An external signal causes an external interruption,
with the corresponding bit in the interruption code
turned on.
A total of six signal-in lines may be connected to
the cPu for receiving external signals. The pattern
presented in interruption-code bits 26-31 depends
upon the pattern received before the interruption is
taken.
The external signals are part of the direct control
feature.
ProgrammingNote
The signal-in lines of one cPU may be connected to the
signal-out timing lines of the direct control feature or
the machine check out-line of the multisystem feature
of another cPU. An interconnection of this kind allows
one cPu to interrupt another. Also, the direct-out lines
of one cPu may be connected to the direct-in lines of
the other, and vice versa.
Machine-Check Interruption
The machine-check interruption provides a means for
recovery from and fault location of machine malfunction.
When the machine-check mask bit is one, occurrence of a machine check terminates the current instruction, initiates a diagnostic procedure, issues a
signal on the machine check out-line, and subsequently causes the machine-check interruption.
The old rsw is stored at location 48 with an interruption code of zero. The state o{ the ceu is scanned
out into the storage area, starting with location 128
and extending through as many words as the given
cPU requires. The new rsw is fetched from location
112. Proper execution of these steps depends on the
nature of the machine check.
The machine check out-signal is provided as part of
the multisystem feature. The signal is a 0.5-microsecond to 1.0-microsecond timing signal that follows
the I/o interface line-driving and terminating specifications. The signal is designed so that it has a high
probability o{ being issued in the presence of machine
malfunction.
When the machine-check mask bit is zero, an attempt is made to complete the current instruction
upon the occurrence o{ a machine check and to proceed with the next sequential instruction. No diagnostic procedure, signal, or interruption occurs.
Priority of Interruptions
During execution of an instruction, several interruption-causing events may occur simultaneously. The
instruction may give rise to a program interruption, an
external interruption may occur, a machine check may
occur, and an I/o interruption request may be made.
Instead of the program interruption, a supervisor-call
interruption might occur; however, both cannot occur
since these two interruptions are mutually exclusive.
Simultaneous interruption requests are honored in a
predetermined order.
The machine-check interruption has highest priority.
When it occurs, the current operation is terminated.
Program and supervisor-call interruptions that would
have occurred as a result o{ the current instruction are
eliminated. Every reasonable attempt is made to limit
the side-effects of a machine check. Normally, I/o and
external interruptions, as well as the progress of the
i / o data transfer and the updating o{ the timer, remain unaffected.
When no machine check occurs, the program interruption or supervisor-call interruption is taken first, the
external interruption is taken next, and the I/o interruption is taken last. The action consists of storing the
old PSW and fetching the new PSW belonging to the
interruption first taken. This new PSW is subsequently
stored without any instruction execution, and the next
interruption PSW is fetched. This storing and fetching
continues until no more interruptions are to be serviced. The external and I/o interruptions are taken only
if the immediately preceding rsw indicates that the
cPu is interruptable for these causes.
Instruction execution is resumed using the lastfetched PSW. The order of executing interruption subroutines is therefore the reverse of the order in which
the rsw's are fetched.
Interruptions
81
ProgrammingNote
When interruption sources are not masked off, the
order of priority in handling the interruption subroutines is machine check, i/o, external, and program
or supervisor call. This order can be changed to some
extent by masking. The priority rule applies to interruption requests made simultaneously. An interruption
request made after some interruptions have already
been taken is honored according to the priority prevailing at the moment of request.
Interruption Exceptions
The only exception that can cause a program interruption during an interruption is a specification exception.
Specification: The protection feature is not installed,
and a new rsw with nonzero protection key is loaded.
A program interruption is taken immediately upon
82
loading the new t'sw, regardless of the type of interruption introducing the erroneous protection key and
prior to any other pending interruptions. The protection key is made zero when the PSW is stored.
If the new PSW for the program interruption has a
nonzero protection key, another program interruption
occurs. Since this second program interruption introduces the same unacceptable protection key in the
new PSW, the process is repeated with the cPu caught
in a string of program interruptions. This string can be
broken only by initial program loading or system reset.
The instruction address in a new PSW is not tested
for availability or resolution as the rsw is fetched
during an interruption. However, an unavailable or
odd instruction address is detected as soon as the
instruction address is used to fetch an instruction.
These exceptions are described in the section on
normal sequential operation.
If the new PSW for the program interruption has an
unacceptable instruction address, another program
interruption occurs. Since this second program interruption introduces the same unacceptable instruction
address, a string of program interruptions is established. This string may be broken by an external or
I/o interruption. If these interruptions also have an
unacceptable new rsw, new supervisor information
must be introduced by initial program loading or by
manual intervention.
Input/Output Operations
Input/Output Devices
Input/output devices provide external storage and a
means of communication between data processing
systems or between a system and the external world.
Input/output devices include such equipment as card
read-punches, magnetic tape units, direct-access-storage devices (disks and drums), typewriter-keyboard
devices, printers, T E L E - P t l O C E S S I N G devices, and process
control equipment.
Most types of I/o devices, such as printers, card
equipment, or tape devices, deal directly with external
documents, and these devices are physically distinguishable and identifiable. Other types consist only of
electronic equipment and do not directly handle
physical recording media. The channel-to-channel
adapter, for example, provides a channel-to-channel
data transfer path, and the data never reach a physical
recording medium outside main storage; the mM 2702
Transmission Control handles transmission of information between the data processing system and a remote
station, and its input and output are signals on a
transmission line. Furthermore, the equipment in this
case may be time-shared for a number of concurrent
operations, and it is denoted as a particular I/o device
only during the time period associated with the operation on the corresponding remote station.
Input/output devices may be accessible from one or
more channels. Devices accessible from one channel
normally are attached to one control unit only. A
device can be made accessible to two or more channels by switching it between two or more control units,
Control Units
The control unit provides the logical capability necessary to operate and control an I/O device and adapts
the characteristics of each device to the standard form
of control provided by the channel.
All communications between the control unit and
the channel take place over the I/o interface. The
control unit accepts control signals from the channel,
controls the timing of data transfer over the I/o interface, and provides indications concerning the status
of the device.
The # o interface provides an information format
and a signal sequence common to all I/o devices. The
interface consists of a set of lines that can connect a
number of control units to the channel. Except for the
signal used to establish priority among control units,
all communications to and from the channel occur
over a common bus, and any signal provided by the
channel is available to all control units. At any one
instant, however, only one control unit is logically
connected to the channel. The selection of a control
unit for communication with the channel is controlled
by a signal that passes serially through all control units
and permits, sequentially, each control unit to respond
to the signals provided by the channel. A control unit
remains logically connected on the interface until it
has transferred the information it needs or has, or until
the channel signals it to disconnect, whichever occurs
earlier.
The # o device attached to the control unit may b e
designed to perform only certain limited operations.
A typical operation is moving the recording medium
and recording data. To accomplish these functions, the
device needs detailed signal sequences peculiar to the
type of device. The control unit decodes the commands received from the channel, interprets them for
the particular type of device, and provides the signal
sequence required for execution of the operation.
A control unit may be housed separately or it may
be physically and logically integral with the I/o de,
vice. In the case of most electromechanical devices, a
well-defined interface exists between the device and
the control unit because off the difference in the type of
equipment the control unit and the device contain.
These electromechanical devices often are of a type
where only one device of a group is required to opInput/Output Operations
83
Channels
The channel directs the flow of information between
I/O devices and main storage. It relieves the cPtr of
the task of communicating directly with the devices
and permits data processing to proceed concurrently
with I/O operations.
The channel provides a standard interface for connecting different types of I/O devices to the cPu and
to main storage. It accepts control information from
the cPtr in the format supplied by the program and
changes it into a sequence of signals acceptable to a
control unit. After the operation with the device has
been initiated, the channel assembles or disassembles
data and synchronizes the transfer of data bytes over
the interface with main-storage cycles. To accomplish
this, the channel maintains and updates an address
and a count that describe the destination or source of
data in main storage. When an I/O device provides
signals that should be brought to the attention of the
program, the channel again converts the signals to a
format compatible to that used in the cPtr.
The channel contains all the common facilities for
the control of I/O operations. When these facilities are
provided in the form of separate autonomous equipment designed specifically to control I/O devices, I/O
operations are completely overlapped with the activity
in the cPu. The only main-storage cycles required
during I/O operations in such channels are those needed to transfer data and control information to or from
the final locations in main storage. These cycles do
not interfere with the cPu program, except when both
the cPv and the channel concurrently attempt to refer
to the same main storage.
Alternatively, the system may use to a greater or
lesser extent the facilities of the cPu for controlling I/O
devices. When the cPtr and the channel share common
84
Types of Channels
A system can be equipped with two types of channels"
selector and multiplexor. Channels are classified according to the modes of operation they can sustain.
The channel facilities required for sustaining a
single I/o operation are termed a subchannel. The
subchannel consists of the channel storage used for
recording the addresses, count, and any status and
control information associated with the I/o operation.
The mode in which a channel can operate depends
upon whether it has one or more subchannels.
The selector channel has only one subchannel and
operates only in the burst mode. The burst always
extend over the whole block of data, or, when command chaining is specified, over the whole sequence
of blocks. The selector channel cannot perform any
multiplexing and therefore can be involved in only
one data transfer operation at a time. In the meantime,
other I/O devices attached to the channel can execute
operations not involving communication with the
channel. When the selector channel is not executing
an operation or a chain of operations and is not processing an interruption, it scans the attached devices for
status information.
The multiplexor channel contains multiple subchannels and can operate in either multiplex or burst mode.
It can switch between the two modes at any time, and
an operation on any one subchannel can occur partially in the multiplex and partially in the burst mode.
When the multiplexor channel operates in multiplex
mode, it can sustain concurrently one I/o operation
per subchannel, provided that the total load on the
channel does not exceed its capacity. Except for those
aspects of communications that pertain to the physical
channel, each subchannel appears to the program as an
independent selector channel. When the multiplexor
channel is not servicing an I/o device, it scans its devices for data and for interruption conditions.
When the multiplexor channel operates in burst
mode, the subchannel associated with the burst operation monopolizes all channel facilities and appears to
the program as a single selector channel.
The remaining subchannels on the multiplexor channel must remain dormant and cannot respond to devices until the burst is completed.
System Operation
Input/output operations are initiated and controlled
by information with three types of formats: instructions, commands, and orders. Instructions are decoded
and executed by the cPu and are part of the cPu program. Commands are decoded and executed by the
85
86
Compatibility of Operation
The organization of the I/o system provides for a uniform method of controlling I/o operations. The capacity of a channel, however, depends on its use and on
the model to which it belongs. Channels are provided
with different data-transfer capabilities, and an I/O
device designed to transfer data only at a specific rate
(a magnetic tape unit or a disk storage for example)
can operate only on a channel that can accommodate
at least this data rate.
The data rate a channel can accommodate depends
also on the way the I/o operation is programmed. The
channel can sustain its highest data rate when no data
chaining is specified. Data chaining reduces the maximum allowable rate, and the extent of the reduction
depends on the frequency at which new cow's are
fetched and on the address resolution of the first byte
in the new area. Furthermore, since the channel may
share main storage with the cpu and other channels,
activity in the rest of the system affects the accessibility of main storage and, hence, the instantaneous
load the channel can sustain.
In view of the dependence of channel capacity on
programming and on activity in the rest of the system,
an evaluation of the ability of a specific i/o configuration to function concurrently must be based on a
consideration of both the data rate and the way the
I/o operations are programmed. Two systems employing identical complements of I/o devices may be able
to execute certain programs in common, but it is possible that other programs requiring, for example, data
chaining, may not run on one of the systems.
Channel
000
001
010
011
100
101
110
111
Device
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
xxxxxxxx
ASSIGNMENT
ADDRESS
0000 0000
to
0111 1111
1000 xxxx
1001 xxxx
1010 xxxx
1011 xxxx
1100 xxxx
1101 xxxx
1110 xxxx
1111 xxxx
ASSIGNMENT
Input/Output Operations
87
CHANNEL
Available
Interruption pending
Working
Not operational
SUBCHANNEL
Available
Interruption pending
Working
Not operational
I/CO DEVICE
Available
Interruption pending
Working
Not operational
ABBBEV
DEFINITION
DEFINITION
DEFINITION
A channel, subchanne], or I/O device that is available, that contains a pending interruption condition, or
that is working, is said to be operational. The states of
containing an interruption condition, working, or being not operational are collectively referred to as "not
available."
In the case of the multiplexor channel, the channel
and subchannel are easily distinguishable and, if the
channel is operational, any combination of channel and
subchannel states are possible. Since the selector channel can have only one subchanne], the channel and
subchanne| are functionally coupled, and certain states
of the channel are related to those of the subchanne].
In particular, the working state can occur only concurrently in both the channel and subchannel and, whenever an interruption condition is pending in the subchannel, the channel also is in the same state. The
channel and subchannel, however, are not synonymous, and an interruption condition not associated
with data transfer, such as attention, does not affect
the state of the subchannel. Thus, the subchannel may
be available when the channel has an interruption
condition pending. Consistent distinction between the
subchannel and channel permits both types of channels to be covered uniformly by a single description.
The device referred to in the preceding table includes both the device proper and its control unit. For
some types of devices, such as magnetic tape units, the
working and the interruption-pending states can be
caused by activity in the addressed device or control
unit. A shared control unit imposes its state on all devices attached to the control unit. The states of the devices are not related to those of the channel and subchannel.
When the response to an I/O instruction is determined on the basis of the states of the channel and
subchannel, the components further removed are not
interrogated. Thus, ten composite states are identified
terruption condition is pending in the addressed subchannel because of the termination of the portion of
the operation involving the use of channel facilities.
The subchannel is in a position to provide information
for a complete csw. The interruption condition can indicate termination of an operation at the addressed I/o
device or at another device on the subchannel. In the
case of the multiplexor channel, the channel is available. The state of the addressed device is not significant, except when TEST I/O is addressed to the device
associated with the terminated operation. The device
associated with the terminated operation normally is in
the interruption pending state.
On the selector channel the existence of an interruption condition in the subchannel immediately
causes the channel to assign to this condition the
highest priority for I/o interruptions and, hence, leads
to the state Itx.
Subchannel Working (AWX): The addressed subchannel is executing a previously initiated operation
or chain of operations in the multiplex mode and has
not yet reached the channel end for the last operation. All devices sharing the currently operating control unit appear in the working state but, for shared
subchannels, the states of devices not attached to the
control unit are not known. The addressed channel is
available.
The subchannel-working state does not occur on the
selector channel since all operations on the selector
channel are executed in the burst mode and cause the
channel to be in the working state(wwx).
89
Execution of malfunction reset in the channel depends on the type of malfunction and the model. It
may cause all operations in the channel to be terminated and all operational subchannels to be reset to
the available state. The channel may send either the
malfunction-reset signal to the device connected to the
channel at the time the malfunctioning is detected,
or channels sharing common equipment with the
cPu may send the system-reset signal to all devices
attached to the channel.
When the channel signals malfunction reset over
the interface, the device immediately disconnects
from the channel. Data transfer and any operation
using the facilities of the control unit are immediately
terminated, and the I/o device is not necessarily positioned at the beginning of a block. Mechanical motion not involving the control unit, such as rewinding
magnetic tape or positioning a disk access mechanism,
proceeds to the normal stopping point, ff possible.
The device remains unavailable until the termination
of mechanical motion or the inherent cycle of operation, if any, whereupon it becomes available. Status
information associated with the addressed device is
reset, but an interruption condition may be generated
upon completing any mechanical operation.
When a malfunction reset occurs, the program is
alerted by an I/o interruption or, when the malfunction is detected during the execution of an I/o instruction, by thesetting of the condition code. In either
case the csw identifies the condition. The device addressed by the I/o instruction or the device identified
by the I/o interruption, however, is not necessarily
the one placed in the malfunction-reset state. In channels sharing common equipment with the cPU, malfunctioning detected by the channel may be indicated
by a machine-check interruption, in which case a csw
is not stored and a device is not identified. The
method of identifying malfunctioning depends upon
the model.
Condition Code
CONDITIONS
Available
Interruption pend, in device
Device working
Device not operational
Interruption pend. in subchannel
For the addressed device
For another device
Subchannel working
Subchannel not operational
Interruption pend. in channel
Channel working
Channel not operational
Error
Channel equipment error
Channel programming error
Device error
AAA
AAI
AAW
AAN
aIx
0 ,1"
1"
1"
3
0
1"
1"
3
0
0
0
0
1" 0
2
2 0
AWX t 2
2 2
ANX t 3
3 3
IXX "t" see note below
WXX J" 2
2 2
NXX "~" 3
3 3
2
1"
1"
1Q
__
1"
1"
0
0
0
0
0
0
2
0
1
2
3
1"
_
91
Start I / 0
SIO
SI
Instruction Format
All
z/o
!',, O p Code
0
/,f/7////////~J
78
B'I
15 16
i
1920
D1
1
31
V////////////////////////////,/~
0
dh~:i
20 21
23 24
D e v ic e
Address
!
31
NAME
Start I/O
Test I/O
Halt I/O
Test Channel
SIO
TIO
HIO
TCH
TYPE
SI, C
SI, C
SI, C
SI, C
EXCEPTION
M
M
M
CODE
9C
9D
9E
9F
NOTES
c
M
Programming Note
92
78
15 16
1920
31
A write, read, read backward, control or sense operation is initiated at the addressed I/o device and subchannel. The instruction START I/O is executed only
when the cPv is in the supervisor state.
Bit positions 21-31 of the sum formed by the addition of the content of register Bz and the content of
the D1 field identify the channel, subchannel, and I/o
device to which the instruction applies. The caw at
location 72 contains the protection key for the subchannel and the address of the first ccw. The ccw so
designated specifies the operation to be performed,
the main-storage area to be used, and the action to
be taken when the operation is completed.
The I/o operation specified by START I / O is initiated
if the addressed I/O device and subchannel are available, the channel is available or is in the interruptionpending state, and errors or exceptional conditions
have not been detected. The I/o operation is not initiated when the addressed part of the V o system is in
any other state or when the channel or device detects
any error or exceptional condition during execution of
the instruction.
When any of the following conditions occurs, START
I/o causes the status portion, bit positions 32-47, of
the csw at location 64 to be replaced by a new set of
status bits. The status bits pertain to the device addressed by the instruction. The contents of the other
fields of the csw are not changed.
1. An immediate operation was executed, and either
no command chaining is specified, or chaining is suppressed because of unusual conditions detected during
the operation. An operation is called i m m e d i a t e when
the I/O device signals the channel-end condition immediately on receipt of the command code. The csw
contains the channel-end bit and any other indications
provided by the channel or the device. The busy bit
is off. The i/o operation has been initiated, but no information has been transferred to or from the storage
area designated by the c c w . No interruption conditions
are generated at the device or subchannel, and the
subchannel is available for a new I/o operation.
2. The I/O device contains a pending interruption
condition due to device end or attention, or the control unit contains a pending channel end or control
unit end for the addressed device. The csw unitstatus field contains the busy bit, identifies the interruption condition, and may contain other bits provided by the device or control unit. The interruption
condition is cleared. The channel-status field contains
zeros.
3. The i/o device or the control unit is executing a
previously initiated operation, or the control unit has
pending channel end or control unit end for a device
other than the one addressed. The csw unit-status
field contains the busy bit or, if the control unit is
busy, the busy and status-modifier bits. The channelstatus field contains zeros.
4. The I/o device or channel detected an equipment or programming error during execution of the
instruction. The channel-end and busy bits are off,
unless the error was detected after the device was
selected and was found to be busy, in which case the
busy bit, as well as any bits indicating pending interruption conditions, are on. The interruption conditions
indicated in the csw have been cleared at the device.
The csw identifies the error condition. The I/o operation has not been initiated. No interruption conditions are generated at the i/o device or subchannel.
On the multiplexor channel, START I/O causes the
addressed device to be selected and the operation to
be initiated only after the channel has serviced all outstanding requests for data transfer for previously initiated operations.
Program Interruptions:
Privileged operation.
Programming Note
When the channel detected a programming error during execution of START I/O and the addressed device
contains an interruption condition, with the channel
and subchannel in the available state, STARTI//O may or
may not clear the interruption condition, depending
on the type of error and the model. If the instruction
has caused the device to be interrogated, as indicated
by the presence of the busy bit in the csw, the interruption condition has been cleared, and the csw contains program check, as well as the status from the
device.
Test I / 0
TIO
SI
7 8
15 16
1920
31
Input/Output Operations
93
Available
csw stored
Channel or subchannel busy
Not operational
Program Interruptions:
Privileged operation.
Programming Notes
Halt I/O
HIO
SI
7 8
15 16
19 20
31
Execution of the current # o operation at the addressed subchannel or channel is terminated. The subsequent state of the subchannel depends on the type of
channel. The csw may be stored. The instruction HALT
I/O is executed only when the ceu is in the supervisor
state.
Bit positions 21-31 of the sum formed by the addition of the content of register B1 and the content of
the D1 field identify the I/o device to whose subchannel or channel the instruction applies.
When H A n T # o is issued to a channel operating in
the burst mode, data transfer for the burst operation
is terminated and the device performing the burst
operation is immediately disconnected from the channel. The subchannel and # o device address in the instruction is ignored. When the instruction is issued to
the multiplexor channel operating in the multiplex
mode and the addressed subchannel is working, data
transfer for the current operation on the subchanne]
is terminated. In this case the channel uses the device
address appearing in the instruction to select the device on the I/o interface and to identify the subchanne|. The device is selected and the instruction is executed, only after the subchannel has serviced all outstanding requests for data transfer for previously initiated operations, including the operation to be halted.
The termination of an operation by rtAnT # o on the
selector channel causes the channel and subchannel to
be placed in the interruption-pending state. The interruption condition is generated without receiving
the channel-end signal from the device. When HALT
I/O causes an operation on the multiplexor channel to
be terminated, the subchannel remains in the working
state until the device provides the next status byte,
whereupon the subchannel is placed in the interruption-pending state.
Program Interruptions:
Privileged operation.
Programming Note
SI
7 8
15 16
1920
31
95
Channel available
Interruption pending in channel
Channel operating in burst mode
Channel not operational
Program Interruptions:
Privileged operation.
96
i,o,10000 i
31
34
78
The fields in the CAW are allocated for the following purposes:
Protection Key: Bits 0-3 form the storage protection
key for all commands associated with sTarrr I/O. This
key is matched with a storage key whenever data are
placed in storage.
Command Address: Bits 8-31 designate the location
of the first ccw in main storage.
Bit positions 4-7 of the CAW must contain zeros.
When the protection feature is not implemented, the
protection key must be zero. The three low-order bits
of the command address must be zero to specify the
ccw on integral boundaries for double words. If any
of these restrictions is violated or if the command address specifies a location outside the main storage of
the particular installation, START I/O causes the status
portion of the csw to be stored with the programcheck bit on. In this event, the I/O operation is not
initiated.
ProgrammingNote
Bit positions 4-7 of the CAW, which presently must contain zeros, may in the future be assigned for the
control of new functions. It is therefore recommended
that these bit positions not be set to one for the purpose of obtaining an intentional program-check indication.
Channel Command Word
The channel command word (ccw) specifies the command to be executed and, for commands initiating
I/o operations, it designates the storage area associa t e d with the operation and the action to be taken
whenever transfer to or from the area is completed.
The ccw's can be located anywhere in main storage,
and more than one can be associated with a swArrr
I/O. The channel refers to a ccw in main storage only
once, whereupon the pertinent information is stored
in the channel.
The first ccw is fetched during the execution of
START I/O. Each additional cow in the sequence is obtained when the operation has progressed to the point
where the additional ccw is needed. Fetching of the
ccw's by the channel does not affect the contents of
the location in main storage.
i Command
Code
I
o
32..
Data Address
78
36 37
3.9 40
4.7 48
63
The command code, bit positions 0-7 of the ccw, specifies to the channel and the I/o device the operation to
be performed.
The two low-order bits or, when these bits are
00, the four low-order bits of the command code identify the operation to the channel. The channel distinguishes among the following four operations:
Output forward (write, control)
Input forward (read, sense)
Input backward (read backward)
Branching (transfer in channel)
The channel ignores the high-order bits of the command code.
Commands that initiate I/O operations (write, read,
read backward, control, and sense) cause all eight bits
of the command code to be transferred to the I/o device. In these command codes, the high-order bit positions contain modifier bits. The modifier bits specify
to the device how the command is to be executed.
They may cause, for example, the device to compare
data received during a write operation with data previously recorded, and they may specify such conditions as recording density and parity. For the control
command, the modifier bits may contain the order
code specifying the control function to be performed.
The meaning of the modifier bits depends on the type
of I/O device and is specified in the sau publication
for the device.
The command code assignment is listed in the following table. The symbol x indicates that the bit position is ignored; M identifies a modifier bit.
CODE
COMMAND
x x x x 0000
MMMM0 1 0 0
x x x x I 000
MMMM1 1 0 0
Invalid
Sense
Transferin channel
Read backward
MMMM MM0 1
M M M M MM1 0
M M M M MM1 1
Write
Read
Control
97
code during the initiation of a command, the program-check condition is generated. When the first ccw
designated by the cAW contains an invalid command
code, the status portion of the csw with the programcheck indication is stored during execution of STAnT
#O. When the invalid code is detected during command chaining, the new operation is not initiated, and
an interruption condition is generated. The command
code is ignored during data chaining, unless it specifies transfer in channel.
Chaining
When the channel has performed the transfer of information specified by a cow, it can continue the activity initiated by START I/O by fetching a new ccw.
The fetching of a new cow upon the exhaustion of the
current ccw is called chaining and the cow's belonging
to such a sequence are said to be chained.
Chaining takes place only between cow's located
in successive double-word locations in storage. It proceeds in an ascending order of addresses; that is, the
address of the new cw is obtained by adding eight
to the address of the current cow. Two chains of
cow's located in noncontiguous storage areas can be
coupled for chaining purposes by a transfer in channel command. All ccw's in a chain apply to the # o
device specified in the original STnr~wI/O.
Two types of chaining are provided: chaining of
data and chaining of commands. Chaining is controlled by the chain-data (CD) and chain-command
(cc) flags in the ccw. These flags specify the action
CC
ACTION
0
0
No chaining. The current CCW is the last.
0
1
Commandchaining
1
0
Data chaining
1
1
Data chaining
The specification of chaining is effectively propagated through a transfer in channel command. When
in the process of chaining a transfer-in-channel command is fetched, the ccw designated by the transfer
in channel is used for the type of chaining specified
in the cow preceding the transfer in channel.
The cD and cc flags are ignored in the transfer-inchannel command.
Data Chaining
99
Command chaining takes place and the new operation is initiated only if no unusual conditions have
been detected in the current operation. If a condition
such as unit check, unit exception, or incorrect length
has occurred, the sequence of operations is terminated, and the status associated with the current operation causes an interruption condition to be generated. The new ccw in this case is not fetched. The
incorrect-length condition does not suppress command
chaining if the current ccw has the sLI flag on.
An exception to sequential chaining of ccw's occurs
when the z/o device presents the status-modifier condition with the device-end signal. When command
chaining is specified and no unusual conditions have
been detected, the combination of status-modifier and
device-end bits causes the channel to fetch and chain
to the ccw whose main-storage address is 16 higher
than that of the current ccw.
When both command and data chaining are used,
the first ccw associated with the operation specifies
the operation to be executed, and the last ccw indicates whether another operation follows.
Programming Note
Skipping
Skipping is the suppression of main-storage references
during a n z/o operation. It is defined only for read,
read backward, and sense operations and is controlled
by the skip flag, which can be specified individually
for each ccw. When the skip flag is one, skipping occurs; when zero, normal operation takes place. The
setting of the skip flag is ignored in all other operations.
Skipping affects only the handling of information
by the channel. The operation at the i/o device proceeds normally, and information is transferred to the
channel. The channel keeps updating the count but
does not place the information in main storage. If the
chain-command or chain-data flag is one, a new ccw
is obtained when the count reaches zero. In the case
of data chaining, normal operation is resumed if the
skip flag in the new ccw is zero.
100
Program-Controlled Interruption
The program-controlled interruption (PCZ) function
permits the program to cause an I/o interruption during execution of an I/o operation. The function is controlled by the PCI flag in the ccw. The flag can be on
either in the first ccw specified by START I/O or in a
ccw fetched during chaining. Neither the vci flag nor
the associated interruption affects the execution of the
current operation.
Whenever the Pcz flag in the ccw is on, the channel
attempts to interrupt the program. When the first ccw
associated with an operation contains the vcI flag,
either initially or upon command chaining, the interruption may occur as early as immediately upon the
initiation of the operation. The PCI flag in a ccw
/?etched on data chaining causes the interruption to
occur after all data designated by the preceding ccw
have been transferred. The time of the interruption,
however, depends on the model and the current activity in the system and may be delayed even if the
channel is not masked. No predictable relation exists
between the time the interruption due to the vcI flag
occurs and the progress of data transfer to or from the
area designated by the ccw.
If chaining occurs before the interruption due to
the rci flag has taken place, the PCI condition is carried over to the new ccw. This carryover occurs both
on data and command chaining and, in either case,
the condition is propagated through the transfer-inchannel command; The PCZ conditions are not stacked;
that is, if another ccw is fetched with a rcI flag before
the interruption due to the vcI flag of the previous
ccw has occurred, only one interruption takes place.
A csw containing the PC1 bit may be stored by an
interruption while the operation is still proceeding or
upon the termination of the operation.
When the csw is stored by an interruption before
the operation or chain of operations has been terminated, the command address is eight higher than the
address of the current ccw, and the count is unpredictable. All unit-status bits in the csw are zero. If the
channel has detected any unusual conditions, such as
channel data check, program check, or protection
check: by the time the interruption occurs, the c o r r e -
sponding channel-status bit is on, although the condition in the channel is not reset and is indicated
again upon the termination of the operation.
Presence of any unit-status bit in the csw indicates
that the operation or chain of operations has been
terminated. The csw in this case has its regular format with the PCi bit added.
The setting of the PCI flag is inspected in every ccw
except those specifying transfer in channel. In a ccw
specifying transfer in channel, the setting of the flag
is ignored. The P a flag is ignored also during initial
program loading.
Programming Notes
Since no unit-status bits are placed in the csw associated with the termination of an operation on the selector channel by HALT I/O, the presence of a unitstatus bit with the Pci bit is not a necessary condition
for the operation to be terminated. When the selector
channel contains the PCI bit at the time the operation
is terminated by HALT I/O, the csw associated with
the termination is indistinguishable from the csw provided by an interruption during execution of the operation.
Program-controlled interruption provides a means
of alerting the program of the progress of chaining
during an I/O operation. It permits programmed dynamic main-storage allocation.
Commands
The following table lists, the command codes for the
six commands and indicates which flags are defined
for each command. The flags are ignored for all commands for which they are not defined.
NAME
Write
Read
Read backward
Control
CODE
Sense
MMMMMM01
MMMMMM10
MMMMll00
MMMM MM11
MMM~0100
Transfer in channel
xxxxl000
FLAG
CD
CD
CD
CD
CD
CC
CC
CC
CC
CC
SLI
PCI
SLI SKIP PCI
SLI SKIP PCI
SLI
PCI
SLI SKIP PCI
NOTES
Chain data
Chain command
Suppress length indication
Skip
Program-controlled interruption
Modifier bit
M
X
Ignored
All flags have individual significance, except that
the cc and SLI flags are ignored when the CD flag is on.
The SLI flag is ignored on immediate operations, in
which case the incorrect-length indication is suppressed regardless of the setting of the flag. The Pci
flag is ignored during initial program loading.
CD
CC
SLI
SKIP
PCI
Write
A read-backward operation is initiated at the i / o device, and the subchannel is set up to transfer data
from the device to main storage. On magnetic tape
units, read backward causes reading to be performed
with the tape moving backwards. The bytes of data
within a block are sent to the channel in a sequence
opposite to that on writing. The channel places the
bytes in storage in a descending order of address, starting with the address specified in the ccw. The bits
within an eight-bit byte are in the same order as sent
to the device on writing.
A ccw used in a read-backward operation is inspected for every one of the five flags - cD, cc, SLI,
SKtP, and PcI. Bit positions 0-3 of the cow contain
modifier bits.
Programming Note
101
before data have been transferred causes the incorrectlength indication, provided the operation is not immediate and has not been rejected during the initiation sequence. The incorrect-length indication is suppressed when the SLI flag is on.
Sense
DESIGNATION
0
C o m m a n reject
d
1
Intervention
required
2
Bus-out check
3
Equipment check
4
Data check
5
Overrun
The folloWing is the meaning of the first six bits:
C o m m a n d Reiect: The device has detected a pro,
gramming error. A command has been received which
the device is not designed to execute, such as read issued to a printer, or which the device cannot execute
because of its present state, such as backspace issued
to a tape unit with the tape at load point. Command
reject is also indicated when the program issues an invalid sequence of commands, such as write to a directaccess storage device without previously designating
the data block.
Intervention Required: The last operation could not
be executed because of a condition requiring some
type of intervention at the device. This bit indicates
conditions such as an empty hopper in a card punch
or the printer being out of paper. It is also turned on
when the addressed device is in the not-ready state, is
in test mode, or is not provided on the control unit.
Bus-Out Check: The device or the control unit has
received a data byte or a command code with an invalid parity over the I/o interface. During writing,
bus-out check indicates that incorrect data have been
Input/Output Operations
103
Types of Termination
Normally an I/O operation at the subchannel lasts until
the device signals channel end. The channel-end condition can be signaled during the sequence initiating
the operation, or later. When the channel detects
equipment malfunctioning or a system reset is performed, the channel disconnects the device without
receiving channel end. The program can force a device on the selector channel to be disconnected prematurely by issuing HALTI/O.
104
Immediate Operations
Instead of accepting or rejecting a command, the I/o
device can signal the channel-end condition immediately upon receipt of the command code. An I/o operation causing the channel-end condition to be signaled during the initiation sequence is called an
"immediate operation."
When the first ccw designated by the CAW initiates
an immediate operation, no interruption condition is
generated. If no command chaining occurs, the channel-end condition is brought to the attention of the
program by causing START I/O to store the csw status
portion, and the subchannel is immediately made available to the program. The I/O operation, however, is
initiated, and, if channel-end is not accompanied by
device end, the device remains busy. Device end, when
subsequently provided by the device, causes an interruption condition to be generated.
When command chaining is specified after an immediate operation and no unusual conditions have
been detected during the execution, STAlaTI/O does not
cause storing of csw status. The subsequent commands
in the chain are handled normally, and the channel-end
condition for the last operation generates an interruption condition even if the device provides the signal immediately upon receipt of the command code.
Whenever immediate completion of an I/O operation is signaled, no data have been transferred to or
from the device. The data address in the ccw is not
checked for validity, except that it may not exceed
the addressing capacity of the model.
Since a count of zero is not valid, any ccw specifying
an immediate operation must contain a nonzero count.
When an immediate operation is executed, however,
incorrect length is not indicated to the program, and
command chaining is not suppressed.
Programming Note
105
Input/Output Interruptions
Input/output interruptions provide a m e a n s for the
crtr to change its state in response to conditions that
occur in I/o devices or channels. These conditions can
be caused by the program or by an external event at
the device.
Interruption Conditions
Unit check
Unit exception
When command chaining is specified and is not suppressed because of error conditions, channel end and
device end do not cause interruption conditions and
are not made available to the program. Unit-check and
unit-exception conditions cause interruption to be requested only when the conditions are detected during
the initiation of a chained command. Once the command has been accepted by the device, unit check
and unit exception do not occur in the absence of
channel end, control unit end, or device end.
When the channel detects any of the following conditions, it initiates a request for an # o interruption
without having received the status byte from the device:
Pcl flag in a ccw.
Execution of hALTI/O on selector channel.
The interruption conditions from the channel can be
accompanied by other channel status indications, but
none of the device status bits is on when the channel
initiates the interruption.
A request for an I/o interruption due to a programcheck condition detected during command chaining
(such as invalid command code, count of zero, or two
sequential transfer-in-channel commands) may be initiated either by the I/o device or by the channel, depending on the type of channel. To stack the inter-
107
occur immediately after the termination of the instruction removing the mask. This delay can occur regardless of how long the interruption condition has existed
in the device or the subchannel.
The interruption causes the current program status
word (PSW) to be stored as the old Psw at location 56
and causes the csw associated with the interruption to
be stored at location 64. Subsequently, a new Psw is
loaded from location 120, and processing resumes in
the state indicated by this Psw. The I/o device causing
the interruption is identified by the channel address
in bit positions 21-23 and by the device address in bit
positions 24-31 of the old Psw. The csw associated
with the interruption identifies the condition responsible for the interruption and provides further details
about the progress of the operation and the status of
the device.
Programming Note
The channel status word (csw) provides to the program the status of an I/o device or the conditions
under which an I/o operation has been terminated.
The csw is formed, or parts of it are replaced, in the
process of I/o interruptions and during execution of
START I/0, TEST I//O, and HALTI/O. The csw is placed in
main storage at location 64 and is available to the program at this location until the time the next I/O interruption occurs or until another I/O instruction causes
its content to be replaced, whichever occurs first.
When the csw is stored as a result of an I/O interruption, the i/o device is identified by the I/O address
in the old Psw. The information placed in the csw by
START I/O, TEST I/O, or HALT I/O pertains to the device
addressed by the instruction.
The csw has the following format:
Command Address
0
!
32
108
34
78
'
Sto;o
31
'
I
47 48
ooo'
I
63
32
DESIGNATION
BIT
Attention
40
Statusmodifier
Controlunit end
Busy
Channelend
Deviceend
Unit check
Unit exception
Count: Bits 48-63 form
last ccw used.
41
42
43
44
45
46
47
the
33
34
35
36
37
38
39
DESIGNATION
Program-controlled
interruption
Incorrectlength
Programcheck
Protectioncheck
Channeldata check
Channelcontrol check
Interfacecontrol check
Chainingcheck
residual count for the
The following conditions are detected by the i/o device or control unit and are indicated to the channel
over the I/o interface. The timing and causes of these
conditions for each type of device are specified in the
SRL publication for the device.
When the I/O device is accessible from more than
one subchannel, status is signaled to the subchannel
that initiated the associated I/O operation. The handling of conditions not associated with i / o operations
depends on the type of device and condition and is
specified in the SRL publication for the device.
The channel does not modify the status bits received
from the I/O device. These bits appear in the csw as
received over the interface.
Attention
during the initiation of a new I/O operation. Otherwise, the handling and presentation of the condition
to the channel depends on the type of device.
When the device signals attention during the initiation of an operation, the operation is not initiated.
Attention accompanying device end causes command
chaining to be suppressed.
Status Modifier
109
Programming Note
Busy indicates that the i/o device or control unit cannot execute the command or instruction because it is
executing a previously initiated operation or because
it contains a pending interruption condition. The interruption condition for the addressed device, if any,
accompanies the busy indication. If the busy condition
applies to the control unit, busy is accompanied by
status modifier. On command chaining, the busy indication is caused only when attention is generated at
the device.
The following table lists the conditions when the
busy bit (B) appears in the csw and when it is accompanied by the status-modifier bit (sM). A double
hyphen (--) indicates that the busy bit is off; an
asterisk (*) indicates that csw status is not stored or
an I/o interruption cannot occur; and the (cl) indicates that the interruption condition is cleared and
the status appears in the csw. The abbreviation DE
stands for device end, while cu stands for control unit.
CONDITION
Subchannel available
DE or attention in device
Device working, CU available
CU end or channel end in CU:
for the addressed device
for another device
CU working
Interruption pend. in subchannel
for the addressed device
because of:
chaining terminated by
attention
other type of termination
Subchannel working
CU available
CU working
B,cl
B
--,cl
B
--,cl
B,cl
B,SM
B,SM
--,cl
B,SM
B,SM
*
*
*
--,cl
--,cl
*
*
*
B,cl
--,cl
*
*
B,cl
--,el
*
*
*
*
B,SM
Channel End
Channel end is caused by the completion of the portion of an I/O operation involving transfer of data or
control information between the I/O device and the
channel. The condition indicates that the subchannel
has become available for use for another operation.
Each I/O operation causes a channel-end condition
to be generated, and there is only one channel end for
an operation. The channel-end condition is not generated when programming errors or equipment malfunctions are detected during initiation of the operation. When command chaining takes place, only the
channel end of the last operation of the chain is made
available to the program. The channel-end condition,
however, is not made available to the program when a
chain of commands is prematurely terminated because
of an unusual condition indicated with control unit end
or device end.
The instant within an I/O operation when channel
end is generated depends on the operation and the
type of device. For operations such as writing on magnetic tape, the channel-end condition occurs when the
block has been written. On devices that verify the
writing, channel end may or may not be delayed until
verification is performed, depending on the device.
When magnetic tape is being read, the channel-end
condition occurs when the gap on tape reaches the
read-write head. On devices equipped with buffers,
such as the IBM 1443 N1 Printer (bar line printer), the
channel-end condition occurs upon completion of data
transfer between the channel and the buffer. During
control operations, channel end is generated when the
control information has been transferred to the devices, although for short operations the condition may
be delayed until completion of the operation. Operations t h a t d o not cause any data to be transferred can
provide the channel-end condition during the initiation sequence.
A channel-end condition pending in the control unit
causes the control unit to appear busy for initiation of
new operations. Unless the operation has been performed on the selector channel and has been terminated by HALT I/O, channel end causes the subchannel
to be in the interruption-pending state.
Device End
Device end is caused by the completion of an I/o operation at the device or, on some devices, by manually
changing the device from the not-ready to the ready
state. The condition indicates that the I/O device has
become available for use for another operation.
Each I/o operation causes a device-end condition,
and there is only one device-end to an operation. The
device-end condition is not generated when any programming or equipment malfunction is detected
111
Incorrect length occurs when the number of bytes contained in the storage areas assigned for the I/o operation is not equal to the number of bytes requested or
offered by the I/o device. Incorrect length is indicated
for one of the following reasons:
Long block on Input: During a read, read-backward,
or sense operation, the device attempted to transfer
one or more bytes to storage after the assigned storage
areas were filled. The extra bytes have not been placed
in main storage. The count in the csw is zero.
Long Block on Output: During a write or control
operation the device requested one or more bytes from
the channel after the assigned main-storage areas were
exhausted. The count in the csw is zero.
Short Block on Input: The number of bytes transferred during a read, read backward, or sense operation is insufficient to fill the storage areas assigned to
the operation. The count in the csw is not zero.
Short Block on Output: The device terminated a
write or control operation before all information contained in the assigned storage areas was transferred to
the device. The count in the csw is not zero.
The incorrect-length indication is suppressed when
the current ccw has the SLI flag and does not have the
CD flag. The indication does not occur for immediate
operations and for operations rejected during the initiation sequence.
Presence of the incorrect-length condition suppresses
command chaining unless the SLI flag in the ccw is on
or unless the condition occurs in an immediate operation.
The following table lists the effect of the incorrectlength condition for all combinations of the CD, CC,
and SLI flags. It indicates for the two types of operations when the operation at the subchannel is terminated (stop) and when the command chaining takes
place. The entry "incorrect length" (m) means that
the indication is made available \ to the program; a
double hyphen (--) means that the indication is suppressed. For all entries, the current operation is assumed to have caused the incorrect-length condition.
ACTION AND INDICATION
FLAGS
CD
CC
SLI
0
o
o
o
o
o
1
1
o
1
o
1
1
1
1
1
o
o
1
1
o
1
o
1
REGULAR OPERATION
Stop, IL
Stop, -Stop, IL
Chain command
Stop, IL
Stop, IL
Stop, IL
Stop, IL
IMMEDIATE
OPERATION
Program Check
Channel control check is caused by any machine malfunctioning affecting channel controls. The condition
includes parity errors on cow and data addresses and
parity errors on the contents of the cow. Conditions
responsible for channel control check usually cause the
contents of the csw to be invalid and conflicting.
The csw as generated by the channel has correct
parity. The channel either forces correct parity on the
csw fields or sets the invalid fields to zero.
Detection of the channel-control-check condition
causes the current operation, if any, to be immediately
terminated and may cause the channel to perform the
malfunction-reset function. The recovery procedure in
the channel and the subsequent state of the subchannel
upon a malfunction reset depend upon the model.
Interface Control Check
113
The content of the csw depends on the condition causing the storing of the csw and on the programming
method by which the information is obtained. The
status portion always identifies the condition that
caused storing of the csw. The protection key, command address, and count fields may contain information pertaining to the last operation or may be set to
zero, or the original contents of these fields at location
64 may be left unchanged.
Information Provided by Channel Status Word
Conditions associated with the execution or termination of an operation at the subchannel cause the
whole csw to be replaced.
Such a c s w can be stored only by an # o interruption
or by TEST I/'O. Except for conditions associated with
command chaining and equipment malfunctioning, the
storing can be caused by the PCI or channel-end condition and by the execution of HALT I/O on the selector
channel. The contents of the csw are related to the
current values of the corresponding quantities, although the count is unpredictable after programming
errors and after an interruption due to the P~ flag.
A csw stored upon the execution of a chain of operation pertains to the last operation the channel executed or attempted to initiate. Information concerning
114
Protection Key
Count
Command Address
CONTENT
Unpredictable
Unchanged
Unchanged
Address of TIC .q- 8
Address of TIC + 8
Address of first invalid CCW
+8
Address of invalid CCW -I- 8
Address of invalid CCW q- 8
Address of invalid CCW -q- 8
Address of invalid CCW -if- 8
Address of second TIC + 8
Address of invalid CCW .q- 8
Address of last-used CCW --b 8
Address of last-used CCW "-t"8
Address of last-used CCW _1_8
Address of last-used CCW -'b 8
Address of last CCW used in
the completed operation "-t-8
Address of CCW specifying
the new operation .+- 8
Address of last-used CCW -q- 8
Address of last-used CCW "-b 8
Zero
Zero
Zero
Zero
Zero
Zero
CONDITION
CONTENT
Unpredictable
Unchanged
Unchanged
Unpredictable
Unpredictable
Correct
Correct
Correct
Correct
Correct. Residual count of last
CCW used in the completed
operation.
Correct. Original count of
CCW specifying the new
operation.
Unpredictable
Correct
Zero
Zero
Zero
Zero
Zero
Zero
Status
Input/Output Operations
115
the csw or an unusual condition signaled b y the device precludes the initiation of the o p e r a t i o n , the PcI
bit appears in the csw associated with the interruption
condition. Similarlyl if device status or a p r o g r a m m i n g
error in the contents of the c c w causes the c o m m a n d
to be reiected during execution of START I/O, t h e c s w
stored by START I/O contains the Pci flag. The PcI flag,
however, is not included in the csw if a p r o g r a m m i n g
error in the contents of the CAW prevents the operation from being initiated.
Conditions d e t e c t e d by the channel are not related
to those identified by the # o device.
T h e following table summarizes the handling of
status bits. The table lists the states a n d activities that
can cause s t a t u s indications to b e created a n d the
m e t h o d s by which these indications can b e placed in
the csw.
T I M E A N D M E T H O D O F C R E A T I N G A N D STORING STATUS I N D I C A T I O N S
WHEN
STATUS
Attention
Status modifier
Control unit end
Busy
Channel e n d
Device end
Unit check
Unit exception
Program-controlled interruption
Incorrect length
Program check
Protection check
Channel data check
Channel control check
Interface control check
Chaining check
WHEN
I / O IS
SUBCHANNEL
AT
AT C O N T R O L
IDLE
WORKING
SUBCHANNEL
UNIT
C*
DEVICE
BY
BY
BY
BY I / O
COMMAND
DURING
START
TEST
HALT
INTER-
CHAINING
I/O
I/O
I/O
RUPTION
C
C
C*
C
C*
C
C
C
C* t
C t
C*
C*
C
C*
C*
C*
C*
C
C
C
C*
C*
C*
C
C*
C* H
C
C
C
C
C
C
C
C*
C*
C
C
C
NOTES
116
AT
C*
C*
C*
C*
C*
C*
C*
S
S
CS
CS
CS
CS
CS
CS
Ct S S
Ct S S
CS
CS
CS
S
CS
S
S
CS
S
S
S
CS
CS
CS
CS
S
CS
CS
CS
CS
CS
S
S
S
S
S
S
CS
S
S
S
S
S
S
CS
CS
S
System Reset
The system-reset function resets the cPu, the channels,
and on-line, nonshared control units and i/o devices.
The cPU is placed in the stopped state and all pending interruptions are eliminated. The parity of general
and floating-point registers, as well as the parity of the
rsw, may be corrected. All error-status indicators are
reset to zero.
In general, the system is placed in such a state that
processing can be initiated without the occurrence of
machine checks, except those caused by subsequent
machine malfunction.
The reset state for a control unit or device is described in the appropriate System Reference Library
(S~L) publication. Off-line control units are not reset.
A system-reset signal from a cPtr resets only the
functions in a shared control unit or device belonging
to that cPtr. Any function pertaining to another cPu
remains undisturbed.
The system-reset function is performed when the
system-reset key is pressed, when initial program
ProgrammingNotes
Because the system reset may occur in the middle of
an operation, the contents of the rsw and of result
registers or storage locations are unpredictable. If the
cPu is in the wait state when the system reset is performed, and I/o is not operating, this uncertainty is
eliminated.
Following a system reset, incorrect parity may exist
in storage in all models and in the registers in some
models. Since a machine check occurs when information with incorrect parity is used, the incorrect information should be replaced by loading new information.
117
118
ProgrammingNotes
Initial program loading resembles a START I/O that
specifies the # o device selected in th e 1o a d- u n it
switches and a zero protection key. The ccw for this
START I/O has a read command, zero data address, a
byte count of 24, command-chain flag on, suppresslength-indication flag on, program-controlled-interruption flag off, and a virtual command address of
zero.
Initial program loading reads new information into
the first six words of storage. Since the remainder of
the IPL program may be placed in any desired section
of storage, it is possible t o preserve such areas of storage as the timer and PSW locations, which may be
helpful in program debugging.
If the selected input device is a disk, the IPL information is read from track 0.
The selected input device may be the channel-tochannel adapter involving two cPu's. A system reset
on this adapter causes an attention signal to be sent
to the addressed cvu. That cPu then should issue the
write command necessary to load a program into main
storage of the requesting cPtr.
When the PSW in location 0 has bit 14 set to one,
the c P u i s in the wait state after the IPL procedure
(the manual, the system, and the load lights are off,
and the wait light is on). Interruptions that become
pending during IPL are taken before instruction execution.
NAME
Emergency Pull
Power On
Power Off
In~rrupt
Wait
Manual
System
Test
Load
Load Unit
Load
Prefix Select*
* Multisystem feature
IMPLEMENTATION
Pull switch
Key, backlighted
Key
Key
Light
Light
Light
Light
Light
Three rotary switches
Key
Key switch
Wait Light
The wait light is on when the cPu is in the wait state.
Manual Light
The manual light is on when the cPu is in the stopped
state. Several of the manual controls are effective only
when the c r y is stopped, that is, when the manual
light is on.
System Light
The system light is on when the cPU cluster meter or
customer-engineering meter is running.
Power-On Key
This key is pressed to initiate the power-on sequence
of the system.
As part of the power-on sequence, a system reset is
performed in such a manner that the system performs
no instructions or I/o operations until explicitly directed. The contents of main storage, including its
protection keys, remain preserved.
The power-on key is backlighted to indicate when
the power-on sequence is completed. The key is effective only when the emergency pull switch is in its
in positior~.
Power-OfF Key
The power-off key is pressed to initiate the power-off
sequence of the system.
The contents of main storage and its protection keys
are preserved, provided that the cPu is in the stopped
state. Thekey is effective while power is on the system.
Interrupt Key
The interrupt key is pressed to request an external
interruption.
The interruption is taken when not masked off and
when the cPu is not stopped. Otherwise, the interruption request remains pending. Bit 25 in the interruption-code portion of the current ~sw is made one
to indicate that the interrupt key is the source of the
external interruption. The key is effective while power
is on the system.
Programming Note
MANUAL
WAIT
cPv
LIGHT
LIGHT
LIGHT
STATE
off
off
off
off
off
off
off
on
on
on
off
on
on
on
on
off
off
on
off
on
off
on
on
on
x/o
STATE
Test Light
The test light is on when a manual control is not in
its normal position or when a maintenance function is
being performed for cPu, channels, or storage.
Any abnormal switchsetting on the system control
panel or on any separate maintenance panel :for the
cPu~ storage, or channels that can affect the normal
operation of a program causes the test light to be on.
The test light may be on when one or more diagnostic functions under control of Dr~CNOSE are activated or when certain abnormal circuit breaker or
thermal conditions occur.
The test light does not reflect the state of marginal
voltage controls.
Load Light
The load light is on during initial program loading;
it is turned on when the load key is pressed and is
turned off after the loading of the new PSW is completed successfully.
Load-Unit Switches
Three rotary switches provide the ll-bit address of
the device to be used for initial program loading.
System Control Panel
119
The leftmost rotary switch has eight positions labeled 0-7. The other two are 16-position rotary switches
labeled with the hexadecimal characters 0-9, A-F.
Load Key
The load key is pressed to start initial program 10ading. The key is effective while power is on the system.
System Reset
Stop
Rate
Start
Storage Select
Address
Data
Store
Display
Set IC
Address Compare
Alternate Prefix*
* Multisystem feature
IMPLEMENTATION
Key
Key
Rotary switch
Key
Rotary or key switch
Rotary or key switches
Rotary or key switches
Key
Key
Key
Rotary or key switches
Light
System-Reset Key
The system-reset key is pressed to cause a system reset; it is effective while power is on the system. The
reset function does not affect any off-line or shared
device.
120
Stop Key
The stop key is pressed to cause the cPu to enter the
stopped state. The key is effective while power is on
the system.
Programming Note
Rate Switch
This rotary switch indicates the manner in which instructions are to be performed.
The switch has two or more positions, depending
on model. The vertical position is marked PROCESS. In
this position, the system starts operating at normal
speed when the start key is pressed. The position
left of vertical is marked INSTRUCTION"STEP. When the
start key is pressed with the rate switch in this position, one complete instruction is performed, and all
pending, not masked interruptions are subsequently
taken. The cPu next returns to the stopped state.
Any instruction can be executed with the rate
switch set to INSTRUCTION STEP. Input/output operations are completed to the interruption point. When
the cPu is in the wait state, no instruction is performed, but pending interruptions, if any, are taken
before the cPu returns to the stopped state. Initial
program loading is completed with the loading of the
new rsw before any instruction is performed. The
timer is not updated while the rate switch is set to
I N S T R U C T I O N STEP.
Start Key
The start key is pressed to start instruction execution
in the manner defined by the rate switch.
Pressing the start key after a normal stop causes instruction processing to continue as if no stop had occurred, provided that the rate switch is in the PXaOCESS
or INSTRUCTION-STEP position. Pressing the start key
after system reset without first introducing a new instruction address yields unpredictable results.
The key is effective only while the ca~u is in the
stopped state.
Storage-Select Switch
The storage area to be addressed by the address
switches is selected by the storage-select switches.
The switch can select main storage, the general registers, the floatlng-point registers and, in some cases,
the instruction-address part of the PSW.
When the general or floating-point registers are not
addressed directly but must be addressed by using
another address such as a local-store location, information is included on the panel to enable an operator
to compute the required address.
The switch can be manipulated without disrupting
cpu operations'
Address Switches
The address switches address a location in a storage
area and can be manipulated without disrupting ceu
operation. The address switches, with the storage-select switch, permit access to any addressable location.
Correct address parity is generated.
Data Switches
The data switches specify the data to be stored in the
location specified by the storage-select switch and address switches.
The number of data switches is sufficient to allow
storing of a full physical storage word. Correct data
parity is generated. Some models generate either correct or incorrect parity under switch control.
Store Key
The store key is pressed to store information in the
location specified by the storage-select switch and address switches.
The contents of the data switches are p|aced in the
main storage, general register, or floating-point register location specified. Storage protection is ignored.
When the location designated by the address switches
and storage-select switch is not available, data are not
stored.
The key is effective only while the cPu is in the
stopped state.
Display Key
The display key is pressed to display information in
the location specified by the storage-select switch and
address switches.
The data in the main storage, general register, or
floating-point register location, o r in the instructionaddress part of the PSW specified by the address
switches and the storage-select switch, are displayed.
When the designated location is not available, the displayed information is unpredictable. In some models,
the current instruction address is continuously displayed and hence is not explicitly selected.
The key is effective only while the ceu is in the
stopped state.
Set IC Key
This key is pressed to enter an address into the instruction-address part of the current psw.
The address in the address switches is entered in
bits 40-63 of the current psw. In some models the address is obtained from the data switches.
The key is effective only while the cPu is in the
stopped state.
Address-Compare Switches
These rotary or key switches provide a means of stopping the cpu on a successful address comparison.
When these switches are set to the STOP position,
the address in the address switches is c o m p a r e d
against the value of the instruction address on all
models and against all addresses on some models. An
equal comparison causes the cPu to enter the stopped
state. Comparison includes only the part of the instruction address that addresses the physical word size
of storage.
Comparison of the entire halfword instruction address is provided in some models, as is the ability to
compare data addresses.
The address-compare switches can be manipulated
without disrupting Pu operation other than by causing the address-comparison stop. When they are set
to any position except NORMAL,the test light is on.
Programming Note
When an address not used in the program is selected
in the address switches, the cpu runs as if the addresscompare switches were set to normal, except for the
reduction in performance which may be caused by the
address comparison.
Alternate.Prefix Light
The alternate-prefix light is on when the prefix trigger
is in its alternate state. The light is part of the multisystem feature.
121
Compare
The contents of register 4 are to be algebraically compared with the contents of register 2.
Assume:
Reg2
Reg 4
The instruction is:
Op Code
R1
00 00 03 92
00 00 03 47
R2
cR
R1
R2
R1
R2
Reg 2 (after)
11111111 11111111 10110110 00101011
Reg 2 contains the two's complement of Reg 4.
Condition code setting -- 1; less than zero.
Load Multiple
General registers 5, 6, and 7 are
consecutive words starting at 3200.
Assume:
Reg 5 (before)
00 00
Reg 6 ( before )
00 00
Reg 7 (before)
00 32
Reg 12
00 00
Loc 3200-3203
00 12
Loc 3204-3207
00 00
Loc 3208-3211
73 26
The instruction is:
Op Code
75
01
76
30
57
25
00
63
26
45
00
27
63
12
R1
LM
Reg 5 (after)
Reg 6 (after)
Reg 7 (after)
Condition code: unchanged.
122
to be loaded from
200
00 12 57 27
00 00 25 63
73 26 00 12
Reg 6 (after)
00000000 00000000 00000000 00010100 ( remainder ) -- .+ 20
Reg 7 (after)
00000000 00000000 00000000 00101101 ( quotient ) -- "4-45
Condition code: unchanged.
The instruction divides the contents of registers 6
and 7 by the content of register 4. T h e q u o t i e n t replaces the content of register 7, and the remainder
replaces the content of register 6.
Convert to Binary
The signed, packed decimal field at double-word location 1000-1007 is to be converted into a binary integer
and placed in general register 7.
Assume:
Reg 5
Reg 6
Loc 1000-1007
Reg 7 (before)
00 00 00
00 00 09
00 00 00
11111111
50
00
00 00 25 59 4.+11100000 11110111 10111111
R1
B2
D2
Op Code
Lx
L~
B~
50
CVB
D1
B2
tt!' I
D~
Reg 7 ( after )
00000000 00000000 01100011 111110 I0
Condition code: unchanged.
Convert to Decimal
R1
X2
B2
L1
L2
B1
Dz
B~
D2
D2
IZAP/II41=I
CVD
tI, 1
.oo
Compare Decimal
Store Multiple
T h e contents of general registers 14, 15, 0, a n d 1 are
to b e stored in consecutive words starting with 4050.
Assume:
Reg 14
00 00 25 63
Reg 15
00 01 27 36
Reg 0
12 43 00 62
Reg 1
73 26 12 57
Reg 6
00 00 40 00
Loc 4050-4053 (before)
63 25 41 32
Loc 4054-4057 (before)
17 25 63 42
Loc 4058-4061 (before)
07 16 32 71
Loc 4062-4065 (before)
98 67 45 21
Rz
Op Code
tl
L~
Bx
D~
B2
D2
15o tt J13 J
lOO
Rs
B2
50
STM
00
00
12
73
00
01
43
26
25
27
00
12
63
36
62
57
Decimal Add
T h e signed, p a c k e d d e c i m a l field at location 500-503
is to b e a d d e d to the signed, p a c k e d d e c i m a l field at
location 2000-2002.
Assume:
Reg 12
00 00 20 00
Reg 13
00 00 04 80
Loc 2000-2002 (before)
38 46 0 Loc 500-503
01 12 34 5-k
Multiply Decimal
T h e signed, p a c k e d d e c i m a l field in location 1200-1204
is to be m u l t i p l i e d by the signed, p a c k e d d e c i m a l field
in location 500-501, and the p r o d u c t is to be p l a c e d in
location 1200-1204.
Assume:
00 00 12 00
Reg 4
00 00 02 50
Reg 6
00 00 38 46 0 Loc 1200-1204 (before)
32 1 Loc 500-501
The instruction is:
Op Code
tl
L2
Bx
lli,l,l,!
D1
B~
D~
0 5t1,1
01 23 45 66 04-
Appendix A
123
Divide Decimal
Op Code
L~
L2
I D, Ill,It
B1
Dx
I, I
B~
Op Code
D2
L..
I, vo/ll
....
Bx
!i21
D1
B.2
600
D~
t1, i
01 23 45 6-4-
Move Immediate
Pack
Assume locations 1000-1004 contain the following'
Z1 z2 z3 z4 $5
where Z =' four-bit zone code
S -- four-bit sign code
The field is to be in packed format with two leading
zeros and placed in location 2500-2503.
Reg 12
00 00 10 00
Reg 13
00 00 25 00
Loc 1000-1004
Z1 Z2 Z3 Z4 $5
Loc 2500-2503 (before)
A B C D
The instruction is:
Op Code
L~
Lx
L2
B1
Dx
I AC I/I 141, I
B2
o _tt!,2!
Op Code
I~
B1
D~
MVI
12
100
D2
$ Z1 Z2 Z3 Z5 Z0
....
Move Numeric
Loc 2500-2503 (after)
Condition code: unchanged.
00 12 34 5S
Unpack
Assume locations 2501-2503 contains the following
fields:
12 34 5s
This field is to be put into zoned
the locations 1000-1004 where:
code.
Reg 12
00 00
Reg 13
00 00
Loc 2501-2503
12 34
Loc1000-1004 (before)
A B
The instruction is:
Op Code
L2
[uNP I[ 4 t 2
B1
D1
:0
Op Code
10 00
25 00
5S
C D E
B2
ti, 1
and results in
Z1 Z2 Z3 Z4 $5
Loc 1000-1004 (after)
where Z is a four-bit zone code.
Condition code: unchanged.
124
B1
Ol
B2
70
Loc 6070-6074 (after)
Condition code: unchanged.
Da
80 " ' ~ ]
Y3 Y6 Y9 Y7 Y8
D~
, ,
Move Zones
Let Z and Y represent four-bit zones in the eight-bit
characters making up the fields at location 2006-2010
and 3007-3011, respectively. The zones of the field at
2006-2010 are to be replaced by the zones from location 3007-3011.
Assume:
Reg 12
Reg 15
Loc 2006-2010 (before)
Loc 3007-3011
The instruction is:
Op Code
lbzlll
00
00
Z1
Y8
B~
D~
, .... l i s t
00
00
Z4
Y7
20
30
Z7
Y4
Op Code
00
00
Z8 Z5
Y6 Y8
B~
D~
Y1 Y4 Y7 Y8 Y5
R~
R~
Reg 5
00000000 00000000 00000000 01010010
Condition code -- 1; not all-zero result.
OR
Ri
R~
Reg 5 (after)
00000000 00000000 00000000 01011010
Condition code -- 1; not all-zero result.
Is
Bz
D~
Mask from TM
10110010
Byte tested
01101101
Selected result
0- 10 -- 0Condition code -- 1; some selected bits are 0, some selected
bits are 1.
Insert Character
T h e c h a r a c t e r at location 4200 is to be inserted into
the l o w - o r d e r eight bits of register 7.
Assume.
Reg 7 (before)
00000000 10110110 11000101 01101101
Reg4
00 00 02 00
Reg 5
00 00 30 00
Loc 4200
00001011
The instruction is:
Op Code
R1
X2
B~
D2
Reg 7 (after)
00000000 10110110 11000101 00001011
Condition code: unchanged.
Load Address
Reg 5 (after)
00000000 00000000 00000000 11111111
Condition code -- 1; not all-zero result.
Exclusive OR
W h e n t w o o p e r a n d s are c o m b i n e d by an EXCLUSIVE OR,
t h e y are m a t c h e d bit-for-bit. If the c o r r e s p o n d i n g bits
m a t c h ( b o t h 0 or b o t h 1), the result is 0. If they differ,
the result is 1. F o r example, if the EXCLUSIVE OR Of
register 5 a n d 6 is to be taken,
Assume:
Reg 6
00000000 00000000 00000000 10110111
Reg 5 ( before )
00000000 00000000 00000000 11101101
R1
1000
Reg 4 (after)
Condition code: unchanged.
00 03 12 10
Appendix A
125
Translate
Assume'
Reg 1 (before)
Reg 2 (before)
Reg 12
Reg 15
00
00
00
00
00
00
00
00
00
00
30
20
00
00
00
00
Loc 3000-3029
T h e i n s t r u c t i o n is:
Op Code
Bx
D1
B~
D2
o
Op Code
i rR /! j
19
B1
D~
J12j
B2
100
,Sill 15 J
.. /~[]
I000
1015
..
1016
1032
1048
1o64
BI
1o8o
&
1096
-S ~
ill
D~
--
00 00 30 11
RegReg(after)2
1 (after)
00 00 00 20
Condition code = 1; scan not completed.
In general, TRANSLATE AND TEST is executed by use
of EXECUTE, which supplies the length specification
from a register. In this way a complete statement scan
can be performed with a single TRANSLATE AND rEST
instruction repeated over and over by means of
EXECUTE. This is done by computing the length of the
remaining part o the statement to be scanned in a
general register, and referencing that register in the
R1 field of E X E C U T E , whose address references a T R A N S L A T E AND TEST instruction in which L : 0 , B1----1, D I = I
and the B2 and D2 reference the table to be used in
the scan.
Translate and Test Table
-7
2015
2000i0
2016 0
2032 0
2048 0
2064 0
2080 90
2096 80
85
2112 0
2128 0
2144 0
2160 0
10 15 20
25
30 35 40
45
50 55
0 60
70
75
0 i'0
2176 0
2192 0
2208 0
. .
1112
1128
1144
1160
--
1176
1192
1208
U V
'Y'
1224
1240 0
65
1255
2224 0
126
assigned.
2240 0
0
L
0
L
0
.
....
2255
Branch On Condition
SYMBOL
MEANING
b
( (hexidecima121 )
) (hexidecimal 22)
d (hexidecima120)
blank character
significance start character
field separator character
digit-select character
Reg 5
Reg 12
Assume:
bdd,dd( .ddbCR
02 57 42 6 +
00 00 10 00
I'
I11
B1
Da
I' i
o-
B~
00000100
00 04 00 00
M1 "
X~
B2
BC
D2
100
D~
b
d
d
0
2
~1
d
(
5
7
4
S TRIGGER
~1
2
d
6+
b
C
R
Thus:
Loc 1000-1012 (after)
0
0
1
1
1
1
1
1
1
0
0
0
0
RULE
LOCATION 1000-1012
R;
X2
B2
D2
bb2, 574.26bbb
NOTES
Execute
00 12 34 56
00 00 10 02
01110000 = 11210
00 00 00 50
00 00 10 50
MVC 0, 15, 100, 12, 1000
0000 0000
The instruction is
Op Code
EX
R1
X2
B~
D2
;oo
127
Op C o d e
Bx
,
Da
,
B2
D2
,,,,
Zero:
Source
12
12
12
01
34
34
34
23
56
56
56
45
78
78
78
67
9S
9S
90
89
00 00
00 0S
00 0S
00 0S
128
Receipts
1. Receipt quantity X unit cost ---- receipt cost
2. Receipt cost + total cost = new total cost
3. Receipt quantity + quantity on hand _-- new
quantity
4. New total cost ~ new quantity _-- new average
unit cost
Issues
RecordDescription
Master Record:
Item ~ : 6 alphameric characters
Description: 20 alphabetic characters
Quantity: 7 digits plus sign
Total cost: 11 digits plus sign (2 decimal places)
Average unit cost: 7 digits plus sign (3 decimal places)
Reorder level: 5 digits plus sign
Transaction Record:
Type code: 1 digit plus sign
( plus 1 ---- receipt)
(plus 2 .~ issue)
Item .~". 6 alphameric characters
Quantity: 5 digits plus sign
Receipt unit cost: 6 digits plus sign (2 decimal places)
IBM
x~s-6so9
,.,
Printedin U.S.A.
oF
PUNCHING INSTRUCTIONS
'3
DATE
Name
STA]RTX',
12OP
I0
I
I
I
16
BALR
] iUSi]~] G
Operand
25
18
/ 5
MAST
I
I
iCOTV
TOTC
:,
~
OS
DS
PL4
PL6
AVG.
RORO
OS
DS
PL4
PL3
~Ds
TYPE
~T~EM
T~)TY
UC
PROD
DI V
"',,Z" V A
FI VE
START
GE T X
COMP
I
I
i
i
]
=
i
I,
i,
E QU
D5
DS
DS
DS
D5
~
DC
~GET
C~ET
CLC
i [
i|
,,
e c
6C
BpuC
IT
'
II
J"/] G H
~.
I[
,GENT
CL61
45
50
,.~)~
15jST'ART
BC
P5
OS
IdentificationSequence
Comments
35
55
'
ZTEIM
CL 2 0
I TEM
il
'1
60
65
71
NU~BIER
O E SCR/" P T [
ON
~ U A N~T I T Y
TOTAL
C 0S7
~AVERAGE
COST
R:EORDER
LEVEL
TRANSACTION
woRN
AREA
TYPE
C oDE
I T EM N U ~,tB EIR.
~O A N T I T Y
N
U
NOIR K A R ~: A
D I V I I S 1 ON
O l V l S I Otq W O R K
ARiEA
CONSTANT
OSED
HALF
ADJUST
GET
FIRST
MASTER
GET
T R A N S A C [ T [ ON
CHEER
FOR
ACTI
V[ TY
TO E Q U A L
I F t~ASTER
ACTt VE
TO H I G H
IF
/blASTER
] N i~ ( T [ V E~
TO E X C E P T T
ON
TRANS LOjq
I~iRI T
MASTER
([OCS)
READ
blASTER
(IOC5)
EL6
PL3
PL#
PL7
PL7
PL/
]
P "5 /
blAST
X
[T!EM,/',4AST
8,ECtUAL
Z ,H]GH
I 5,EXCEPT.1"ON
lffAT
~A ST
PROGRAMMASTER INVENTORY F I L E M A I N T E N A N C E
....
STATEMENT
Operand
Name
1 .
Comments
10
55
60
J
71
65
IdentificationSequence
(,
'
PROORAM M A S T E R
INVENTORY
FILE
MAINTE.NANCE
PAGE 3
j
PROGRAMMER
10
tiLl
I.. k
1 I 1 I 1;f I1
Operation
12
16
18
8C
1~)
ljolf
I I / I
Operand
25
GETX
30
I i tJ l ftltltl,,,
I111
-It 11 t I I ! I I I } I I I
II
DATE
Name
OF-3
35
[lillltl
111t111t
It!11111
4O
45
I
/
I
50
Comments
55
!
60
73 IdentificatlonSequence
71
65
~
I!
80
II
II/
! !l!
II11
Ill[
ill!
Appendix A
129
6. Assume that record read into defined storage contains a field labeled "date." This field is stored in six
character positions as follows:
Day - two characters
M o n t h - two characters
Y e a r - two characters
Place the date an item is ordered (year, month,
day) into a record field labeled "key."
I B M
IBM System/Aft0 A . . . .
Printed
......
in U . S . A .
..
PROGRAM
PUNCHING INSTRUCTIONS
PAGE
OF
,,
II1_
GRAPHIC
,,
DATE
PROGRAMMER
CARD ELECTRONUMBER
Ill
PUNCH
STATEMENT
Name
'.
11
s r R ~r A ~i
j
i
i J
I
~..tJ..J-J-~LS.~
130
Operation
12
18
TR
K E y'. ,I,~lr R E A M
K ~ V .,IZ~IA r ~
Dc
Operand
25
30
'
i
I
i '~
xL~!, o~!o~oa!ovo,oa.,
35
1
i ....
40
45
NSLIATE
Comments
55
50
[~ml'r!E
zuro
IdentlflcotlonSequence
60
PRo
E,~
71
Se
73
80
L.,.,S,,.
00000000
lxxxxxxx
01xxxxxx
001xxxxx
0001xxxx
00001xxx
000001xx
0000001x
00000001
fetches
fetches
fetches
fetches
fetches
fetches
fetches
fetches
fetches
00000000
01111111
10111111
11011111
11101111
11110111
11111011
11111101
11111110
(0~o)
(127~0)
(19L,,)
(223~,,)
(239~o)
(247ao)
(251,o)
(253~o)
(254~,,)
0
0
10 11 12 13 14 15
0 254 253 253 251 251 251 251 247 247 247 247 247 247 247 247
,
16
239 239 239 239 239239 239 239 239 239 2391239 239 239 239 239
32
223 223 223 223 223 223 223 223 223 223 223 223 22:3 223 223 223
48
223 223 223 223223 223 223 223 223 223 223:223 22:3 223 223 223
64
191 191 191 191 191 191 191 191 191 191 191 191 19'I 191 191 191
80
191 191 191 191 191 191 191 191 191 191 191 191 19'I 191 191 191
96
191 191 191 191 191 191 191 191 191 191 191 191 19'I 191 191 191
112
191 191 191 191 191 191 191 191 191 191 191 191 19'I 191 191 191
128
127 127 127 127 127 127 127 127 127 127 127127 127 127 127 127
144
127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127
160
127 127 127 !27 127 127 127 127 127 127 127127 127 127 127 127
176
127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127
192
127 127 127 127 127 127 127 127 127 127 127 127 127 127 127 127
208
127 127127 127 !27 i127 127 127 127127 127 127! 127 127 127 127
224
127 127 127 127 1271127 127 127 127127 127 127 127 127 127 127
240
127 127, 127 127 127 127 127 127 127 127 127 127 127 127 127 127
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
All Decimal Numbers Represent an 8-Bit B|nary Value
IBM
PROGRAM
IBM
7"E,$ T
AND
( H A N EE
B.r T
Syetsm/3GO
Assembler
X~45~
~rtmed tn U.S.A.
Coding Form
,,~ TR A M ~
GRAPHIC
,
PROGRAMMER
DATE
PUNCH
STATEMENT
N~'4.
t8
Ol~rand
2.5
C~n~
IdentificationSequence
30
Appendix A
131
A fixed-point n u m b e r is a s i g n e d value, r e c o r d e d as a
b i n a r y integer. It is called fixed p o i n t b e c a u s e t h e prog r a m m e r d e t e r m i n e s t h e fixed p o s i t i o n i n g of t h e b i n a r y
point.
F i x e d - p o i n t o p e r a n d s m a y be r e c o r d e d in h a l f w o r d
(16 b i t s ) o r w o r d (32 bits) lengths. In b o t h lengths,
t h e first bit position ( 0 ) holds t h e sign of t h e n u m b e r ,
w i t h t h e r e m a i n i n g b i t positions (1-15 for h a l f w o r d s
a n d 1-31 for f u l l w o r d s ) u s e d to d e s i g n a t e t h e m a g n i t u d e of t h e n u m b e r .
Positive fixed-point n u m b e r s are r e p r e s e n t e d in t r u e
b i n a r y f o r m w i t h a zero sign bit. N e g a t i v e fixed-point
n u m b e r s are r e p r e s e n t e d in two's c o m p l e m e n t n o t a t i o n
w i t h a one bit in the sign position. I n all cases, t h e
bits b e t w e e n t h e sign bit a n d t h e leftmost significant
bit of t h e i n t e g e r are t h e s a m e as t h e sign bit (i.e.
all zeros for positive n u m b e r s , all ones for n e g a t i v e
numbers).
N e g a t i v e fixed-point n u m b e r s are f o r m e d in two's
c o m p l e m e n t n o t a t i o n b y i n v e r t i n g e a c h bit of t h e positive b i n a r y n u m b e r a n d a d d i n g one. F o r e x a m p l e , t h e
true b i n a r y f o r m of t h e d e c i m a l v a l u e ( p l u s 26) is
m a d e n e g a t i v e ( m i n u s 26) in t h e following m a n n e r :
S
0 0000000 00011010
1 1111111 11100101
1
-26
1 1111111 11100110
COMMENTS
+57
+35
=
=
00111001
00100011
+92
01011100
+57
--35
=
=
00111001
11011101
+22
00010110
+35
-57
---
00100011
11000111
-22
--
11101010
-57
-35
---
11000111
11011101
No overflow
-92
--
10100100
-57
-92
---
11000111
10100100
-149
-- *01101011
+57
+92
---
149
INTEGER
+ 26
Invert
Add 1
T h e f o l l o w i n g a d d i t i o n e x a m p l e s illustrate two's
c o m p l e m e n t a r i t h m e t i c . O n l y e i g h t bit positions are
used. All n e g a t i v e n u m b e r s are in two's c o m p l e m e n t
~OrlTl.
No overflow
Ignore c a r r y - carry into high
order position and carry out.
00111001
01011100
-- *10010101
2 ~5 --I
20
0
--2 0
--2 ~
=
=
=
=
=
DECIMAL
32,767
1
0
--1
--32,768
--0
=0
=0
=1
=1
INTEGER
1111111
0000000
0000000
1111111
0000000
11111111
00000001
00000000
11111111
00000000
2': -1
216
20
0
-20
-21
--218
--2sl 4-1
-2 ~1
132
DECIMAL
=0
=0
=0
=0
=1
=1
-- 1
-- 1
=1
INTEGER
Conversion Example
Convert the decimal number 149.25 to a short-precision floating-point operand.
1. The number is decomposed into a decimal integer
and a decimal fraction.
149.25
=
149 plus 0.25
2. The decimal integer is converted to its hexadecimal representation.
149,o
=
9516
3. The decimal fraction is converted to its hexadecimal representation.
0.251o
=
0.4~
4. Combine the integral and fractional parts and express as a fraction times a power of 16 (exponent).
95.416
=
(0.954 16~)16
[ l'C aro er .c !
0
Fra .oo
78
Is! Charac,or,st,c !
0
78
Frac ,on
!
63
133
The following are sample normalized short Aoatingpoint numbers. The last two numbers represent the
smallest and the largest positive normalized numbers.
NUMBER
1.0
0.5
1/64
0.0
--15.0
2 10 "Ts
7 X 10 ~
134
P O W E R S OF 1 6
=
=
=
----~'
'~
+ 1 / 1 6 161
-+-8/16 16 o
+ 4 / 1 6 16 "1
+0
16 .6`
--15/16 16 ~
+ 1/16 X 16 "~
(1-16 4) X 16 ~
=0
----0
-~0
=0
----1
g0
~0
CHAR
1000001
1000000
01Ill11
0000000
1000001
0000000
1111111
FRACTION
0001 0000
1000 0000
0100 0000
0000 0000
1111 0000
0001 0000
11111111
Appendix
D. Powers o f T w o T a b l e
2"
2 -"
1
2
4
8
0
1
2
3
1.0
0.5
0.25
0.125
0.062
0.031
0.015
0.007
5
25
625
812 5
8
9
10
11
0.003
0.001
0,000
0,000
906 25
953 125
9'76 562 5
488 281 25
16
32
64
128
256
512
1 024
2 048
4
8
16
32
096
192
384
768
12
13
14
15
0.000
0.000
0.000
0.000
244
122
061
030
140 625
0'70 312 5
035 156 25
51'7 578 125
65
131
262
524
536
072
144
288
16
17
18
19
0.000
0.000
0.000
0.000
015
007
003
001
5
25
625
812 5
1
2
4
8
048 5'76
09'7 152
194 304
388 608
20
21
22
23
0.000
0.000
0.000
0.000
000
000
000
000
953
476
238
119
674
837
418
209
316
158
579
289
406
203
101
550
16
33
67
134
7'77 216
554 432
108 864
217 '728
24
25
26
2'7
0.000
0.000
0.000
0.000
000
000
000
000
059
029
014
007
604
802
901
450
644
322
161
580
"/75 390
38'7 695
193 847
596 923
625
312 5
656 25
828 125
28
29
30
31
0.000
0.000
0.000
0.000
000
000
000
000
003
001
000
000
725
862
931
465
290
645
322
661
298
149
574
287
914
957
478
739
32
33
34
35
0.000
0.000
0.000
0.000
000
000
000
000
000
000
000
000
232
116
058
029
4
8
1'7
34
294 967
589 934
1'79 869
359 738
296
592
184
368
25
125
562 5
'/81 25
461
230
615
307
062
031
515
257
5
25
625
812 5
25
125
562 5
281 25
Appendix D
135
HEXADECIMAL
v e r s i o n of d e c i m a l a n d h e x a d e c i m a l n u m b e r s in t h e s e
ranges:
HEXADECIMAL
DECIMAL
000 to F F F
0000 to 4095
F o r n u m b e r s o u t s i d e t h e r a n g e of t h e t a b l e , a d d t h e
f o l l o w i n g v a l u e s to t h e t a b l e figures:
HEXADECIMAL
DECIMAL
1000
2000
3000
4096
8192
12288
0000
0016
0032
0048
0064
0080
0096
0112
0128
0144
0160
0176
0192
0208
0224
0240
0001
0017
0033
0049
0065
0081
0097
0113
0129
0145
0161
0177
0193
0209
0225
0241
0002
0018
0034
0050
0066
0082
0098
0114
0130
0146
0162
0178
0194
0210
0226
0242
0003
0019
0035
0051
0067
0083
0099
0115
0131
0147
0163
0179
0195
0211
0227
0243
0004 0005
0020 0021
0036 0037
0052 0053
0068 0069
0084 0085
0100 0101
0116 0117
0132 0133
0148 ~ 0149
0164 0165
0180 0181
0196 0197
0212 0213
0228 0229
0244 0245
0006
0022
0038
0054
0070
0086
0102
0118
0134
0150
0166
0182
0198
0214
0230
0246
0007
0023
0039
0055
0071
0087
0103
0119
0135
0151
0167
0183
0199
0215
0231
0247
0008
0024
0040
0056
0072
0088
0104
0120
0136
0152
0168
0184
0200
0216
0232
0248
0009
0025
0041
0057
0073
0089
0105
0121
0137
0153
0169
0185
0201
0217
0233
0249
0010
0026
0042
0058
0074
0090
0106
0122
0138
0154
0170
0186
0202
0218
0234
0250
0011
0027
0043
0059
0075
0091
0107
0123
0139
0155
0171
0187
0203
0219
0235
0251
0012
0028
0044
0060
0076
0092
0108
0124
0140
0156
0172
0188
0204
0220
0236
0252
0013
0029
0045
0061
0077
0093
0109
0125
0141
0157
0173
0189
0205
0221
0237
0253
0014
0030
0046
0062
0078
0094
0110
0126
0142
0158
0174
0190
0206
0222
0238
0254
0015
0031
0047
0063
0079
0095
0111
0127
0143
0159
0175
0191
0207
0223
0239
0255
100
110
120
130
140
150
160
170
180
190
1A0
1B0
1C0
1D0
1E0
1F0
0256
0272
0288
0304
0320
0336
0352
0368
0384
0400
0416
~ 0432
0448
0464
0480
0496
0257
0273
0289
0305
0321
0337
0353
0369
0385
0401
0417
0433
0449
0465
0481
0497
0258
0274
0290
0306
0322
0338
0354
0370
0386
0402
0418
0434
0450
0466
0482
0498
0259
0275
0291
0307
0323
0339
0355
0371
0387
0403
0419
0435
0451
0467
0483
0499
0260
0276
0292
0308
0324
0340
0356
0372
0388
0404
0420
0436
0452
0468
0484
0500
0262 0263
0278 0279
0294 0295
0310 0311
0326 0327
0342 0343
0358. 0359
0374 0375
0390 0391
0406 0407
0422 0423
0438 0439
0454 0455
0470 0471
0486 0487
0502 0503
0264
0280
0296
0312
0328
0344
0360
0376
0392
0408
0424
0440
0456
0472
0488
0504
0265
0281
0297
0313
0329
0345
0361
0377
0393
0409
0425
0441
0457
0473
0489
0505
0266
0282
0298
0314
0330
0346
0362
0378
0394
0410
0426
0442
0458
0474
0490
0506
0267
0283
0299
0315
0331
0347
0363
0379
0395
0411
0427
0443
0459
0475
0491
0507
0268
0284
0300
0316
0332
0348
0364
0380
0396
0412
0428
0444
0460
0476
0492
0508
0269
0285
0301
0317
0333
0349
0365
0381
0397
0413
0429
0445
0461
0477
0493
0509
0270
0286
0302
0318
0334
0350
0366
0382
0398
0414
0430
0446
0462
0478
0494
0510
0271
0287
0303
0319
0335
0351
0367
0383
0399
0415
0431
0447
0463
0479
0495
0511
136
16384
20484
24576
28672
32768
36864
40960
45056
49152
53248
57344
61440
000
010
020
030
040
050
060
070
080
090
0A0
0B0
0C0
0D0
0E0
0F0
DECIMAL
40O0
5000
6000
7000
8000
9000
A000
B000
C000
D000
E000
F000
0261
0277
0293
0309
0325
0341
0357
0373
0389
0405
0421
0437
0453
0469
0485
0501
200
210
220
230
0512
0528
0544
0560
0513
0529
0545
0561
0514
0530
0546
0562
0515
0531
0547
0563
0516
0532
0548
0564
0517
0533
0549
0565
0518
0534
0550
0566
0519
0535
0551
0567
0520
0536
0552
0568
0521
0537
0553
0569
0522
0538
0554
0570
0523
0539
0555
0571
0524
0540
0556
0572
0525
0541
0557
0573
0526
0542
0558
0574
0527
0543
0559
0575
240
250
260
270
280
290
2A0
2B0
2C0
2D0
2E0
2F0
0576
0592
0608
0624
0640
0656
0672
0688
0704
0720
0736
0752
0577
0593
0609
0625
0641
0657
0673
0689
0705
0721
0737
0753
0578
0594
0610
0626
0642
0658
0674
0690
0706
0722
0738
0754
0579
0595
0611
0627
0643
0659
0675
0691
0707
0723
0739
0755
0580
0596
0612
0628
0644
0660
0676
0692
0708
0724
0740
0756
0581
0597
0613
0629
0645
0661
0677
0693
0709
0725
0741
0757
0582
0598
0614
0630
0646
0662
0678
0694
0710
0726
0742
0758
0583
0599
0615
0631
0647
0663
0679
0695
0711
0727
0743
0759
0584
0600
0616
0632
0648
0664
0680
0696
0712
0728
0744
0760
0585
0601
0617
0633
0649
0665
0681
0697
0713
0729
0745
0761
0586
0602
0618
0634
0650
0666
0682
0698
0714
0730
0746
0762
0587
0603
0619
0635
0651
0667
0683
0699
0715
0731
0747
0763
0588
0604
0620
0636
0652
0668
0684
0700
0716
0732
0748
0764
0589
0605
0621
0637
0653
0669
0685
0701
0717
0733
0749
0765
0590
0606
0622
0638
0654
0670
0686
0702
0718
0734
0750
0766
0591
0607
0623
0639
0655
0671
0687
0703
0719
0735
0751
0767
300
310
320
330
0768
0784
0800
0816
0769
0785
0801
0817
0770
0786
0802
0818
0771
0787
0803
0819
0772
0788
0804
0820
0773
0789
0805
082I
0774
0790
0806
0822
0775
0791
0807
0823
0776
0792
0808
0824
0777
0793
0809
0825
0778
0794
0810
0826
0779
0795
0811
0827
0780
0796
0812
0828
0781
0797
0813
0829
0782
0798
0814
0830
0783
0799
0815
0831
340
350
360
370
380
390
3A0
3B0
3C0
3D0
3E0
3F0
0832
0848
0864
0880
0896
0912
0928
0944
0960
0976
0992
1008
0833
0849
0865
0881
0897
0913
0929
0945
0961
0977
0993
1009
0834
0850
0866
0882
0898
0914
0930
0946
0962
0978
0994
1010
0835
0851
0867
0883
0899
0915
0931
0947
0963
0979
0995
1011
0836
0852
0868
0884
0900
0916
0932
0948
0964
0980
0996
1012
0837
0853
0869
0885
0901
0917
0933
0949
0965
0981
0997
1013
0838
0854
0870
0886
0902
0918
0934
0950
0966
0982
0998
1014
0839
0855
0871
0887
0903
0919
0935
0951
0967
0983
0999
1015
0840
0856
0872
0888
0904
0920
0936
0952
0968
0984
1000
1016
0841
0857
0873
0889
0905
0921
0937
0953
0969
0985
1001
1017
0842
0858
0874
0890
0906
0922
0938
0954
0970
0986
1002
1018
0843
0859
0875
0891
0907
0923
0939
0955
0971
0987
1003
1019
0844
0860
0876
0892
0908
0924
0940
0956
0972
0988
1004
1020
0845
0861
0877
0893
0909
0925
0941
0957
0973
0989
1005
1021
0846
0862
0878
0894
0910
0926
0942
0958
0974
0990
1006
1022
0847
0863
0879
0895
0911
0927
0943
0959
0975
0991
1007
1023
400
410
420
430
440
450
460
470
480
490
4A0
4B0
4C0
4D0
4E0
4F0
1024
1040
1056
1072
1088
1104
1120
1136
1152
1168
1184
1200
1216
1232
1248
1264
1025
1041
1057
1073
1089
1105
1121
1137
1153
1169
1185
1201
1217
1233
1249
1265
1026
1042
1058
1074
1090
1106
1122
1138
1154
1170
1186
1202
1218
1234
1250
1266
1027
1043
1059
1075
1091
1107
1123
1139
1155
1171
1187
1203
1219
1235
1251
1267
1028
1044
1060
1076
1092
1108
1124
1140
1156
1172
1188
1204
1220
1236
1252
1268
1029
1045
1061
1077
1093
1109
1125
1141
1157
1173
1189
1205
1221
1237
1253
1269
1030
1046
1062
1078
1094
1110
1126
1142
1158
1174
1190
1206
1222
1238
1254
1270
1031
1047
1063
1079
1095
1Ill
1127
1143
1159
1175
1191
1207
1223
1239
1255
1271
1032
1048
i064
1080
1096
1112
1128
1144
1160
1176
1192
1208
1224
1240
1256
1272
1033
1049
1065
1081
1097
1113
1129
1145
1161
1177
1193
1209
1225
1241
1257
1273
1034
1050
1066
1082
1098
1114
1130
1146
1162
1178
1194
1210
1226
1242
1258
1274
1035
1051
1067
1083
1099
1115
1131
I147
1163
1179
1195
1211
1227
1243
1259
1275
1036
1052
1068
1084
1100
1116
1132
1148
1164
1180
1196
1212
1228
1244
1260
1276
1037
1053
1069
1085
1101
1117
1133
1149
1165
1181
1197
1213
1229
1245
1261
1277
1038
1054
1070
1086
1102
1118
1134
1150
1166
1182
1198
1214
1230
1246
1262
1278
1039
1055
1071
1087
1103
1119
1135
1151
1167
1183
1199
1215
1231
1247
1263
1279
500
510
520
530
540
550
560
570
580
590
5A0
5B0
5C0
5D0
5E0
5F0
1280
1296
1312
1328
1344
1360
1376
1392
1408
1424
1440
1456
1472
1488
1504
1520
1281
1297
1313
1329
1345
1361
1377
1393
1409
1425
1441
1457
1473
1489
1505
1521
1282
1298
1314
1330
1346
1362
1378
1394
1410
1426
1442
1458
1474
1490
1506
1522
1283
1299
1315
1331
1347
1363
1379
1395
1411
1427
1443
1459
1475
1491
1507
1523
1284
1300
1316
1332
1348
1364
1380
1396
1412
1428
1444
1460
1476
1492
1508
1524
1285
1301
1317
1333
1349
1365
1381
1397
1413
1429
1445
1461
1477
1493
1509
1525
1286
1302
1318
1334
1350
1366
1382
1398
1414
1430
1446
1462
1478
1494
1510
1526
1287
1303
1319
1335
1351
1367
1383
1399
1415
1431
1447
1463
1479
1495
1511
1527
1288
1304
1320
1336
1352
1368
1384
1400
1416
1432
1448
1464
1480
1496
1512
1528
1289
1305
1321
1337
1353
1369
1385
1401
1417
1433
1449
1465
1481
1497
1513
1529
1290
1306
1322
1338
1354
1370
1386
1402
1418
1434
1450
1466
1482
1498
1514
1530
1291
1307
1323
1339
1355
1371
1387
1403
1419
1435
1451
1467
1483
1499
1515
1531
1292
1308
1324
I340
1356
1372
1388
1404
1420
1436
1452
1468
1484
1500
1516
1532
1293
1309
1325
1341
1357
1373
1389
1405
1421
1437
1453
1469
1485
1501
1517
1533
1294
1310
1326
1342
1358
1374
1390
1406
1422
1438
1454
1470
1486
1502
1518
1534
1295
1311
1327
1343
1359
1375
1391
1407
1423
1439
1455
1471
1487
1503
1519
1535
Appendix E
137
'
600
610
620
630
1536
1552
1568
1584
1537
1553
1569
1585
1538
1554
1570
1586
1539
1555
1571
1587
1540
1556
1572
1588
1541
1557
1573
1589
1542
1558
1574
1590
1543
1559
1575
1591
1544
1560
1576
1592
1545
1561
1577
1593
1546
1562
1578
1594
1547
1563
1579
1595
1548
1564
1580
1596
1549
1565
1581
1597
1550
1566
1582
1598
1551
1567
1583
1599
640
650
660
670
1600
1616
1632
1648
1601
1617
1633
1649
1602
1618
1634
1650
1603
1619
1635
1651
1604
1620
1636
1652
1605
1621
1637
1653
1606
1622
1638
1654
1607
1623
1639
1655
1608
1624
1640
1656
1609
1625
1641
1657
1610
1626
1642
1658
1611
1627
1643
1659
1612
1628
1644
1660
1613
1629
1645
1661
1614
1630
1646
1662
1615
1631
1647
1663
680
690
6A0
6B0
1664
1680
1696
1712
1665
1681
1697
1713
1666
1682
1698
1714
1667
1683
1699
1715
1668
1684
1700
1716
1669
1685
1701
1717
1670
1686
1702
1718
1671
1687
1703
1719
1672
1688
1704
1720
1673
1689
1705
1721
1674
1690
1706
1722
1675
1691
1707
1723
1676
1692
1708
1724
1677
1693
1709
1725
1678
1694
1710
1726
1679
1695
1711
1727
6C0
6D0
6E0
6F0
1728
1744
1760
1776
1729
1745
1761
1777
1730
1746
1762
1778
1731
1747
1763
1779
1732
1748
1764
1780
1733
1749
1765
1781
1734
1750
1766
1782
1735
175I
1767
1783
1736
1752
1768
1784
1737
1753
1769
1785
1738
1754
1770
1786
1739
1755
1771
1787
1740
1756
1772
1788
1741
1757
1773
1789
1742
1758
1774
1790
1743
1759
1775
1791
700
710
720
730
740
750
760
770
1792
1808
1824
1840
1856
1872
1888
1904
1793
1809
1825
1841
1857
1873
1889
1905
1794
1810
1826
1842
1858
1874
1890
1906
1795
1811
1827
1843
1859
1875
1891
1907
1796
1812
1828
1844
1860
1876
1892
1908
1797
1813
1829
1845
1861
1877
1893
1909
1798
1814
1830
1846
1862
1878
1894
1910
1799
1815
1831
1847
1863
1879
1895
1911
1800
1816
1832
1848
1864
1880
1896
1912
1801
1817
1833
1849
1865
1881
1897
1913
1802
1818
1834
1850
1866
1882
1898
1914
1803
1819
1835
1851
1867
1883
1899
1915
1804
1820
1836
1852
1868
1884
1900
1916
1805
1821
1837
1853
1869
1885
1901
1917
1806
1822
1838
1854
1870
1886
1902
1918
1807
1823
1839
1855
1871
1887
1903
1919
780
790
7A0
7B0
7C0
7D0
7E0
7F0
1920
1936
1952
1968
1984
2000
2016
2032
1921
1937
1953
1969
1985
2001
2017
2033
1922
1938
1954
1970
1986
2002
2018
2034
1923
1939
1955
1971
1987
2003
2019
2035
1924
1940
1956
1972
1988
2004
2020
2036
1925
1941
1957
1973
I989
2005
2021
2037
1926
1942
1958
1974
1990
2006
2022
2038
1927
1943
1959
1975
1991
2007
2023
2039
1928
1944
1960
1976
1992
2008
2024
2040
1929
1945
1961
1977
1993
2009
2025
2041
1930
1946
1962
1978
1994
2010
2026
2042
1931
1947
1963
1979
1995
2011
2027
2043
1932
1948
1964
1980
1996
2012
2028
2044
1933
1949
1965
1981
1997
2013
2029
2045
1934
1950
1966
1982
1998
2014
2030
2046
1935
1951
1967
1983
1999
2015
2031
2047
800
810
820
830
2048
2064
2080
2096
2049
2065
2081
2097
2050
2066
2082
2098
2051
2067
2083
2099
2052
2068
2084
2100
2053
2069
2085
2101
2054
2070
2086
2102
2055
2071
2087
2103
2056
2072
2088
2104
2057
2073
2089
2105
2058
2074
2090
2106
2059
2075
2091
2107
2060
2076
2092
2108
2061
2077
2093
2109
2062
2078
2094
2110
2063
2079
2095
2111
840 ,
850
860
870
880
890
8A0
8B0
8C0
8D0
8E0
8F0
2112
2128
2144
2160
2176
2192
2208
2224
2240
2256
2272
2288
2113
2129
2145
2161
2177
2193
2209
2225
2241
2257
2273
2289
2114
2130
2146
2162
2178
2194
2210
2226
2242
2258
2274
2290
2115
2131
2147
2163
2179
2195
2211
2227
2243
2259
2275
2291
2116
2132
2148
2164
2180
2196
2212
2228
2244
2260
2276
2292
2117
2133
2149
2165
2181
2197
2213
2229
2245
2261
2277
2293
2118
2134
2150
2166
2182
2198
2214
2230
2246
2262
2278
2294
2119
2135
2151
2167
2183
2199
2215
2231
2247
2263
2279
2295
2120
2136
2152
2168
2184
2200
2216
2232
2248
2264
2280
2296
2121
2137
2153
2169
2185
2201
2217
2233
2249
2265
2281
2297
2122
2138
2154
2170
2186
2202
2218
2234
2250
2266
2282
2298
2123
2139
2155
2171
2187
2203
2219
2235
2251
2267
2283
2299
2124
2140.
2156
2172
2188
2204
2220
2236
2252
2268
2284
2300
2125
2141
2157
2173
2189
2205
2221
2237
2253
2269
2285
2301
2126
2142
2158
2174
2190
2206
2222
2238
2254
2270
2286
2302
2127
2143
2159
2175
2191
2207
2223
2239
2255
2271
2287
2303
900
910
920
930
2304
2320
2336
2352
2305
2321
2337
2353
2306
2322
2338
2354
2307
2323
2339
2355
2308
2324
2340
2356
2309
2325
2341
2357
2310
2326
2342
2358
2311
2327
2343
2359
2312
2328
2344
2360
2313
2329
2345
2361
2314
2330
2346
2362
2315
233I
2347
2363
2316
2332
2348
2364
2317
2333
2349
2365
2318
2334
2350
2366
2319
2335
2351
2367
940
950
960
970
2368
2384
2400
2416
2369
2385
2401
2417
2370
2386
2402
2418
2371
2387
2403
2419
2372
2388
2404
2420
2373
2389
2405
2421
2374
2390
2406
2422
2375
2391
2407
2423
2376
2392
2408
2424
2377
2393
2409
2425
2378
2394
2410
2426
2379
2395
2411
2427
2380
2396
2412
2428
2381
2397
2413
2429
2382
2398
2414
2430
2383
2399
2415
2431
980
990
9A0
9B0
2432
2448
2464
2480
2433
2449
2465
2481
2434
2450
2466
2482
2435
2451
2467
2483
2436
2452
2468
2484
2437
2453
2469
2485
2438
2454
2470
2486
2439
2455
2471
2487
2440
2456
2472
2488
2441
2457
2473
2489
2442
2458
2474
2490
2443
2459
2475
2491
2444
2460
2476
2492
2445
2461
2477
2493
2446
2462
2478
2494
2447
2463
2479
2495
9C0
9D0
9E0
9F0
2496
2512
2528
2544
2497
2513
2529
2545
2498
2514
2530
2546
2499
2515
2531
2547
2500
2516
2532
2548
2501
2517
2533
2549
2502
2518
2534
2550
2503
2519
2535
2551
2504
2520
2536
2552
2505
2521
2537
2553
2506
2522
2538
2554
2507
2523
2539
2555
2508
2524
2540
2556
2509
2525
2541
2557
2510
2526
2542
2558
2511
2527
2543
2559
138
A00
A10
A20
A30
2560
2576
2592
2608
2561
2577
2593
2609
2562
2578
2594
2610
2563
2579
2595
2611
2564
2580
2596
2612
2565
2581
2597
2613
2566
2582
2598
2614
2567
2583
2599
2615
2568
2584
2600
2616
2569
2585
2601
2617
2570
2586
2602
2618
2571
2587
2603
2619
2572
2588
2604
2620
2573
2589
2605
2621
2574
2590
2606
2622
2575
2591
2607
2623
A40
A50
A60
A70
2624
2640
2656
2672
2625
2641
2657
2673
2626
2642
2658
2674
2627
2643
2659
2675
2628
2644
2660
2676
2629
2645
2661
2677
2630
2646
2662
2678
2631
2647
2663
2679
2632
2648
2664
2680
2633
2649
2665
2681
2634
2650
2666
2682
2635
2651
2667
2683
2636
2652
2668
2684
2637
2653
2669
2685
2638
2654
2670
2686
2639
2655
2671
2687
A80
A90
AA0
AB0
AC0
ADO
AE0
AF0
2688
2704
2720
2736
2752
2768
2784
2800
2689
2705
2721
2737
2753
2769
2785
2801
2690
2706
2722
2738
2754
2770
2786
2802
2691
2707
2723
2739
2755
2771
2787
2803
2692
2708
2724
2740
2756
2772
2788
2804
2693
2709
2725
2741
2757
2773
2789
2805
2694
2710
2726
2742
2758
2774
2790
2806
2695
2711
2727
2743
2759
2775
2791
2807
2696
2712
2728
2744
2760
2776
2792
2808
2697
2713
2729
2745
2761
2777
2793
2809
2698
2714
2730
2746
2762
2778
2794
2810
2699
2715
2731
2747
2763
2779
2795
2811
2700
2716
2732
2748
2764
2780
2796
2812
2701
2717
2733
2749
2765
2781
2797
2813
2702
2718
2734
2750
2766
2782
2798
2814
2703
2719
2735
2751
2767
2783
2799
2815
BOO
B10
B20
B30
B40
B50
B60
B70
2816
2832
2848
2864
2880
2896
2912
2928
2817
2833
2849
2865
2881
2897
2913
2929
2818
2834
2850
2866
2882
2898
2914
2930
2819
2835
2851
2867
2883
2899
2915
2931
2820
2836
2852
2868
2884
2900
2916
2932
2821
2837
2853
2869
2885
2901
2917
2933
2822
2838
2854
2870
2886
2902
2918
2934
2823
2839
2855
2871
2887
2903
2919
2935
2824
2840
2856
2872
2888
2904
2920
2936
2825
2841
2857
2873
2889
2905
2921
2937
2826
2842
2858
2874
2890
2906
2922
2938
2827
2843
2859
2875
2891
2907
2923
2939
2828
2844
2860
2876
2892
2908
2924
2940
2829
2845
2861
2877
2893
2909
2925
2941
2830
2846
2862
2878
2894
2910
2926
2942
2831
2847
2863
2879
2895
2911
2927
2943
B80
B90
BA0
BB0
BC0
BD0
BE0
BF0
2944
2960
2976
2992
3008
3024
3040
3056
2945
2961
2977
2993
3009
3025
3041
3057
2946
2962
2978
2994
3010
3026
3042
3058
2947
2963
2979
2995
3011
3027
3043
3059
2948
2964
2980
2996
3012
3028
3044
3060
2949
2965
2981
2997
3013
3029
3045
3061
2950
2966
2982
2998
3014
3030
3046
3062
2951
2967
2983
2999
3015
3031
3047
3063
2952
2968
2984
3000
3016
3032
3048
3064
2953
2969
2985
3001
3017
3033
3049
3065
2954
2970
2986
3002
3018
3034
3050
3066
2955
2971
2987
3003
3019
3035
3051
3067
2956
2972
2988
3004
3020
3036
3052
3068
2957
2973
2989
3005
3021
3037
3053
3069
2958
2974
2990
3006
3022
3038
3054
3070
2959
2975
2991
3007
3023
3039
3055
3071
. , ,
COO
C10
C20
C30
C40
C50
C60
C70
C80
C90
CA0
CB0
CC0
CD0
CE0
CF0
3072
3088
3104
3120
3136
3152
3168
3184
3200
3216
3232
3248
3264
3280
3296
3312
3073
3089
3105
3121
3137
3153
3169
3185
3201
3217
3233
3249
3265
3281
3297
3313
3074
3090
3106
3122
3138
3154
3170
3186
3202
3218
3234
3250
3266
3282
3298
3314
3075
3091
3107
3123
3139
3155
3171
3187
3203
3219
3235
3251
3267
3283
3299
3315
3076
3092
3108
3124
3140
3156
3172
3188
3204
3220
3236
3252
3268
3284
3300
3316
3077
3093
3109
3125
3141
3157
3173
3189
3205
3221
3237
3253
3269
3285
3301
3317
3078
3094
3110
3126
3142
3158
3174
3190
3206
3222
3238
3254
3270
3286
3302
3318
3079
3095
3111
3127
3143
3159
3175
3191
3207
3223
3239
3255
3271
3287
3303
3319
3080
3096
3112
3128
3144
3160
3176
3192
3208
3224
3240
3256
3272
3288
3304
3320
3081
3097
3113
3129
3145
3161
3177
3193
3209
3225
3241
3257
3273
3289
3305
3321
3082
3098
3114
3130
3146
3162
3178
3194
3210
3226
3242
3258
3274
3290
3306
3322
3083
3099
3115
3131
3147
3163
3179
3195
3211
3227
3243
3259
3275
3291
3307
3323
3084
3100
3116
3132
3148
3164
3180
3196
3212
3228
3244
3260
3276
3292
3308
3324
3085
3101
3117
3133
3149
3165
3181
3197
3213
3229
3245
3261
3277
3293
3309
3325
3086
3102
3118
3134
3150
3166
3182
3198
3214
3230
3246
3262
3278
3294
3310
3326
3087
3103
3119
3135
3151
3167
3183
3199
3215
3231
3247
3263
3279
3295
3311
3327
D00
D10
D20
D30
D40
D50
D60
D70
D80
D90
DA0
DB0
DC0
DD0
DE0
DF0
3328
3344
3360
3376
3392
3408
3424
3440
3456
3472
3488
3504
3520
3536
3552
3568
3329
3345
3361
3377
3393
3409
3425
3441
3457
3473
3489
3505
3521
3537
3553
3569
3330
3346
3362
3378
3394
3410
3426
3442
3458
3474
3490
3506
3522
3538
3554
3570
3331
3347
3363
3379
3395
3411
3427
3443
3459
3475
3491
3507
3523
3539
3555
3571
3332
3348
3364
3380
3396
3412
3428
3444
3460
3476
3492
3508
3524
3540
3556
3572
3333
3349
3365
3381
3397
3413
3429
3445
3461
3477
3493
3509
3525
3541
3557
3573
3334
3350
3366
3382
3398
3414
3430
3446
3462
3478
3494
3510
3526
3542
3558
3574
3335
3351
3367
3383
3399
3415
3431
3447
3463
3479
3495
3511
3527
3543
3559
3575
3336
3352
3368
3384
3400
3416
3432
3448
3464
3480
3496
3512
3528
3544
3560
3576
3337
3353
3369
3385
3401
3417
3433
3449
3465
3481
3497
3513
3529
3545
3561
3577
3338
3354
3370
3386
3402
3418
3434
3450
3466
3482
3498
3514
3530
3546
3562
3578
3339
3355
3371
3387
3403
3419
3435
3451
3467
3483
3499
3515
3531
3547
3563
3579
3340
3356
3372
3388
3404
3420
3436
3452
3468
3484
3500
3516
3532
3548
3564
3580
3341
3357
3373
3389
3405
3421
3437
3453
3469
3485
3501
3517
3533
3549
3565
3581
3342
3358
3374
3390
3406
3422
3438
3454
3470
3486
3502
3518
3534
3550
3566
3582
3343
3359
3375
3391
3407
3423
3439
3455
3471
3487
3503
3519
3535
3551
3567
3583
Appendix E
139
E00
El0
E20
E30
E40
E50
E60
E70
E80
E90
EA0
EB0
EC0
ED0
EE0
EF0
3584
3600
3616
3632
3648
3664
3680
3696
3712
3728
3744
3760
3776
3792
3808
3824
3585
3601
3617
3633
3649
3665
3681
3697
3713
3729
3745
3761
3777
3793
3809
3825
3586
3602
3618
3634
3650
3666
3682
3698
3714
3730
3746
3762
3778
3794
3810
3826
3587
3603
3619
3635
3651
3667
3683
3699
3715
3731
3747
3763
3779
3795
3811
3827
3583
3604
3620
3636
3652
3668
3684
3700
3716
3732
3748
3764
3780
3796
3812
3828
3589
3605
3621
3637
3653
3669
3685
3701
3717
3733
3749
3765
3781
3797
3813
3829
3590
3606
3622
3638
3654
3670
3686
3702
3718
3734
3750
3766
3782
3798
3814
3830
3591
3607
3623
3639
3655
3671
3687
3703
3719
3735
3751
3767
3783
3799
3815
3831
3592
3608
3624
3640
3656
3672
3688
3704
3720
3736
3752
3768
3784
3800
3816
3832
3593
3609
3625
3641
3657
3673
3689
3705
3721
3737
3753
3769
3785
3801
3817
3833
3594
3610
3626
3642
3658
3674
3690
3706
3722
3738
3754
3770
3786
3802
3818
3834
3595
3611
3627
3643
3659
3675
3691
3707
3723
3739
3755
3771
3787
3803
3819
3835
3596
3612
3628
3644
3660
3676
3692
3708
3724
3740
3756
3772
3788
3804
3820
3836
3597
3613
3629
3645
3661
3677
3693
3709
3725
3741
3757
3773
3789
3805
3821
3837
3598
3614
3630
3646
3662
3678
3694
3710
3726
3742
3758
3774
3790
3806
3822
3838
3599
3615
3631
3647
3663
3679
3695
3711
3727
3743
3759
3775
3791
3807
3823
3839
F00
F10
F20
F30
F40
F50
F60
F70
F80
F90
FA0
FB0
FC0
FD0
FE0
FF0
3840
3856
3872
3888
3904
3920
3936
3952
3968
3984
4000
4016
4032
4048
4064
4080
3841
3857
3873
3889
3905
3921
3937
3953
3969
3985
4001
4017
4033
4049
4065
4081
3842
3858
3874
3890
3906
3922
3938
3954
3970
3986
4002
4018
4034
4050
4066
4082
3843
3859
3875
3891
3907
3923
3939
3955
3971
3987
4003
4019
4035
4051
4067
4083
3844
3860
3876
3892
3908
3924
3940
3956
3972
3988
4004
4020
4036
4052
4068
4084
3845
3861
3877
3893
3909
3925
3941
3957
3973
3989
4005
4021
4037
4053
4069
4085
3846
3862
3878
3894
3910
3926
3942
3958
3974
3990
4006
4022
4038
4054
4070
4086
3847
3863
3879
3895
3911
3927
3943
3959
3975
3991
4007
4023
4039
4055
4071
4087
3848
3864
3880
3896
3912
3928
3944
3960
3976
3992
4008
4024
4040
4056
4072
4088
3849
3865
3881
3897
3913
3929
3945
3961
3977
3993
4009
4025
4041
4057
4073
4089
3850
3866
3882
3898
3914
3930
3946
3962
3978
3994
4010
4026
4042
4058
4074
4090
3851
3867
3883
3899
3915
3931
3947
3963
3979
3995
4011
4027
4043
4059
4075
4091
3852
3868
3884
3900
3916
3932
3948
3964
3980
3996
4012
4028
4044
4060
4076
4092
3853
3869
3885
3901
3917
3933
3949
3965
3981
3997
4013
4029
4045
4061
4077
4093
3854
3870
3886
3902
3918
3934
3950
3966
3982
3998
4014
4030
4046
4062
4078
4094
3855
3871
3887
3903
3919
3935
3951
3967
3983
3999
4015
4031
4047
4063
4079
4095
140
POSITIONS
EBCDIC
01234567
Ascii-8
76X54321
=01
~-83
10
00
45B71
I I
1 ,
oo
11
00
0000
NULL
..15
blank
_
'
01
10
&
IO
00
1I
01
I I
10
11
II
00
01
10
>
<
oool
/
/
0010
0011
PN
RS
0100
PF
RES
BYP
0101
HT
NL
LF
0110
LC
BS
EOB
UC
011'1
DEL
IDL
PRE
EOT
1000
1ooi
1010
1011
1100
1101
1110
,
--
1111
,.,
Bit Positions
~ 76
oo
I'
L~,.43211
oo
01
1
10
11
01
10
I !
o0
Ol
'~
blank
I
,.,
10
11
00,,
Ol
11
00
IO
II
0000
NULL
DC0
0001
SOM
DC
OOLO
EOA
I
DC2
0011
EOM
DC 3
0100
EOT
DC4
STOP
0101
WRU
ERR
0110
RU
SYNC
&
v
w
,,
0111
BELL
LEM
1000
BKSP
S()
1001
HT
S1
"i010
LF
S2
" i-011
VT
S3
1100
P
q
FF
S4
CR
S5
'
m
1110
SO
$6
ESC
1111
Sl
S7
DEL i
i'lO1
>
Appendix F
141
Data Formats
Hexadecimal Representation
Fixed-Point Numbers
HEXADECIMAL
CODE
PRINTED.
GRAPHIC
EBCDIC*
CODE
0000
0001
0010
0011
0100
0101
0110
0111
0
1
2
3
4
5
6
7
1111 0000
1111 0001
1111 0010
1111 001i
1111 0100
1111 0101
1111 0110
1111 0111
0101 0000
0101 0001
0101 0010
0101 0011
0101 0100
0101 0101
0101 0110
0101 0111
1000
1111 i000
0101 I000
Is!
0
Integer
Is1
0
,nteger
15
Floating-Point Numbers
Short Floating-Point Number
lsi ~ar~r~'~ I
0
Fraction
78
I~1 ~hara~r~ !
0
78
Decimal Numbers
Packed Decimal Number
! Zonel......
J Digit
Logical Information
Fixed-Length Logical Information
"
Logical Data
l Character
142
Character
1~-_~
16
~.~!
Character
ASCII-St
CODE
1001
9
1111 1001
0101 1001
1010
A
1100 0001
1010 0001
1011
B
1100 0010
1010 0010
1100
C
1100 0011
1010 0011
1101
D
1100 0100
1010 0100
1110
E
1100 0101
1010 0101
1111
F
1100 0110
1010 0110
*Extended Binary-Coded-Dec/rnal Interchange Code.
t a n eight-bit representation for American Standard Code for
Information Interchange for use in eight-bit environments.
RS Format
RR Format
I PCdel R1 i R3 I B2 I
0
7 8
11 12
15
Fixed Point
Floating Point
Load
Load and Test
Load Complement
Load Positive
Load Negative
Add
Add Logical
Subtract
Subtract Logical
Compare
Multiply
Divide
Load S/L
Load and Test S/L
Load Complement S/L
Load Positive S/L
Load Negative S/L
Add Normalized S/L
Add Unnorrnalized S/L
Subtract Normalized S/L
Subtract Unnormalized S/L
Compare S/L
Halve S/L
Multiply S/L
Divide S/L
Logical
Status Switching
Compare
AND
OR
Exclusive OR
Z
Z
11 12
15 16
1920
Fixed Point
Logical
Load Multiple
Store Multiple
Shift Left Single
Shift Right Single
Shift Left Double
Shift Right Double
2
2
E,2
E,2
2
2
E,2
E,2
Branching
Branch on High
Branch on Low-Eq
SI Format
l
Op Code
I B1 I
15 16
78
19 20
i
31
Input~Output
Status Switching
Start I/O
Test I/O
Halt I/O
Test Channel
Load PSW
Set System Mask
Write Direct
Read Direct
Diagnose
Logical
Branching
Move
Compare
AND
OR
Exclusive OR
Test Under Mask
Branch on Condition
Branch and Link
Branch on Count
SS Format
RX Format
Op Code
7 8
D2
1 R11 x~ I B~ i
7 8
11 12
15 16
D2
1920
Fixed Point
Floating Point
Load H/F
Add H/F
Add Logical
Subtract H/F
Subtract Logical
Compare H/F
Multiply H
Multiply F
Divide F
Convert to Binary
Convert to Decimal
Store H/F
Load S/L
Add Normalized S/L
Add Unnormalized S/L
Subtract Normalized S/L
Subtract Unnormalized S/L
Compare S/L
Multiply S/L
Store S/L
Divide S/L
Logical
Branching
Compare
Load Address
Insert Character
Store Character
AND
OR
Exclusive OR
Branch on Condition
Branch and Link
Branch on Count
Execute
I ~d
0
7 8
11 12
1.5 16
i 9 20
31 32
35 36
Decimal
Logical
Pack
Unpack
Move With Offset
Zero and Add
Add
Subtract
Compare
Multiply
Divide
Move
Move Numeric
Move Zone
Compare
AND
OR
Exclusive OR
Translate
Translate and Test
Edit
Edit and Mark
T
T
T
T
T
T
47
5
5
5
5
5
5
5
5
5
T,5
T,5
FORMAT NOTES
E
R1 must be even
F
Fullword
H
Halfword
L
Long
S
Short
T
Decimal feature
Y
Direct control feature
Z
Protection feature
1
R1 used as mask M1
2
R.~ or R3 ignored
3
R~ and R_~used as immediate information
4
I.~ ignored
5
L1 and L~ used as eight-bit L field
All floating-point instructions are part of the floating-point feature.
Appendix G
143
Write
Read
Read Backward
Control
Sense
Transfer in Channel
NAMES
78
0-7 Ignored
8-31 Base address or index
FLAGS
CC
SLI
System Mask
J AMWP[
11 12
l, cl cl rograosk
1
31.
15 16
3940
13
System mask
Multiplexor channel
mask
1
Selector channel 1
mask
2
Selector channel 2
mask
3
Selector channel 3
mask
4
Selector channel 4
mask
5
Selector channel 5
mask
6
Selector channel 6
mask
7
External mask
8-11 Protection key
12
ASCII mode (A)
(M)
14
15
16-31
32-33
Wait state ( W )
Problem state ( P )
Interruption code
Instruction length
code (ILC)
34-35 Condition code (CC)
36-39 Program mask
36 Fixed-point overflow
mask
37 Decimal overflow
mask
38 Exponent underflow
mask
39 Significance mask
40-63 Instruction address
Data Address
78
i
32
0-7
8-31
32-36
32
33
34
144
lo0.o
3j6 37
MM!~,{M
MMMM
MMMM
MMMM
MMMI~
MMO I
MM 10
1 lO0
MMI 1
0 1 O0
xxxx
lOOO
Skip
-- Programcontrolled
interrupt
SKIP
PCI
Interruption Code
Instruction Address
0-7
0
Command
Code
CODE
SLI
PCI
SLI SKIP PCI
SLI SKIP PCI
SLI
PCI
SLI SKIP PCI
7 8
32 3334 s536
CC
CC
CC
CC
CC
-- Chain data
-- Chain command
-- Suppress length
indication
CD
CD
CD
CD
CD
CD
319 40
Command code
Data address
Command flags
Chain data flag
Chain command flag
Suppress length
indication flag
Count
47 48
35
36
Skip flag
Program-controlled
interruption flag
37-39 Zero
40-47 Ignored
48-63 Count
I'Ke, j'0000 !
0
34
Command Address
78
0-3
Protection key
4-7 . Zero
8-31 Command address
pe ! 00 0 01
0
34
Command Address
Status
,. Count
47 48
0-3
4-7
8-31
32-47
32
33
34
35
36
37
38
39
Protection key
Zero
Command address
Status
Attention
Status modifier
Control unit end
Busy
Channel end
Device end
Unit check
Unit exception
_i
31
78
J
63
40 Program-controlled
interruption
41 Incorrect length
42 Program check
43 Protection check
44 Channel data check
45 Channel control check
46 Interface control
check
47 Chaining check
48-63 Count
Operation Codes
RR Format
CLASS
FIXED-POINT
BRANCHING AND
FULLWORD
STATUS SWITCHING
AND LOGICAL
LONG
SHORT
0000xxxx
000 lxxxx
0010xxxx
001 lxxxx
Load Positive
Load Negative
Load and Test
Load Complement
AND
Compare Logical
OR
Exclusive OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract Logical
Load Positive
Load Negative
Load and Test
Load Complement
Halve
Load Positive
Load Negative
Load and Test
I_,oad Complement
Halve
Load
Compare
Add N
Subtract N
Multiply
Divide
Add U
Subtract U
Load
Compare
Add N
Subtract N
Multiply
Divide
Add U
Subtract U
x x xx
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
FLOATING-POINT
FLOATING-POINT
RX Format
CLASS
FIXED-POINT
HALFWORD
xxxx
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
FIXED-POINT
FLOATING-POINT
FLOATING-POINT
AND BRANCHING
AND LOGICAL
LONG
SHORT
0100xxxx
0101 xxxx
0110xxxx
0111 xxxx
Store
Load Ad dress
Store Character
Insert Character
Execute
Branch and Link
Branch on Count
Branch/Condition
Load
Compare
Add
Subtract
Multiply
Convert-Decimal
Convert-Binary
FULLWORD
Store
Store
Store
AND
Compare Logical
OR
Exclusive OR
Load
Compare
Add
Subtract
Multiply
Divide
Add Logical
Subtract Logical
Load
Compare
Add N
Subtract N
Multiply
Divide
Add U
Subtract U
Load
Compare
.Add N
:Subtract N
Multiply
Divide
.Add U
Subtract U
Appendix G
14.5
RS, SI Format
CLASS
BRANCHING
FIXED-POINT
STATUS S W I T C H I N G
LOGICAL AND
AND SHIFTING
INPUT/OUTPUT
xxxx
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
1000xxxx
1001xxxx
1010xxxx
1011xxxx
Store Multiple
Test Under Mask
Move
Load PSW
Diagnose
Write Direct
Read Direct
Branch/High
Branch/Low-Equal
Shift Right SL
Shift Left SL
Shift Right S
Shift Left S
Shift Right DL
Shift Left DL
Shift Right D
Shift Left D
AND
Compare Logical
OR
Exclusive OR
Load Multiple
Start I / O
Test I / O
Halt I / O
Test Channel
SS Format
CLASS
LOGICAL
xxxx
1100xxxx
1101xxxx
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
OPERATION CODE NOTES
N
-- Normalized
SL
-- Single logical
DL
-- Double logical
146
Move Numeric
Move
Move Zone
AND
Compare Logical
OR
Exclusive OR
Translate
Translate and Test
Edit
Edit and Mark
U
S
D
-- Unnormalized
-- Single
-- Double
DECIMAL
1110xxxx
111 lxxxx
Move With Offset
Pack
Unpack
0 0000 0000
8 0000 1000
16 0001 0000
24 0001 1000
32 0010 0000
40 0010 1000
48 0011 0000
56 0011 1000
64 0100 0000
72 0100 1000
76 0 1 0 0 1 1 0 0
80 0101 0000
84 0101 0100
88 0101 1000
96 0110 0000
104 0110 1000
112 0111 0000
120 0111 1000
128 1000 0000
* The size of the
ticular model and
LENGTH
PURPOSE
double-word
double-word
double-word
double-word
double-word
double-word
double-word
double-word
double-word
word
word
word
word
double-word
double-word
double-word
double-word
double-word
zero
zero
zero
< zero
zero
--
> zero
. . .
> zero
--
zero
< zero
> zero
overflow
zero
< zero
> zero
overflow
.
--
Logical Operations
AND
C o m p a r e Logical
Edit
Edit and Mark
Exclusive OR
OR
Test U n d e r Mask
Translate and Test
zero
equal
zero
zero
zero
zero
zero
zero
not zero
. . . .
low
high
-< zero
> zero
-< zero
> zero
-not zero
. . . .
not zero
. . . .
mixed
-one
incomplete complete
--
Input/Output Operations
Halt I / O
halted
not
working
stopped
not oper
Start I / O
available C S W
stored
busy
not oper
Test Channel
not
CSW
working ready
working
not oper
Fixed-Point Arithmetic
Test I / O
available C S W
stored
working
not oper
Add H/F
Add Logical
Compare H/F
Load and Test
Load Complement
L o a d Negative
L o a d Positive
Shift Left Double
Shift Left Single
Shift Right Double
Shift Right Single
Subtract H / F
Subtract Logical
0
1
zero
< zero
zero,
not zero,
no carry no carry
equal
low
zero
< zero
zero
< zero
zero
< zero
zero
-zero
< zero
zero
< zero
zero
< zero
zero
< zero
zero
< zero
-not zero,
no carry
2
> zero
zero,
carry
high
> zero
> zero
. . .
> zero
> zero
> zero
> zero
> zero
> zero
zero,
carry
3
overflow
not zero,
carry
--overflow
.
overflow
overflow
overflow
--overflow
not zero,
carry
zero
equal
zero
zero
< zero
low
< zero
< zero
> zero
high
> zero
> zero
overflow
-overflow
overflow
< zero
< zero
low
< zero
> zero
> zero
high
> zero
overflow
overflow
---
Decimal Arithmetic
A d d Decimal
C o m p a r e Decimal
Subtract Decimal
Zero a n d A d d
Floating-Point Arithmetic
A d d Normalized S / L
A d d Unnormalized S / L
Compare S/L
Load and Test S / L
zero
zero
equal
zero
available
Unit and channel available
busy
Unit or chanel busy
carry
A carry out of the sign position occurred
complete
Last result byte nonzero
C S W ready
Channel status word ready for test or interruption
C S W stored
Channel status word stored
equal
Operands compare equal
F
Fullword
> zero
Result is greater than zero
H
Halfword
halted
D a t a transmission stopped. Unit in halt-reset mode
high
First operand compares high
incomplete
Nonzero result byte; not last
L
Long precision
< zero
Result is less than zero
low
First o p e r a n d compares low
mixed
Selected bits are both zero and one
not oper
Unit or channel not operational
not working
Unit or channel not working
not zero
Result is not all zero
one
Selected bits are one
overflow
Result overflows
S
Short precision
stopped
Data transmission stopped
working
Unit or channel working
zero
Result or selected bits are zero
The condition code also m a y be c h an g e d b y L O A D PSW, SET
SYSTEM MASK, D I A G N O S E , and by an interruption.
Appendix G
147
interruption Action
SOURCE
Program Interruptions
I N T E R R U P T I O N CODE
mENTIFICATION
Input/Output
P S W BITS
16-31
ILC
EXE-
BITS
SET
CUTION
Program
MASK
0
1
2
3
4
5
6
complete
complete
complete
complete
complete
complete
complete
Operation
00000000 00000001
Privileged operation 00000000 00000010
Execute
00000000 00000011
Protection
00000000 00000100
Addressing
00000000 00000101
Specification
Data
Fixed-point overflow
Fixed-point divide
00000000
00000000
00000000
00000000
00000110
00000111
00001000
00001001
Decimal overflow
Decimal divide
Exponent overflow
Exponent underflow
Significance
Floating-point divide
00000000
00000000
00000000
00000000
00000000
00000000
00001010
00001011
00001100
00001101
00001110
00001111
Supervisor Call
Instruction bits
External
x
x
x
x
x
x
x
36
37
38
39
1,2,3 suppress
1,2
suppress
2
suppress
0,2,3 suppress/
terminate
0,1,2,3 suppress/
terminate
1,2,3 suppress
2,3 terminate
1,2 complete
1,2 suppress/
complete
3
complete
3
suppress
1,2 terminate
1,2 complete
1,2 complete
1,2
suppress
complete
External signal I
External signal 2
External signal 3
External signal 4
External signal 5
External signal 6
Interrupt key
Timer
00000000
00000000
00000000
00000000
00000000
00000000
00000000
00000000
xxxxxxxl
xxxxxxlx
xxxxxlxx
xxxxlxxx
xxxlxxxx
xxlxxxxx
xlxxxxxx
lxxxxxxx
7
7
7
7
7
7
7
7
x
x
x
x
x
x
x
x
complete
complete
complete
complete
complete
complete
complete
complete
13
terminate
NOTES
a
r
X
A
C
D
DF
DK
E
EX
F
FK
IF
IK
L
LS
M
N
P
S
T
U
Y
Z
Operation (OP)
The operation code is not assigned or the assigned
operation is not available on the particular cpv.
The operation is suppressed.
The instruction-length code is 1, 2, or 3.
Diagnose
Halt I/O
Insert Storage Key
Load PSW
Read Direct
Set Storage Key
Set System Mask
Start I/O
Test Channel
Test I/O
Write Direct
MNEMONIC
HIO
ISK
LPSW
RDD
SSK
SSM
SIO
TCH
TIO
WRD
TYPE
SI
SI C
RR Z
SI L
SI Y
RR Z
SI
C
SI
C
SI
C
SI
C
SI Y
EXCEPTIONS
M, A,S
M
M, A,S
M, A,S
M,P,A
M, A,S
M, A
M
M
M
M, A
CODE
83
9E
09
82
85
08
80
9C
9F
9D
84
Execute (EX)
The subject instruction of EXECUTEis another EXECUTE.
The operation is suppressed.
T h e i n s t r u c t i o n - l e n g t h c o d e is 2.
INSTRUCCODE
0
1
2
2
3
148
NAME
P_SW BITS
TION
INSTRUCTION
32-33
BITS 0 - 1
LENGTH
FORMAT
Not available
One halfword
Two halfwords
Two halfwords
Three halfwords
RR
RX
RS or SI
SS
00
01
10
10
11
00
01
10
11
Execute
MNEMONIC
EX
TYPE
RX
EXCEPTIONS
A,S,
EX
CODE
44
Protection (P)
T h e s t o r a g e k e y of a r e s u l t l o c a t i o n d o e s n o t m a t c h
t h e p r o t e c t i o n k e y in t h e Psw.
Add Decimal
AND
AND
Convert to
Decimal
Divide Decimal
Edit
Edit and Mark
Exclusive OR
Exclusive OR
Move
Move
Move Numerics
Move with
Offset
Move Zones
Multiply
Decimal
OR
OR
Pack
Read Direct
Store
Store Character
Store Halfword
Store Long
Store
Multiple
Store Short
Subtract
Decimal
Translate
Unpack
Zero and Add
MNEMONIC
TYPE
EXCEPTIONS
CODE
NOTE
AP
NI
NC
SS T,C P,A, D, D F
SI
C P,A
SS C P,A
FA
94
D4
TRM
SPR
TRM
CVD
DP
ED
EDMK
XI
XC
MVI
MVC
MVN
RX
P,A,S
4E
SS T
P,A,S,D, DK FD
SS T,C P,A, D
DE
SS T,C P,A, D
DF
SI
C P,A
97
SS C P,A
D7
SI
P,A
92
SS
P,A
D2
SS
P,A
D1
SPR
TRM
TRM
TRM
SPR
TRM
SPR
TRM
TRM
MVO
MVZ
SS
SS
F1
D3
TRM
TRM
MP
OI
OC
PACK
RDD
ST
STC
STH
STD
SS T
P,A,S,D
SI
C P,A
SS C P,A
SS
P,A
SI Y M,P,A
RX
P,A,S
RX
P,A
RX
P,A,S
RX F
P,A,S
FC
96
D6
F2
85
50
42
40
60
TRM
SPR
TRM
TRM
TRM
SPR
SPR
SPR
SPR
STM
STE
RX F
RX F
P,A,S
P,A,S
90
70
TRM
SPR
P,A, D, DF
P,A
P,A
P,A, D, DF
FB
DC
F3
F8
TRM
TRM
TRM
TRM
SP
SS T,C
TR
SS
UNPK SS
ZAP
SS T,C
P,A
P,A
PROTECTION INTERRUPTIONNOTES
SPR _-- Operation suppressed
TRM = Operation terminated
Addressing (A)
An address specifies a n y p a r t of data, instructions, or
control w o r d s outside the available storage for the particular installation.
T h e o p e r a t i o n is t e r m i n a t e d . D a t a in storage r e m a i n
u n c h a n g e d , except w h e n d e s i g n a t e d b y valid addresses.
T h e i n s t r u c t i o n - l e n g t h code is n o r m a l l y 1, 2, or 3;
h o w e v e r , it m a y be 0 in t h e case of a d a t a address.
NAME
MNEMONIC
A
Add
AP
Add Decimal
AH
Add Halfword
AL
Add Logical
Add Normalized
N AD
(Long)
Add Normalized
N AE
( Short )
Add UnnormAW
alized ( Long )
Add UnnormAU
alized (Short)
N
AND
TYPE
RX C
SS T,C
RX C
RX C
EXCEPTIONS
A,S,
P,A D,
A,S,
A,S,
CODE N O T E
IF 5A TRM
DF FA TRM
IF 4A TRM
5E TRM
RX F,C
A,S,U,E,LS 6A TRM
RX F,C
A,S,U,E,LS 7A TRM
RX F,C
RX F,C
RX C
NAME
MNEMONIC
AND
NI
AND
NC
Compare
C
Compare
Decimal
CP
Compare
Halfword
CH
Compare
Logical
CL
Compare
Logical
CLI
Compare
CLC
Logical
Compare ( Long ) CD
CE
Compare (Short)
Convert to
CVB
Binary
Convert to
Decimal
CVD
Diagnose
Divide
D
Divide Decimal
DP
Divide ( Long ) N DD
Divide (Short)
N DE
Edil:
ED
EDMK
Edit and Mark
X
Exclusive OR
XI
Exclusive OR
XC
Exclusive OR
EX
Execute
IC
Insert Character
Insert Storage
ISK
Key
L
Load
LIt
Load Halfword
LD
Load (Long)
LM
Load Multiple
LF'SW
Load PSW
LE
Load (Short)
MVI
Move
MVC
Move
MVN
Move Numerics
MVO
Move with Offset
MVZ
Move Zones
M
Multiply
Multiply
Decimal
MP
Multiply
Halfword
MH
Multiply (Long) N MiD
Multiply (Short) N ME
OR
O
OR
OI
OR
OC
PACK
Pack
RDD
Read Direct
SSK
Set Storage Key
SSM
Set System Mask
ST
Store
STC
Store Character
STH
Store Halfword
STD
Store ( Long )
STM
Store Multiple
STE
Store (Short)
S
Subtract
Subtract Decimal SP
Subtract
Halfword
SH
EXCEPTIONS
TYPE
SI
SS
RX
C
C
C
P,A,
P,A
A,S,
CODE N O T E
94 SPR
D4 TRM
59 TRM
SS T,C
A, D
F9 TRM
RX
A,S,
49 TRM
RX
A,S,
55 TRM
SI
95 TRM
SS C
RX F,C
RX F,C
A
A,S,
A,S,
D5 TRM
69 TRM
79 TRM
RX
A,S,D,
IK 4F TRM
RX
P,A,S,
4E
SI
M, A,S,
83
RX
A,S,
IK 5D
SS T
P,A,S,D, DK FD
RXF
A,S,U,E,FK 6D
RX F
A,S,U,E,FK7D
SS T,C P,A, D
DE
DF
SS T,C P,A, D
A,S,
57
RX C
97
SI
C P,A,
D7
SS C P,A,
A,S,
EX 44
RX
A
43
RX
SPR
SPR
TRM
TRM
TRM
TRM
TRM
TRM
TRM
SPR
TRM
SPR
TRM
RR Z M, A,S
A,S,
RX
A,S,
RX
A,S,
RX F
A,S,
RS
L M, A,S
SI
A,S,
RX F
P,A
SI
P,A
SS
P,A
SS
P,A
SS
P,A
SS
A,S
RX
09
58
48
68
98
82
78
92
D2
D1
F1
D3
5C
TRM
TRM
TRM
TRM
TRM
TRM
SPR
TRM
TRM
TRM
TRM
TRM
SS T
FC TRM
P,A,S,D
4C
A,S
RX
6C
A,S,U,E
RX F
7C
A,S,U,E
RX F
56
A,S,
RX C
96
SI
C P,A
D6
SS C P,A
F2
P,A
SS
85
SI Y M,P,A,
O8
RR Z M, A,S
M, A
80
SI
P,A,S
50
RX
P,A
42
RX
P,A,S
40
RX
P,A,S
60
RX F
P,A,S
90
RS
P,A,S
70
RX F
A,S,
IF 5B
RX C
SS T,C P,A, D, DF FB
RX
A,S,
TRM
TRM
TRM
TRM
SPR
TRM
TRM
TRM
TRM
SPR
SPR
SPR
SPR
TRM
SPR
TRM
TRM
IF 4B TRM
Appendix G
149
NAME
MNEMONIC
Subtract Logical
SL
Subtract Normalized (Long) N SD
Subtract Normalized (Short) N SE
Subtract Unnormalized
SW
( Long )
Subtract Unnormalized
SU
( Short )
Test Under Mask
TM
Translate
TR
Translate and
Test
TRT
Unpack
UNPK
Write Direct
WRD
Zero and Add
ZAP
TYPE
RX
EXCEPTIONS
A,S
CODE
NOTE
5F TRM
RX F,C
A,S,U,E,LS 6B TRM
RX F,C
A,S,U,E,LS 7B TRM
RX F,C
RX F,C
SI
C
SS
A
P,A
SI Y M, A
SS T,C P,A, D,
SS
SS
DD
F3
84
DF F8
TRM
TRM
TRM
TRM
Specification (S)
1. A data, instruction, or control-word address does
not specify an integral b o u n d a r y for the unit of information.
2. T h e R~ field of an instruction specifies an o d d
register address for a pair of g e n e r a l registers t h a t
contain a 64-bit o p e r a n d .
3. A floating-point register address other t h a n 0, 2,
4, or 6 is specified.
4. T h e m u l t i p l i e r or divisor in d e c i m a l a r i t h m e t i c
exceeds 15 digits and sign.
5. T h e first o p e r a n d field is shorter t h a n or e q u a l to
the second o p e r a n d field in d e c i m a l multiplication or
division.
6. T h e block address specified in SET STORAGE KEY
or INSEr~T STORAGE KEY h a s the four low-order bits not
all zero.
7. A PSW with nonzero p r o t e c t i o n key is l o a d e d
w h e n the p r o t e c t i o n f e a t u r e is not installed.
In all of these cases the o p e r a t i o n is suppressed.
T h e i n s t r u c t i o n - l e n g t h code is 1, 2, or 3.
NAME
Add
Add Halfword
Add Logical
Add Normalized
(Long)
Add Normalized
( Long )
Add Normalized
( Short )
Add Normalized
( Short )
150
MNEMONIC
A
AH
AL
TYPE
RX
RX
RX
EXCEPTIONS
C
C
C
N ADR
RR F,C
N AD
RX F,C
N AER
RR F,C
N AE
RX F,C
A,S,
A,S,
CODE NOTE
IF 5 A
IF 4 A
4
2
5E
S,U,E,LS 2A
A,S
A,S,U,E,LS 6A 3,8
S,U,E,LS 3A
A,S,U,E,LS 7A 3,4
NAME
MNEMONIC
TYPE
EXCEPTIONS
NOTE
AWR
RRF,C
AW
RX,F,C
AUR
RRF,C
AU
N
RXF, C
RX C
RX
A,S
59
CH
RX
A,S
49
CL
RX
A,S
55
CDR
RR,F,C
29
CD
RX,F,C
A,S
CER
RR,F,C
CE
RX,F,C
A,S
CVB
RX
A,S,D,
CVD
RX
DR
D
DP
N DDR
N DD
N DER
N DE
X
EX
RX
RX
Halve (Long)
Halve (Short)
HDR
HER
RR F
RRF
ISK
L
RR Z
RX
LTDR
E,LS 2E
E,LS 3E
69 3,8
39
79 3,4
P,A,S
IK 4F
4E
M, A,S
83
S,
IK 1D 1
A,S,
IK 5D 1,4
P,A,S,D, DKFD 5
S,U,E,FK 2D 3
A,S,U,E,FK 6D 3,8
S,U,E,FK 3D 3
A,S,U,E,FK 7D 3,4
SI
RR
RX
SS T
RR F
RX F
RRF
RX F
Exclusive OR
Execute
S,
CODE
57
EX 44
4
2
24
34
3
3
A,S
09
58
7
4
RR F,C
22
LTER
RR F,C
32
LCDR
RRF,C
23
LCER
LH
LDR
LD
RR F,C
RX
RR F
RX F
A,S
33
3
48
2
28
3
68 3,8
LM
RS
A,S
98
LNDR
RR F,C
21
LNER
RR F,C
31
20
A,S
A,S,
S
S
Insert Storage
Key
Load
Load and Test
(Long)
Load and Test
( Short )
Load Complement (Long)
Load Complement (Short)
Load Halfword
Load ( Long )
Load (Long)
Load
Multiple
Load Negative
(Long)
Load Negative
( Short )
Load Positive
( Long )
Load Positive
( Short )
Load PSW
Load (Short)
Load (Short)
LPDR
RR F,C
LPER
LPSW
LER
LE
RR F,C
S
SI
L M, A,S
RR F
S
RX F
A,S
30
3
82 6,8
38
3
78 3,4
Multiply
Multiply
MR
M
RR
RX
1C 1
5C 1,4
M, A,S
A,S
S
A,S
/
NAME
Multiply
Decimal
Multiply
Halfword
Multiply (Long)
Multiply (Long)
Multiply (Short)
Multiply (Short)
OR
Set Storage
Key
Shift Left
Double
Shift Left
Double
Logical
Shift Right
Double
Shift Right
Double
Logical
Store
Store Halfword
Store (Long)
Store Multiple
Store (Short)
Subtract
Subtract
Halfword
Subtract
Logical
Subtract Normalized (Long)
Subtract Normalized (Long)
Subtract Normalized (Short)
Subtract Normalized (Short)
Subtract Unnormalized
( Long )
Subtract Unnormalized
( Long )
Subtract Unnormalized
(Short)
Subtract Unnormalized
( Short )
MNEMONIC
TYPE
EXCEPTIONS
MP
SS T
P,A,S,D
MH
N MDR
N MD
N MER
N ME
RX
RR F
RX F
RR F
RX F
RX
SSK
RR Z
SLDA
RS
SLDL
RS
SRDA
RS
SRDL
ST
STH
STD
STM
STE
S
RS
RX
RX
RX F
RS
RX F
RX C
CODE
NOTE
FC
A,S
S,U,E
A,S,U,E
S,U,E
A,S,U,E
4C 2
2C 3
6C 3,8
3C 3
7C 3,4
A,S
56
M, A,S
08
S,
IF
8F
8D
8E
S
P,A,S
P,A,S
P,A,S
P,A,S
P,A,S
A,S,
8C 1
50
4
40
2
60 3,8
90
4
70 3,4
IF 5B 4
SH
RX
A,S,
IF 4B
SL
RX
A,S
5F
S,U,E,LS 2B
N SDR
RR F,C
N SD
RX F,C
N SER
RR F,C
N SE
RX F,C
SWR
RR F,C
A,S,U,E,LS 6B 3,8
S,U,E,LS 3B
A,S,U,E,LS 7B 3,4
S,
E,LS 2F
Data (D)
1. T h e sign or digit codes of o p e r a n d s in d e c i m a l
arithmetic, or editing operations, or CONVERT TO
BINARY, are incorrect.
2. Fields in d e c i m a l a r i t h m e t i c overlap incorrectly.
3. T h e d e c i m a l m u l t i p l i c a n d has too m a n y higho r d e r significant digits.
T h e o p e r a t i o n is t e r m i n a t e d in all three cases.
T h e instruction-length code is 2 or 3.
NAME
MNE:MONIC
Add Decimal
Compare
Decimal
Convert to
Binary
Divide Decimal
Edit
Edit and Mark
Multiply
Decimal
Subtract
Decimal
Zero and Add
SUR
SU
RXF,C
RRF,C
RXF,C
E,LS 3F
EXCEPTIONS
DF
CODE N O T E
SS T,C P,A, D,
CP
SS T,C
CVB
I)P
ED
EDMK
RX
A,S,D IK
SS T
P,A,S,D, DK
SS T,C P,A, D
SS T,C P,A, D
4F
FD
DE
DF
MP
SS T
FC
1,2
SP
ZAP
SS T,C P,A, D, DF
SS T,C P,A, D, DF
FB
F8
1
1
A, D
P,A,S,D
FA
F9
1
1
INTERRUPTION
1
2
Overlapping fields
Multiplicand length
NOTES
SW
TYPE
AP
MNEMONIC
TYPE
EXCEPTIONS
Add
Add
AR
A
RR
RX
C
C
Add Halfword
Load Complement
Load Positive
Shift Left Double
Shift Left Single
Subtract
Subtract
Subtract Halfword
AH
LCR
LPR
SLDA
SLA
SR
S
SH
RX
RR
RR
RS
RS
RR
RX
RX
C
C
C
C
C
C
C
C
A,S,
A,S,
S,
A,S,
A,S,
CODE
IF
IF
iA
5A
IF
IF
IF
IF
IF
IF
IF
IF
4A
13
10
8F
8B
1B
5B
4B
Convert to Binary
Divide
Divide
MNEMONIC
CVB
DR
D
TYPE
RX
RR
RX
EXCEPTIONS
A,S,D, IK
S,
IK
A,S,
IK
Appendix G
CODE
4F
iD
5D
151
NAME
Add Decimal
Subtract Decimal
Zeroand Add
MNEMONIC
AP
SP
ZAP
TYPE
SS T,C
SS T,C
SS T,C
EXCEPTIONS
P,A, D, DF
P,A, D, DF
P,A, D, DF
CODE
FA
FB
F8
Divide Decimal
MNEMONIC
DP
TYPE
SS T
EXCEPTIONS
P,A,S,D,
CODE
DK FD
Add Normalized
( Long )
Add Normalized
(Long)
Add Normalized
( Short )
Add Normalized
( Short )
Add Unnormalized ( Long )
Add Unnormalized (Long)
Add Unnormalized ( Short )
Add Unnormalized ( Short )
Divide ( Long )
Divide ( Long )
Divide ( Short )
Divide (Short)
Multiply ( Long )
Multiply (Long)
Multiply (Short)
Multiply (Short)
Subtract Normalized ( Long )
Subtract Normalized ( Long )
Subtract Normalized ( Short )
Subtract Normalized (Short)
Subtract Unnormalized ( Long )
Subtract Unnormalized ( Long )
Subtract Unnormalized (Short)
Subtract Unnormali~'ed ( Short )
152
MNEMONIC
TYPE
EXCEPTIONS
CODE
N ADR
RR F,C
S,U,E,LS
2A
N AD
RX F,C
A,S,U,E,LS
6A
N AER
RR F,C
S,U,E,LS
3A
N AE
RX F,C
A,S,U,E,LS
7A
AWR
RRF,C
S, E,LS
2E
AW
RXF,C
A,S, E,LS
6E
AUR
RRF, C
S, E,LS
3E
AU
N DDR
N DD
N DER
N DE
N MDR
N MD
N MER
N ME
RXF,C
RR F
RX F
RR F
RX F
RR F
RX F
RR F
RX F
A,S, E,LS
S,U,E,FK
A,S,U,E,FK
S,U,E,FK
A,S,U,E,FK
S,U,E
A,S,U,E
S,U,E
A,S,U,E
7E
2D
6D
3D
7D
2C
6C
3C
7C
N SDR
RR F,C
S,U,E,LS
2B
N SD
RX F,C
A,S,U,E,LS
6B
N SER
RR F,C
S,U,E,LS
3B
N SE
RX F,C
A,S,U,E,LS
7B
SWR
RRF,C
S, E,LS
2F
SW
RXF, C
A,S, E,LS
6F
SUR
RRF,C
S, E,LS
3F
SU
RXF,C
A,S, E,LS
7F
NAME
Add Normalized
( Long )
Add Normalized
(Long)
Add Normalized
( Short )
Add Normalized
( S~hort)
Divide ( Long )
Divide ( Long )
Divide ( Short )
Divide ( Short )
Multiply ( Long )
Multiply ( Long )
Multiply (Short)
Multiply ( Short )
Subtract Normalized (Long)
Subtract Normalized ( Long )
Subtract Normalized ( Short )
Subtract Normalized ( Short )
MNEMONIC
TYPE
floatingdivision.
result of
m a y be
EXCEPTIONS
CODE
N ADR
RR F,C
S,U,E,LS
2A
N AD
RX F,C
A,S,U,E,LS
6A
N AER
RR F,C
S,U,E,LS
3A
N AE
N DDR
N DD
N DER
N DE
N MDR
N MD
N MER
N ME
RX F,C
RR F
RX F
RR F
RX F
RR F
RX F
RR F
RX F
N SDR
RR F,C
S,U,E,LS
2B
N SD
RX F,C
A,S,U,E,LS
6B
N SER
RR F,C
S,U,E,LS
3B
N SE
RX F,C
A,S,U,E,LS
7B
A,S,U,E,LS 7A
S,U,E,FK 2D
A,S,U,E,FK 6D
S,U,E,FK 3D
A,S,U,E,FK 7D
S,U,E
2C
A,S,U,E
6C
S,U,E
3C
A,S,U,E
7C
Significance (LS)
The result of a floating-point addition or subtraction
has an all-zero fraction.
The operation is completed. The interruption m a y
be m a s k e d by PSW bit 39. The m a n n e r in w h i c h the
operation is c o m p l e t e d is d e t e r m i n e d by the mask bit.
The instruction-length code is 1 or 2.
NAME
Add Normalized
( Long )
Add Normalized
( Long )
Add Normalized
(Short)
Add Normalized
( Short )
Add Unnormalized (Long)
Add Unnormalized ( Long )
Add Unnormalized ( Short )
Add Unnormalized (Short)
Subtract Normalized ( Long )
Subtract Normalized ( Long )
Subtract Normalized ( Short )
Subtract Normalized (Short)
/%~NEMONIC
TYPE
EXCEPTIONS
CODE
N ADR
RR F,C
S,U,E,LS
2A
N AD
RX F,C
A,S,U,E,LS
6A
N AER
RR F,C
S,U,E,LS
3A
N AE
RX F,C
A,S,U,E,LS
7A
AWR
RRF,C
S, E,LS
2E
AW
RXF,C
A,S, E,LS
6E
AUR
RRF, C
S, E,LS
3E
AU
RX F,C
A,S, E,LS
7E
N SDR
RR F,C
S,U,E,LS
2B
N SD
RX F,C
A,S,U,E,LS
6B
N SER
RR F,C
S,U,E,LS
3B
N SE
RX F,C
A,S,U,E,LS
7B
NAME
MNEMONIC
TYPE
EXCEPTIONS
CODE
SWR
RR F,C
S,
E,LS
2F
SW
RX F,C
A,S,
E,LS
6F
SUR
RR F,C
S,
E,LS
3F
SU
RX F,C
A,S,
E,LS
7F
Divide
Divide
Divide
Divide
MNEMONIC
(Long)
(Long)
(Short)
(Short)
N
N
N
N
DDR
DD
DER
DE
TYPE
RR
RX
RR
RX
EXCEPTIONS
F
F
F
F
CODE
S,U,E,FK
A,S,U,E,FK
S,U,E,FK
riD
6D
3D
A,S,U,E,FK 7D
Editing
CHAR-
EXAM-
TRIG-
RESULT
TRIG-
ACTER
N A M E AND
INE
GER
DIGIT
CHAR-
GER
CODE
PURPOSE
DIGIT
STATUS
STATUS
ACTER
SET
0010 0000
digit select
yes
s: 1
s:0
s=0
s=l
s.~0
s=0
0010 0001
0010 0010
other
significance
start
yes
field
separator
message
insertion
no
no
d not 0
d=0
dnot0
d=0
s-- 1
s=0
digit
digit
fill
digit
digit
fill
fill
digit
fill
leave
other
NAME
IMPLEMENTATION
System Reset
Stop
Rate
Start
Storage Select
Address
Data
Store
Display
Set IC
Address Compare
Alternate Prefix*
* Multisystem feature
Key
Key
Rotary
Key
Rotary
Rotary
Rotary
Key
Key
Key
Rotary
Light
NAME
Emergency Pull
Power On
Power Off
Interrupt
Wait
Manual
System
Test
Load
Load Unit
Load
Prefix Select*
* Multisystem feature
IMPLEMENTATION
Pull switch
Key, backlighted
Key
Key
Light
Light
Light
Light
Light
Three rotary switches
Key
Key switch
or key switches
MANUAL
WAlT
CPU
I/O
LIGHT
LIGHT
LIGHT
STATE
STATE
off
off
off
off
off
on
off
on
off
Off
on
on
off
on
off
on
Off
on
on
on
on
on
off
on
leave
fill
ASSIGNMENT
Operator Controls
or key switch
or key switches
or key switches
Input~Output Operations
s=l
s=l
s=0
Source digit
S trigger (1: minus sign, digits, or pattern used; 0:
plus sign, fill used)
A source digit replaces the pattern character.
The fill character replaces the pattern character.
The pattern character remains unchanged.
Any other pattern character,
switch
s=l
NOTES
Intervention Controls
0000 0000
to
0111 1111
1000 xxxx
1001 xxxx
101o xxxx
1011 xxxx
1100 xxxx
1101 xxxx
1110 xxxx
1111 xxxx
ASSIGNMENT
shared subchannel 0
shared subchannel 1
shared subchannel 2
shared subchannel 3
shared subchannel 4
shared subchannel 5
shared subchannel 6
shared subchannel 7
Input/Output States
I / 0 Device
Available
Working
Not operational
Interruption pending
A
W
N
I
153
Channel
Available
Interruption pending
A
I
Working
Not operational
W
N
Subchannel
Available
Interruption pending
A
I
Working
Not operational
W
N
Available
Interruption pend. in device
Device working
Device not operational
Interruption pend. in subchannel
For the addressed device
For another device
Subchannel working
Subchannel not operational
Interruption pend. in channel
Channel working
Channel not operational
Error
Channel equipment error
Channel programming error
Device error
Ilo
I/O
CONDITIONS
I/O
CHAN
AAA 0,1" 0
0
AAI
1" 1" 0
AAW
1"
1" 0
AAN
3
3
0
AIX t
2
1" 0
2
2
0
AWX t 2
2
2
ANX t
3
3
3
IXX t see note below
WXX t 2
2
2
NXX t
3
3
3
1"
1 ~
1"
1"
__
1"
1"
0
0
0
0
0
0
2
0
1
2
3
-
__
__
0
0
1
1
154
CC
0
1
0
1
ACTION
CONDITION
CONTENT
Unpredictable
Unchanged
Unchanged
Address of TIC ~ 8
Address of TIC -4- 8
Address of first invalid CCW
+8
Address of invalid CCW -4- 8
Address of invalid CCW -4- 8
Address of invalid CCW -l- 8
Address of invalid CCW 44- 8
Address of second TIC -b 8
Address of invalid CCW -4- 8
Address of last-used CCW 44- 8
Address of last-used CCW -k 8
Address of last-used CCW -4- 8
Address of last-used CCW -I- 8
Address of last CCW used in
the completed operation -4- 8
Address of CCW specifying
the new operation "4- 8
Address of last-used CCW -4- 8
Address of last-used CCW 44- 8
Zero
Zero
Zero
Zero
Zero
Zero
CONTENT
Unpredictable
Unchanged
Unchanged
Unpredictable
Unpredictable ~
Correct
Correct
Correct
Correct
Correct. Residual count of last
CCW used in the completed
operation.
Correct. Original count of
CCW specifying the new
operation.
Unpredictable
Correct
Zero
Zero
Zero
Zero
Zero
Zero
T h e t a b l e lists t h e c o n d i t i o n s w h e n t h e b u s y b i t ( B )
a p p e a r s in t h e c s w a n d w h e n it is a c c o m p a n i e d b y
t h e s t a t u s - m o d i f i e r b i t ( s M ) . T w o h y p h e n s ( - - ) indic a t e t h a t t h e b u s y b i t is off; a n a s t e r i s k ( * ) i n d i c a t e s
t h a t c s w s t a t u s is n o t s t o r e d or a n I f ,
interruption
CONDITION
I/O
I/0
*
*
B,cl
--,cl
I/O
INT.
*
*
B,cl
--,cl
oolwD,c~! .
Subchannel available
DE or attention in device
Device working, CU available
CU end or channel end in CU:
for the addressed device
for another device
CU working
CONDITION
I/0
I/O
I/0
INT.
B,cl
B
--,cl
B
*
*
--,cl
*
B,cl
B,SM
B,SM
--,cl
B,SM
B,SM
*
*
*
--,cl
--,cl
*
CD
FLAGS
CC
SLI
0
0
0
1
1
1
1
0
1
1
0
0
1
1
1
0
1
0
1
0
1
Stop, IL
Stop, -Stop, IL
Chain command
Stop, IL
Stop, IL
Stop, IL
Stop, IL
Attention
Status modifier
Control unit end
Busy
Channel end
Device end
Unit check
Unit exception
WHEN
UPON T E R M I N A T I O N OF OPERATION
1/O IS
SUBCHANNEL
AT
AT CONTROL
AT
IDLE
WORKING
SUBCHANNEL
UNIT
DEVICE
C*
DURING
BY
BY
BY
BY I / O
COMMAND
CHAINING
START
I/0
TEST
I/0
HALT
I/0
INTERRUPTION
C
C
C*
C
C*
C
C
C
C* ~
C i
C*
C*
S
S
CS
CS
CS
CS
CS
CS
Ct S S
Ct S S
CS
CS
CS
S
CS
C*
C*
C* H
C
C
C
C
C*
Program-controlled interruption
CO
Incorrect length
Program check
Protection check
Channel data check
Channel control check
Interface control check
Chaining check
C
C
C
C*
C*
C*
C
C
C
C
C
C*
C*
C
C*
C*
NOTES
C*
C*
C*
C*
C*
CS
C*
C*
CS
CS
CS
CS
CS
S
S
S
S
S
S
CS
S
S
S
S
S
CS
CS
S
S
S
S
S
CS
CS
S
CS
CS
Appendix G
155
Instruction Termination
Only one program interruption occurs for a given instruction. The old Psw always identifies a valid cause.
This does not preclude simultaneous occurrence of
any other causes. Which of several causes is identified
may vary from one occasion to the next and from one
model to another.
When instruction execution is terminated by an interruption, all, part, or none of the result may be
stored. The result data, therefore, are unpredictable.
The setting of the condition code, if called for, may
also be unpredictable. In general, the results of the
operation should not be used for further computation.
Cases of instruction termination for a program interruption are:
Protection: The storage key of a result location does
not~ match the protection key in the Psw. The operation is terminated in the case of STORE MULTIPLE, READ
DIRECT, and variable-length operations. Protected storage remains unchanged. The timing signals of READ
DIRECT may have been made available.
Addressing: An address specifies any part of data,
instruction, or control word outside the available storage for the particular installation. The operation is
terminated. Data in storage remain unchanged, except
when designated by valid addresses.
156
Data: The sign or digit codes of operands in decimal arithmetic, CONVERTTO BINAX~Y,or editing operations are incorrect, or fields in decimal arithmetic overlap incorrectly, or the decimal multiplicand has too
many high-order significant digits. The operation is
terminated in all three cases. The condition code setting, if called for, is unpredictable for protection, addressing, and data exceptions.
Exponent Overflow: The result exponent of an ADD,
SUBTRACT, MULTIPLY, or DIVIDE overflows and the result fraction is not zero. The operation is terminated.
The condition code is set to 3 for .ADDand SUBTRACT,
and remains unchanged for MULTIPLY and DIVIDE.
Machine-Check Interruption
For a machine-check interruption, the old Psw is
stored at location 48 with a zero interruption code.
The state of the cPu is scanned out into the storage
area starting with location 128 and extending through
as many words as are required by the given cPu. The
new PSW is fetched from location 112. Proper execution of these steps depends on the nature of the machine check. A change in the machine-check mask bit
due to the loading of a new Psw results in a change
in the treatment of machine checks. Depending upon
the nature of a machine check, the old treatment may
still be in force for several cycles. Machine checks that
occur in operations executed by I/o channels may
either cause a machine-check interruption or are recorded in the csw for that operation.
Instruction-Length Code
The instruction-length code is predictable only for
program and supervisor-call interruptions. For I/o and
external interruptions, the interruption is not caused
by the last interpreted instruction, and the code is not
predictable for these classes of interruptions. For machine-check interruptions, the setting of the code is a
function of the malfunction and therefore unpredictable.
For the supervisor-call interruption the instructionlength code is 1, indicating the halfword length of
SUPEr~vIsoR CALL; for the program interruptions, the
codes 1, 2, and 3 indicate the instruction length in
halfwords. The code 0 is reserved for program interruptions where the length of the instruction is not
available because of certain overlap conditions in instruction fetching. In those cases, the instruction address in the old rsw does not represent the next instruction address. The instruction-length code 0 can
occur only for a program interruption caused by a
protected or unavailable data address.
Timer
Updating of the timer may be omitted when I/o data
transmission approaches the limit of storage capability.
Appendix G
157
When the channel detects program check or protection check, the content of the count field in the
associated csw is unpredictable.
When a programming error occurs in the information placed in the caw or ccw and the addressed
channel or subchanne| is working, either condition
code 1 or 2 may be set, depending on the model.
Similarly, either code 1 or 3 may be set when a programming error occurs and a part of the addressed
I/o system is not operational.
When a programming error occurs and the addressed device contains an interruption condition,
with the channel and subchannel in the available
state, STnRT I/O may or may not clear the interruption
condition, depending on the type of error and the
model. If the instruction has caused the device to be
interrogated, as indicated by the presence of the busy
bit in the c s w , the interruption condition has been
cleared, and the csw contains program check, as well
as the status from the device.
When the channel detects several error conditions,
all conditions may be indicated or only one may appear in the c s w , depending on the condition and the
model.
158
NAME
EXCEPTIONS
columns mean.
Addressing exception
Condition code is set
Data exception
Decimal-overflow exception
Decimal-divide exception
Exponent-overflow exception
Execute exception
Floating-point feature
Floating-point divide exception
Fixed-point overflow exception
Fixed-point divide exception
New condition code loaded
Significance exception
Privileged-operation exception
Normalized operation
Protection exception
Specification exception
Decimal feature
Exponent-underfiow exception
Direct control feature
Protection feature
NAME
Add
Add
Add Decimal
Add Halfword
Add Logical
Add Logical
Add Normalized
(Long)
Add Normalized
( Long )
Add Normalized
(Short)
Add Normalized
(Short)
Add Unnormalized (Long)
Add Unnormalized ( Long )
Add Unnormalized (Short)
Add Unnormalized (Short)
AND
AND
AND
AND
Branch and Link
Branch and Link
Branch on
Condition
Branch on
Condition
Branch on Count
Branch on Count
Branch on Index
High
Branch on Index
Low or Equal
Compare
Compare
Compare Decimal
MNEMONIC
TYPE
EXCEPTIONS
CODE
IF
IF
DF
IF
1A
5A
FA
4A
1E
5E
RR F,C
S,U,E,LS
2A
N AD
RX F,C
A,S,U,E,LS
6A
N AER
RR F,C
S,U,E,LS
3A
N AE
RX F,C
A,S,U,E,LS
7A
AR
A
AP
AH
ALR
AL
RR C
RX C
SS T,C
RX C
RR C
RX C
N ADR
A,S,
P,A, D,
A,S,
A,S,
AWR
RR F,C
S,
E,LS
2E
AW
RX F,C
A,S,
E,LS
6E
AUR
RR F,C
S,
E,LS
3E
AU
NR
N
NI
NC
BALR
BAL
RX F,C
RR C
RX C
SI
C
SS
C
RR
RX
A,S,
E,LS
7E
14
54
94
D4
05
45
BCR
RR
07
BC
BCTR
BCT
RX
RR
RX
47
06
46
BXH
RS
86
BXLE
CR
C
CP
RS
RR C
RX C
SS T,C
87
19
59
F9
A,S
P,A
P,A
A,S
A, D
Compare Halfword
Compare Logical
Compare Logical
Compare Logical
Compare Logical
Compare (Long)
Compare (Long)
Compare (Short)
Compare (Short)
Convert to Binary
Convert to Decimal
Diagnose
Divide
Divide
Divide Decimal
Divide ( Long )
Divide ( Long )
Divide ( Short )
Divide ( Short )
Edit
Edit and Mark
Exclusive OR
Exclusive OR
Exclusive OR
Exclusive OR
Execute
Halt I/O
Halve ( Long )
Halve ( Short )
Insert Character
.Insert Storage Key
Load
Load
Load Address
Load and Test
Load and Test
( Long )
Load and Test
(Short)
Load Complement
Load Complement
( Long )
Load Complement
(Short)
Load Halfword
Load (Long)
Load (Long)
Load Multiple
Load Negative
Load Negative
( Long )
Load Negative
(Short)
Load Positive
Load Positive
( Long )
Load Positive
( Short )
Load PSW
Load (Short)
Load ( Short )
Move
Move
Move Numerics
Movewith Offset
MNEMONIC
CH
CLR
CL
CLI
CLC
CDR
CD
CER
CE
CVB
CVD
DR
D
DP
N DDR
NDD
N DER
NDE
ED
EDMK
XR
X
XI
XC
EX
HIO
HDR
HER
IC
ISK
LR
L
LA
LTR
TYPE
CODE
EXCEPTIONS
RX C
A,S
RR C
RX C
A,S
SI
C
A
SS
C
A
RR F,C
S
RX F,C
A,S
RR F,C
S
RX F,C
A,S
RX
A,S,D, IK
RX
P,A,S
SI
M, A,S
RR
S,
IK
RX
A,S,
IK
SS T
P,A,S,D, DK
RR F
S,U,E,FK
RX F
A,S,U,E,FK
RR F
S,U,E,FK
RX F
A,S,U,E,FK
SS T,C P,A, D,
SS T,C P,A, D,
RR C
RX C
A,S
SI
C P,A
SS
C P,A
RX
A,S,
EX
SI
CM
RR F
S
RR F
S
RX
A
RR Z M, A,S
RR
RX
A,S
RX
RR C
49
15
55
95
D5
29
69
39
79
4F
4E
83
1D
5D
FD
2D
6D
3D
7D
DE
DF
17
57
97
D7
44
9E
24
34
43
09
18
58
41
12
22
LTDR
RR F,C
LTER
LCR
RR F,C
RR C
LCDR
RR F,C
23
LCER
LH
LDR
LD
LM
LNR
RR F,C
RX
RR F
RX F
RS
RR C
S
A,S
S
A,S
A,S
33
48
28
68
98
11
LNDR
RR F,C
21
LNER
LPR
RR F,C
RR C
LPDR
RR F,C
LPER
LPSW
LER
LE
MVI
MVC
MVN
MVO
RR F,C
S
SI
LM, A,S
RR F
S
RX F
A,S
SI
P,A
SS
P,A
SS
P,A
SS
P,A
IF
IF
Appendix G
32
13
31
10
20
30
82
38
78
92
D2
D1
F1
159
NAME
Move Zones
Multiply
Multiply
Multiply Decimal
Multiply Halfword
Multiply ( Long )
Multiply ( Long )
Multiply ( Short )
Multiply ( Short )
OR
OR
OR
OR
Pack
Read Direct
Set Program Mask
Set Storage Key
Set System Mask
Shift Left Double
Shift Left Double
Logical
Shift Left Single
Shift Left Single
Logical
Shift Right Double
Shift Right Double
Logical
Shift Right Single
Shift Right Single
Logical
Start I/O
Store
Store Character
Store Halfword
Store (Long)
Store Multiple
Store (Short)
Subtract
Subtract
Subtract Decimal
Subtract Halfword
Subtract Logical
Subtract Logical
Subtract Normalized (Long)
Subtract Normalized ( Long )
Subtract Normalized (Short)
Subtract Normalized ( Short )
Subtract Unnormalized ( Long )
Subtract Unnormalized ( Long )
Subtract Unnormalized ( Short )
Subtract Unnormalized ( Short )
Supervisor Call
Test Channel
Test I/O
Test Under Mask
Translate
Translate and Test
Unpack
Write Direct
Zero and Add
160
MNEMONIC
MVZ
MR
M
MP
MH
N MDR
N MD
N MER
NME
OR
O
OI
OC
PACK
RDD
SPM
SSK
SSM
SLDA
TYPE
EXCEPTIONS
CODE
SS
P,A
RR
S
RX
A,S
SS T
P,A,S,D
RX
A,S
RR F
S,U,E
RX F
A,S,U,E
RR F
S,U,E
RX F
A,S,U,E
RR C
RX C
A,S
SI
C P,A
SS
C P,A
SS
P,A
SI Y M,P,A
RR L
RR Z M, A,S
SI
M, A
RS C
S,
IF
D3
1C
5C
FC
4C
2C
6C
3C
7C
16
56
96
D6
F2
85
04
08
80
8F
SLDL
SLA
PtS
RS
8D
8B
SLL
SRDA
RS
RS
SRDL
SRA
RS
RS
SRL
SIO
ST
STC
STH
STD
STM
STE
SR
S
SP
SH
SLR
SL
RS
SI
CM
RX
P,A,S
RX
P,A
RX
P,A,S
RX F
P,A,S
RS
P,A,S
RX F
P,A,S
RR C
RX C
A,S,
SS T,C P,A, D,
RX C
A,S,
RR C
RX C
A,S
S
C
IF
89
8E
S
S
8C
8A
IF
IF
DF
IF
88
9C
50
42
40
60
90
70
1B
5B
FB
4B
1F
5F
N SDR
RR F,C
S,U,E,LS
2B
N SD
RX F,C
A,S,U,E,LS
6B
N SER
RR F,C
S,U,E,LS
3B
N SE
RX F,C
A,S,U,E,LS
7B
SWR
RRF, C
S,
E,LS
2F
SW
RXF, C
A,S,
E,LS
6F
SUR
RRF,C
S,
E,LS
3F
SU
SVC
TCH
TIO
TM
TR
TRT
UNPK
WRD
ZAP
RXF,C
A,S, E,LS
RR
SI
CM
SI
CM
SI
C
A
SS
P,A
SS
C
A
SS
P,A
SI Y M, A
SS T,C P,A, D, DF
7F
0A
9F
9D
91
DC
DD
F3
84
F8
Add
Add
Add Halfword
Add Logical
Add Logical
AND
AND
AND
AND
Branch and Link
Branch and Link
Branch on
Condition
Branch on
Condition
Branch on Count
Branch on Count
Branch on Index
High
Branch on Index
Low or Equal
Compare
Compare
Compare Halfword
Compare Logical
Compare Logical
Compare Logical
Compare Logical
Convert to Binary
Convert to Decimal
Diagnose
Divide
Divide
Exclusive OR
Exclusive OR
Exclusive OR
Exclusive OR
Execute
Halt I/O
Insert Character
Load
Load
Load Address
Load and Test
Load Complement
Load Halfword
Load Multiple
Load Negative
Load Positive
Load PSW
Move
Move
Move Numerics
Move with Offset
Move Zones
Multiply
Multiply
Multiply Halfword
OR
OR
OR
OR
Pack
MNEMONIC
TYPE
CODE
RR
RX
RX
RR
RX
RR
RX
SI
SS
RR
RX
BCR
RR
07
BC
BCTR
BCT
RX
RR
RX
47
06
46
BXH
RS
86
RS
RR
RX
RX
RR
RX
SS
SI
RX
RX
SI
RR
RX
RR
RX
SI
SS
RX
SI
RX
RR
RX
RX
RR
RR
RX
RS
RR
RR
SI
SI
SS
SS
SS
SS
RR
RX
RX
RR
RX
SI
SS
SS
87
19
A,S
59
A,S
49
15
A,S
55
A
D5
A
95
A,S,D, IK 4F
P,A,S
4E
M, A,S
83
S,
IK 1D
A,S,
IK 5D
C
17
C
A,S
57
C P,A
97
C P,A
D7
A,S,
EX 44
CM
9E
A
43
18
A,S
58
41
C
12
C
IF
13
A,S
48
A,S
98
C
11
C
IF
10
L M, A,S
82
P,A
92
P,A
D2
P,A
D1
P,A
F1
P,A
D3
S
1C
A,S
5C
A,S
4C
C
16
C
A,S
56
C P,A
96
C P,A
D6
P,A
F2
BXLE
CR
C
CH
CLR
CL
CLC
CLI
CVB
CVD
DR
D
XR
X
XI
XC
EX
HIO
IC
LR
L
LA
LTR
LCR
LH
LM
LNR
LPR
LPSW
MVI
MVC
MVN
MVO
MVZ
MR
M
MH
OR
O
OI
OC
PACK
C
C
C
C
C
C
C
C
C
EXCEPTIONS
AR
A
AH
ALR
AL
NR
N
NI
NC
BALR
BAL
A,S,
A,S,
A,S,
A,S
P,A
P,A
IF
IF
IF
1A
5A
4A
1E
5E
14
54
94
D4
05
45
04
8O
8F
8B
SPM
SSM
SLDA
SLA
RR
SI
RS
RS
SLDL
RS
8D
SLL
SRDA
SRA
RS
RS
RS
89
8E
8A
SRDL
RS
8C
SRL
SIO
ST
STC
STH
STM
SR
S
SH
SLR
SL
SVC
TCH
TIO
TM
TR
TRT
UNPK
RS
SI
RX
RX
RX
RS
RR
RX
RX
RR
RX
RR
SI
SI
SI
SS
SS
SS
M, A
IF
IF
C
C
CM
P,A,S
P,A
P,A,S
P,A,S
C
C
C
C
C
CM
CM
C
C
A,S,
A,S,
IF
IF
IF
A,S
A
P,A
A
P,A
88
9C
5O
42
40
90
1B
5B
4B
1F
5F
0A
9F
9D
91
DC
DD
F3
MNEMONIC
Add Normalized
N ADR
(Long)
Add Normalized
N AD
( Long )
Add Normalized
N AER
( Short )
Add Normalized
N AE
( Short )
Add UnnormAWR
alized ( Long )
Add UnnormAW
alized ( Long )
Add UnnormAUR
alized (Short)
Add UnnormAU
alized ( Short )
CDR
Compare ( Long )
CD
Compare ( Long )
CER
Compare (Short)
CE
Compare (Short)
N DDR
Divide ( Long )
NDD
Divide ( Long )
N DER
Divide (Short)
NDE
Divide ( Short )
HDR
Halve Long
HER
Halve (Short)
Load and Test
LTDR
(Long)
Load and Test
LTER
( Short )
Load Complement
LCDR
( Long )
Load Complement
LCER
( Short )
TYPE
EXCEPTIONS
CODE
RR F,C
S,U,E,LS
2A
RX F,C
A,S,U,E,LS
6A
RR F,C
S,U,E,LS
3A
RX F,C
A,S,U,E,LS
7A
RR F , C
S,
E,LS
2E
RX F,C
A,S,
E,LS
6E
RR F,C
S,
E,LS
3E
RXF,C
RR F,C
RX F,C
RR F,C
RX F,C
RR F
RX F
RR F
RX F
RR F
A,S,
S
A,S
E,LS
LDR
RR F
S
28
Load (Long)
LD
RX F
A,S
68
Load (Long)
Load Negative
LNDR
RR F,C
S
21
( Long )
Load Negative
LNER
RR F,C
S
31
( Short )
Load Positive
LPDR
RR F,C
S
20
(Long)
Load Positive
LPER
RR F,C
S
30
(Short)
LER
RR F
S
38
Load (Short)
LE
RX F
A,S
78
Load (Short)
N MDR
RR F
S,U,E
2C
Multiply (Long)
N MD
RX F
A,S,U,E
6C
Multiply (Long)
N MER
RR F
S,U,E
3C
Multiply (Short)
N ME
RX F
A,S,U,E
7C
Multiply ( Short )
STD
RX F
P,A,S
60
Store (Long)
STE
RX F
P,A,S
70
Store (Short)
Subtract NormN SDR
RR F,C
S,U,E,LS 2B
alized (Long)
Subtract NormN SD
RX F,C
A,S,U,E,LS 6B
alized (Long)
Subtract NormN SER
RR F,C
S,U,E,LS 3B
alized (Short)
Subtract NormN SE
RX F,C
A,S,U,E,LS 7B
alized (Short)
Subtract UnnormSWR
RRF,C
S, E,LS 2F
alized ( Long )
Subtract UnnormSW
RXF, C
A,S, E,LS 6F
alized ( Long )
Subtract UnnormSUR
RRF,C
S, E,LS 3F
alized (Short)
Subtract Unnormalized (Short)
SU
RX F,C
A,S, E,LS 7F
The scientific instruction set includes the instructions of both
the standard instruction set and the floating-point feature.
Add Decimal
Compare Decimal
Divide Decimal
Edit
Edit and Mark
Multiply Decimal
Subtract Decimal
Zero and Add
MNEMONIC
AP
CP
DP
ED
EDMK
MP
SP
ZAP
TYPE
SS
SS
SS
SS
SS
SS
SS
SS
T,C
T,C
T
T,C
T,C
T
T,C
T,C
EXCEPTIONS
P,A, D, DF
A, D
P,A,S,D, DK
P,A, D
P,A, D
P,A,S,D
P,A, D, DF
P,A, D, DF
CODE
FA
F9
FD
DE
DF
FC
FB
F8
RR F
7E
29
69
S
39
A,S
79
S,U,E,FK 2D
A,S,U,E,FK 6D
S,U,E,FK 3D
A,S,U,E,FK 7D
S
24
S
34
MNEMONIC
RR F,C
22
RR F,C
32
RR F,C
23
RR F,C
33
NAME
RDD
WRD
TYPE
Read Direct
Write Direct
M N E M O N I C TYPE
ISK
SSK
EXCEPTIONS
SI Y M,P,A
SI .Y M, A
RR Z
RR Z
CODE
85
84
EXCEPTIONS CODE
M, A,S
M, A,S
Appendix G
09
08
161
Page
Page
AUR
RX
AD
RR
RX
11 12
15 16
19 20
31
7 8
i
AW
7 8
11 12
1516
1920
RX
(Short Operands)
7 8
11 12
RR
15 16
1920
(Short Operands)
AH
7 $
11 12
64
7 8
BC
15 16
1920
64
27
ALe
11 12
15 16
1920
31
RR
I M,! 21 B2 i
27
AP
11 12
35
7 8
AR
11 12
15 16
1920
31 32
35 36
~i
47
27
RR
07
7 8
BCT
AU
7 8
RX
11 12
162
15
64
46
D2
11 12
15 16
1920
RR
06
(Short Operands)
45
64
I ,11.~ i
78
BXH
11 12
15
RS
64
86
78
15
BXLE
11 12
1516
7 8
11 12
1516
1920
31
D2
1920
RS
65
87
7E
0
11 12
RX
BCTR
J
0
D2
1920
15
SS
15 16
63
7 8
7 8
11 12
RR
j
0
15
63
7 8
BCR
5E
7 8
1! 12
31
RX
1920
RX
47
AL
15 16
RR
0
11 12
11 12
15
97
7 8
15
44
RX
11 lqg
RX
7 8
0
45
44
BALR
AER
1920
15
BAL
AE
1516
(Long Operands)
RR
7 8
11 12
11 12
44
(Long Operands)
7 8
45
31
AWR
RR
15
44
(Long Operands)
7 8
11 12
(Long Operands)
RX
6A
45
27
7 8
ADR
(Short Operands)
7 8
11 12
15 16
1920
Page
Page
C
29
RX
D2
7 8
CD ~
RX
11 12
11 12
15 16
46
CVB
78
RX
1112
46
CVD
CER
15 16
J J
SD
46
DD
RX
11 12
29
1RllX2iB21
7 8
CL
11 12
15 16
D5
CL!
11 12
15 16
1516
19 20
31 32
15 16
78
J
0
53
DER
l
0
53
DP
i
53
48
11 12
37
LI
i L2 J B1
1112
1516
RX
15 16
1920
I
31
48
3132
35 36
47
t l 12
15
48
(Short Operands)
2
11 12
15 16
1
3t
19 20
48
(Short Operands)
RR
7 8
11 t2
15
37
SS
FD
78
DR
ED
11 12
1516
1920
3132
35 36
1D
47
30
RR
IRIJ R21
7 8
15
SS
78
11 12
(Long Operands)
RR
15
F9
31
3D
47
31
19 20
RR
7 8
CP
2
1920
(Long Operands)
7 8
D1
95
35 36
SI
CLR
15 16
7D
31
J
78
DE
! I
1920
SS
11 12
7 8
D2
I Rlix21B21
D2
53
7 8
DDR
1920
RX
CLC
19 20
3O
7 8
15
RX
49
t516
D2
7 8
CH
11 12
7 8
39
31
D2
RX
1920
o2
1920
4E
46
1516
RX
15
(Short Operands)
RR
11 12
7 8
D2
11 12
30
RX
1920
(Short Operands)
7 8
15
[RiI,x2 ! B2 i
J
11 12
7 8
29
CE
19
D2
(Long Operands)
RR
29
7 8
(Long Operands)
7 8
RR
1920
[ Rllx2iB21
69
CDR
15 16
CR
11 12
15
57
SS
78
15 16
19 20
31 32
35 36
Appendix G
47
163
Page
Page
EDMK
58
SS
DF
EX
15 16
78
19 20
31 32
35 36
47
65
RX
LCR
LD
26
RR
7 8
RX
I1 12
15
43
(LongOperands)
D2
44
7 8
HDR
11 12
1516
7 8
1920
(Long Operands)
RR
47
LDR
RR
11 12
15 16
19 20
43
(Long Operands)
24
7 8
HER
47
LE
11 12
15
(ShortOperands)
RX
43
78
11 12
15
7 8
94
SI
7 8
1516
1920
55
11 12
1516
LH
7 8
LM
1920
43
11 12
15
25
RX
7 9
73
15 16
38
1920
RR
11 12
(Short Operands)
RR
RX
7 8
LER
D
1
9E
ISK
7 8
34
HIO
IC
15
(Short Operands)
RR
7 8
11 12
11 12
15 16
19 20
26
RS
D2
09
7 a
i5
7 8
RX
25
7 8
LA
Sl 12
11 12
15 16
RR
11 12
15 16
(Long Operands)
RR
t l 12
44
15
(Short Operands)
44
7 8
19 20
43
LNR
11 12
15
26
RR
23
7 8
11 12
7 8
15
(Short Operands)
RR
43
LPDR
11 12
15
(Long Operands)
RR
20
7 8
164
1920
i , L R2 I
D2
7 8
LCER
LNER
15 16
(Long Operands)
7 8
56
41
RR
1920
RX
LCDR
LNDR
11 12
11 12
15
7 8
11 12
15
43
Page
LPER
(Short Operands)
RR
7 8
LPR
11 12
43
15
Page
MER
RR
28
MH
(ShortOperands)
RR
7 8
11 12
47
15
RX
30
02
7 8
LPSW
11 12
15
7g
SI
MP
7 8
7 8
LR
RR
18
1516
11 12
15
7 8
11 12
43
15
43
LTR
11 12
RX
.5C
11 12
78
MV!
MD
15 16
1920
D2
6C.
'7 8
MDR
11 12
1516
MVO
ME
RX
D2
7C
o
7 8
11 12
1516
-1920
31
31
i~IIID'I B2_ill 21
19 20
31 32
35 36
11 12
1516
1920
3132
35 36
15 16
19 20
31 32
35 36
47
54
I R, Ix21B21
11 12
1516
1920
SS
D4
47
53
RX
NC
47
38
78
47
'i I i B 1
1516
D3
15
(Short Operands)
D,
19 20
SS
54
11 12
IB,!
15 16
78
47
47
I:1
MVZ
, 2C
7 8
35 36
53
7 8
,,! !
31 32
SS
1920
(Long Operands)
RR
,2
31
47
19 20
52
78
(Long Operands)
RX
11 12
1516
SS
MVN
I "
7 8
47
15
SI
15
29
35 36
8g
D1
7 8
11 12
7 8
25
31 32
SS
15
RR
19 20
29
7 8
92
7 8
1516
,c
MVC
32
11 12
RR
(Short Operands)
RR
37
7 8
(Long Operands)
RR
MR
19 20
!', I R2 I
LTDR
31
g5
7 8
LTER
19 20
15 16
SS
82
11 1~
54
i
78
,L
15 16
19 20
31,32
,35 36
Appendix (3
47
165
Page
Ni
54
SI
....I
94
0
,2
7 8
NR
11 12
7 8
11 12
15 16
1920
D6
.I ',
78
15 16
96
,2
7 8
'i
54
SIO
31
31 32
35 36
54
SL
19 20
54
RR
PACK
7 8
RDD
RX
l.
5B
15 16
78
J
0
31 32
35 36
RX
19 20
",
31
D2
(Long Operands)
RR
2B
~]. R, i R2 I
78
1112
15
1920
31
o,
19 20
31
45
11 12
15 16
I
31
19 20
32
RS
! ", V///A
8B
7 8
11 12
'~
15 16
_D~
1920
31
32
RS
11/12
15 16
0~
1920
31
59
RS
7 8
SLR
J
0
SP
[
o
11 12
1516
31
1920
59
RS
89
, ,J
31
28
I I
45
6B
15 16
o2
8D
SLL
31
19 20
(Long Operands)
11 12
,, i
15 16
7 8
SLDL
2
15 16
!
19 20
RX
47
28
11 12
~///////A
19 20
IB, I
7 8
SDR
15 16
1 .....~2
15 16
92
7 8
SLDA
74
7 8
!~.... 1 ....~,
SI
SD
11 12
11 12
SI
38
JLi J
F2
7 8
SLA
15
SS
11 12
15
I R1 ! x2
'~
J
7 8
11 12
28
31
31
45
....-sT
I
15 16
1920
RX
[ .... 9
47
16
7 8
19 20
SI
SH
1516
! R, 1R2,1
3B
54
11 12
(Short Operands)
RR
SS
OR
SER
15
I R, Ix21B21
56
7B
45
(Short Operands)
7 8
RX
OI
i-
! R, IR2 i
7 8
OC
I
54
14
D1
RX
19 20
RR
I B, I ....
15 16
Page
SE
7 8
11 12
15 16
1920
28
RR
1F
7 8
11 12
15
36
SS
FB
1.
7 8
L1
'! L2
11 12
19 20
31 32
35 36
4.7
Page
SPM
72
RR
O4
iiI.........
11 12
SR
RR
1B
15
28
11 12
15
32
J ....... 8A
I ~, ,.V///A~,,.L,
7 8
SRDA
11 1"2
1516
STH
SU
7 8
SRDL
11 12
15 16
-,
6O
RS
31
11 12
1516
D2
1920
RS
31
I'.IR31B21
D2
1516
31
1920
7 8
11 12
1516
D2
1920
31
(Short Operands)
R.1
46
,I~, I~ I,,). !
7F
SUR
11 12
(Short Operands)
RX
1920
1920
40
7 8
33
D2
1516
31
90
49
RX
STM
31
D2
8E
11 12
7 8
I I
D2
1920
RS
I,,I~iB~I
70
RS
(Short Operands)
RX
7 8
I7 8
SRA
Page
STE
46
....
] ~, V,//A.. ~, I
8C
7 8
SRL
11 12
59
SSM
1112
72
~.~j.j..~.k-j..-~ ~, I
7 8
15 16
"
I R. '1. , I B, I
7 8
STC
11 12
15 16
55
RX
D2
7 8
11 12
1516
31
1920
49
(Long Operands)
RX
6o
D2
7 8
11 12
1516
19 20
I l
11 12
15 16
.!
19 20
31
(Long Operands)
7 8
46
11 12
15
SI
~F,
95
7 8
15 16
19 20
31
SI
93
~YYYYYY~ ~, I.
9D
7 8
TM
46
2F
TtO
15
(Long Operands)
RR
TCH
D2
11 12
7 8
1920
.42
IR, IR21
....6~ !~,;! , I ~, 1
31
15
72
RX
SWR
D1
1920
RX
50
SI
80
oA
SW
15
11 12
RR
7 8
73
7 8
....
19 20
I,R, i R2 I
08
15 16
7 8
SVC
I
11 12
I,, i~, I
3F
RR
STD
I .....
a8 .....
SSK
FL
D2
1920
RS
7 8
ST
15 16
1,516
D1
31
19 20
SI
9.
55
1
78
12
1516
19 20
Appendix G
167
Page
TR
SS
56
78
TRT
15 16
1920
31 32
35 36
SS
Page
XC
SS
47
55
7 8
56
Xl
12
WRD
11 12
15 16
1920
31 32
35 36
SI
84
47
7 8
38
78
XR
,2
78
IB,!
15 16
RX
31
55
11 12
15 16
19 20
ZAP
31
I-S~l
15 16
ol
19 2 0
31
11 12
15
SS
F8
,417
55
7 8 '
I J
D,
19 20
35 36
RR
47
73
78
168
35 36
31 32
55
F3
31 32
SS
UNPK
19 20
19 20
SI
97
15 16
78
15 16
36
7 8
11 12
15 16
1920
31 32
35 36
47
COMMENT SHEET
I
IBM S Y S T E M S 3 6 0
1
!
P R I N C I P L E S OF OPERATION
FORM A22--6821--1
I
i
P L E A S E C O M M E N T ON THE U S E F U L N E S S AND R E A D A B I L I T Y OF
THIS P U B L I C A T I O N . SUGGEST ADDITIONS AND D E L E T I O N S . AND
INDICATE ANY S P E C I F I C ERRORS AND OMISSIONS,
U S E F U L N E S S AND R E A D A B I L I T Y
I
1
I
I
I
!
I
FOLD
FOLD
I
I
I
I
I
I
I
l
I
I
I
I
I
I
I
I
I
FOLD
I FOLD
I
I
NAME
TITLE
I
I
COMPANY AND D E P A R T M E N T
I
I
ADDRESS
I
I
I
CITY
STATE
I
I
I
I
I
I
I
STAPL
STAPL
F'OLD
FOLD
FIRST
PERMIT
CLASS
NO.
81
POUGHKEEPSIE
BUSINESS
NO
POSTAGE
STAMP
REPLY
NECESSARY
IF
N. Y,
MAIL
MAILED
IN
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
lld
U. S. A.
l_z
IJ
POSTAGE
WILL
BE
PAID
BY
I z
0
! BM COR PORAT! ON
ATTN:
~ ,
FOLD
FOLD
STAPLE
STAPLE
13
Iu
i
!
!
!
!
!
!
!
I
I
!
I
!
I
I
I
I
I
I
I
!
!
!
!
!
I
!
!
!
!
I
!
!
!
!
!
!
I
I
I
!
!
!
I
I
I
!
I
I
I
I
8/64:30MI
I
I
I
F W - 172
A22-6821-1
"o
_
O.
,C