Explanation: ¢ Causes serialization and checkpoint synchronization.
¢l Causes serialization and checkpoint synchronization when the Mt and R:z fields contain all ones and all zeros, respectively.
$ Causes serialization.
A Access exceptions for logical addresses.
AI Access exceptions for instruction address.
B PER branch event. BS Branch-and-save facility. C Condition code is set.
D Data exception.
EX Execute exception.
GM Instruction execution includes the implied use of general registers 1
and 2.
IF Fixed-point-overflow exception.
II Interruptible instruction.
IK Fixed-point-divide exception.
L Hew condition code is loaded.
MI Move-inverse facility. MO Monitor event.
R PER general-register-alteration event.
RR RR instruction format. RS RS instruction format.
RX RX instruction format. S S instruction format. SI SI instruction format. SP Specification exception. SS SS instruction format.
5T PER storage-alteration event. 5W Conditional-swapping facility. Summary of General Instructions (Part 3 of 3)
ADD
AR R 11 R2 [RR] , 1 A' I R t I R2 I 0 8 12 15
A Rt ,D:z(X
2
,B
2
)
[RX]
'SA' I R t I X:z I B2 D:z 0 8 12 16 20 31
The second operand is added to the first
operand, and the sum is placed at the
first-operand location. The operands
and the sum are treated as 32-bit signed
binary integers.
When there is an overflow, the result is
obtained by allowing any carry into the
sign-bit position and ignoring any carry
out of the sign-bit position, and condi­
tion code 3 is set. If the fixed­
point-overflow mask is one, a program
interruption for fixed-point overflow
occurs.
Resulting Condition Code: o Result zero; no overflow
1
2
3
Result less than zero; no over­
flow
Result greater than zero; no
overflow Overflow Program Exceptions:
Access (fetch, operand 2 of A only)
Fixed-point overflow
ADD HALFWORD AH [RX]
'4A'
o 8 12 16 20 31
The second operand is added to the first
operand, and the sum is placed at the
first-operand location. The second
operand is two bytes in length and;s
treated as a 16-bit signed binary inte­
ger. The first operand and the sum are
treated as 32-bit signed binary
integers.
When there is an overflow, the result is
obtained by allowing any carry into the
sign-bit position and ignoring any carry
out of the sign-bit position, and condi­
tion code 3 is set. If the fixed- Chapter 7. General Instructions 7-7
point-overflow mask is one, a program AND interruption for fixed-point overflow
occurs.
Resulting Condition Code: 0 Result zero; no overflow
1 Result less than zero; no over-
flow
2 Result greater than zero; no
overflow
3 Overflow
Program Exceptions:
Access (fetch, operand 2)
Fixed-point overflow
Programming Note
An example of the use of the ADD HAlF­ WORD instruction is given in Appendix A.
ADD LOGICAL AlR R t , R:z [RR] 'IE' I R t I R2 I 0 8 12 15
AL Rt,D:z(X:z,B:z) [RX]
'5E' I R t I X 2 I B2 O 2 0 8 12 16 20 31
The second operand is added to the first
operand, and the sum is placed at the
first-operand location. The operands
and the sum are treated as 32-bit
unsigned binary integers.
Resulting Condition Code: o Result zero; no carry
1 Result not zero; no carry
2 Result zero; carry
3 Result not zero; carry
Program Exceptions:
Access (fetch, operand 2 of Al
only)
7-8 System/370 Principles of Operation NR [RR]
' 14 ' I R t I R2 I 0 8 12 15 N R"D 2 (X:z,B:z) [RX]
'54'
o 8 12 16 20 31 NI [5I]
'94'
o 8 16 20 31 NC [55] ,--_' D_4 _' ----'-- __ l_ ...... I_B_t I B 2 I o 8 16 20 32 36 47
The AND of the first and second operands
is placed at the first-operand location.
The connective AND is applied to the
operands bit by bit. A bit position in
the result is set to one if the corre­
sponding bit positions in both operands
contain ones; otherwise, the result bit
is set to zero.
For AND (NC), each operand is processed
left to right. When the operands over­
lap, the result is obtained as if the
operands were processed one byte at a
time and each result byte were stored
immediately after fetching the necessary
operand bytes.
For AND (NI), the first operand is one
byte in length, and only one byte is
stored.
Resulting Condition Code: o
1
2
3
Result zero
Result not zero
Program Exceptions:
Access (fetch, operand 2, Nand NC; fetch and store, operand 1, NI and NC)
Previous Page Next Page