Download Print this page

Edit - IBM 4300 Manual

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

Advertisement

When the divisor, so aligned, is less than or
equal to the dividend, a divide exception is
indicated.
A decimal-divide exception always occurs when
the leftmost dividend digit is not zero.
EDIT
ED
[55]
~------~------~--~~/--~--~--/
L--'_D E_' --,-_ _ L ----I.1_B_1
-l..1_~
1
I
B 2
I
~~
o
8
16
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 edited result replaces the first
operand.
The length field specifies the length of the first
operand, which may contain bytes of any value.
The length of the source is determined by the
operation according to the contents of the pattern.
The source has the packed format. The leftmost
four bits of each source byte must specify a decimal
digit code (0000-1001); a sign code (1010-1111)
is recognized as a data exception. The rightmost
four bits may specify either a sign or a decimal
digit. Access and data exceptions are recognized
only for those bytes in the second operand which
are actually required.
The result is obtained as if both operands were
processed left to right one byte at a time.
Overlapping pattern and source fields give
unpredictable results.
During the editing process, each byte of the
pattern is affected in one of three ways:
1. It
is left unchanged.
2.
It
is replaced by a source digit expanded to the
zoned format.
3.
It
is replaced by the first byte in the pattern,
called the fill byte.
Which of the three actions takes place is
determined by one or more of the following: the
type of the pattern byte, the state of the
significance indicator, and whether the source digit
examined is zero.
Pattern Bytes: There are four types of pattern
bytes: digit selector, significance starter, field
8-6
IBM 4300 Processors Principles of Operation
separator, and message byte. Their coding is as
follows:
Name
Code
Digit selector
0010 0000
Significance starter
0010 0001
Field separator
OQ10 0010
Message byte
Any other
The detection of either a digit selector or a
significance starter in the pattern causes an
examination to be made of the significance
indicator and of a source digit. As a result, either
the expanded source digit or the fill byte, as
appropriate, is selected to replace the pattern byte.
Additionally, encountering a digit selector or a
significance starter may cause the significance
indicator to be changed.
The field separator identifies individual fields in
a multiple-field editing operation.
It
is always
replaced in the resuit by the fill byte, and the
significance indicator is always off after the field
separator is encountered.
'
Message bytes in the pattern are either replaced
by the fill byte or remain unchanged in the result,
depending on the state of the significance indicator.
They may thus
pe
used for padding, punctuation, or
text in the significant portion of a field or for the
insertion of sign-dependent symbols.
Fill Byte: The first byte of the pattern is used as
the fill byte. The fill byte can have any code and
may concurrently specify a control function. If this
byte is a digit selector or significance starter, the
indicated editing action is taken after the code has
been assigned to the fill byte.
Source Digits: . Each time a digit selector or
significance starter is encountered in the pattern, a
new source digit is examined for placement in the
pattern field. Either the source digit is disregarded,
or it is expanded to the zoned format, by
appending the zone code 1111 on the left, and
stored in place of the pattern byte.
The source digits are selected one byte at a time,
and a source byte is fetched for inspection only
once during an editing operation. Each source digit
is examined only once for a zero value. The
leftmost four bits of each byte are examined first,
I
and the rightmost four bits, when they represent a

Advertisement

loading