Download Print this page

Edit And Mark; Multiply Decimal - IBM 4300 Manual

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

Advertisement

EDIT AND MARK
EOMK
0,(L,B,),02(B2)
[55]
/
I
B2
I
/
'OF'
L
I
B,
I
0,
~iJ
/
0
8
'6
20
32
36
47
The second operand (the source), which normally
contains one or more decimal numbers in the
packed format, is changed to the zoned format and
modified under the control of the first operand (the
pattern). The address of each first significant
result byte is inserted in general register 1. The
edited result replaces the pattern.
The instruction EDIT AND MARK is identical
to EDIT, except for the additional function of
inserting the address of the result byte in bit
positions 8-31 of general register 1 whenever the
result byte is a zoned source digit and the
significance indicator was off before the
examination. Bits 0-7 of the register are not
changed.
Resulting Condition Code:
o
Last field is zero or of zero length
1
Last field is less than zero
2
Last field is greater than zero
3
Program Exceptions:
Access (fetch, operand 2; fetch and store,
operand 1)
Data
Programming Notes
1
1. Examples of the use of EDIT AND MARK are
given in Appendix A.
2. The instruction EDIT AND MARK facilitates
I
the programming of floating currency-symbol
insertion. The address inserted in general
register 1 is one greater than the address where
a floating currency-sign would be inserted. The
instruction BRANCH ON COUNT (BCTR),
with zero in the R2 field, may be used to
reduce the inserted address by one.
3. No address is inserted in general register 1
when the significance indicator is turned on as
a result of encountering a significance starter
with the corresponding source digit zero. To
ensure that general register 1 contains a valid
address when this occurs, the address of the
pattern byte that immediately follows the
significance starter should be placed in the
register beforehand.
4.
When multiple fields are edited with one EDIT
AND MARK instruction, the address inserted
in general register 1 applies only to the last
field edited.
S. See also the programming note under EDIT
regarding performance degradation due to a
possible trial execution.
MULTIPLY DECIMAL
MP
D,(L"B,),02(L2,B2)
[55]
I
L,
I
L2
I
B,
I
/
I
B2
I
~iJ
'Fe. '
0,
/
0
8
'2
'6
20
32
36
47
The product of the first operand (the multiplicand)
and the second operand (the multiplier) is placed in
the first-operand location. The operands and result
are in the packed format.
The multiplier length cannot exceed 15 digits
and sign (L 2 not greater than seven) and must be
less than the multiplicand length (L 2 less than L
1 );
otherwise a specification exception is recognized.
The operation is suppressed, and a program
interruption occurs.
The multiplicand must have at least as many
bytes of high-order zeros as the number of bytes in
the multiplier; otherwise, a data exception is
recognized, the operation is terminated, and a
program interruption occurs. This restriction
ensures that no product overflow occurs.
The multiplicand, multiplier, and product are all
signed decimal integers, right-aligned in their fields.
All sign and digit codes of the multiplicand and
multiplier are checked for validity.
The sign of the product is determined by the
rules of algebra from the multiplier and
multiplicand signs, even if one or both operands are
zeros.
Condition Code: The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2; fetch and store,
operand 1)
Chapter 8. Decimal Instructions
8-9

Advertisement

loading