Download Print this page

Add Decimal - IBM 4300 Manual

Processors principles of operation for ecps: vse mode
Hide thumbs Also See for 4300:

Advertisement

Mne-
Name
monic
ADD DEC I
t~AL
AP
SS
COMPARE DECIMAL
CP
SS
DIVIDE DECIMAL
DP
SS
EDIT
ED
SS
EDIT AND MARK
EDMK
SS
MULTIPLY DECIMAL
MP
SS
SHIFT AND ROUND DECIMAL
SRP
SS
SUBTRACT DECIMAL
SP
SS
ZERO AND ADD
ZAP
SS
Explanation:
A
Access exceptions
C
Condition code is set
0
Data exception
OF
Decimal-overflow exception
OK
Decimal-divide exception
R
PER general-register-alteration event
SP
Specification exception
SS
SS instruction format
ST
PER storage-alteration event
r
Summary of Decimal Instructions
ADD DECIMAL
AP
D1(L1,B1),D2(L2,B2)
[SS]
ILl I L2 I B 1
I
/
I
B2
I
~iJ
'FA'
°1
/
0
8
12
16
20
32
36
47
The second operand is added to the first operand,
and the resulting sum is placed in the first-operand
location. The operands and result are in the
packed format.
Addition is algebraic, taking into account the
signs and all digits of both operands. All sign and
digit codes are checked for validity.
If the first operand is too short to contain all
significant digits of the sum, decimal overflow
occurs. The operation is completed. The result is
obtained by ignoring the overflow information, and
condition code 3 is set. If the decimal-overflow
mask is one, a program interruption for decimal
overflow takes place.
8-4
IBM 4300 Processors Principles of Operation
Op
Characteristics
Code
C
A
0
OF
ST. FA
C
A
0
F9
A SP
0
OK
ST FD
C
A
0
ST DE
C
A
0
R ST OF
A SP
0
ST FC
C
A
0
OF
ST FO
C
A
0
OF
ST FB
C
A
0
OF
ST F8
The sign of the sum is determined by the rules of
algebra. When the operation is completed without
an overflow, a zero sum has a positive sign. When
high-order digits are lost because of an overflow, a
zero result may be either positive or negative, as
determined by what the sign of the correct sum
would have been.
Resulting Condition Code:
o
Sum is zero
1
Sum is less than zero
2
Sum is greater than zero
3
Overflow
Program Exceptions:
Access (fetch, operand 2; fetch and store,
operand 1)
Data
Decimal Overflow
I
Programming Note
An example of the use of ADD DECIMAL is given
in Appendix A.

Advertisement

loading