Download Print this page

IBM 4300 Manual page 138

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

Advertisement

decimal-digit code, remain available for the next
pattern byte that calls for a digit examination.
When the leftmost four bits contain an invalid digit
code, the operation is terminated.
At the time the left digit of a source byte is
examined, the rightmost four bits are checked for
the existence of a sign code. When a sign code is
encountered in the rightmost four bit positions,
these bits are not treated as a decimal-digit code,
and a new source byte is fetched from storage
when the next pattern byte calls for a source-digit
examination.
When the pattern contains no digit selector or
significance starter, no source bytes are fetched and
examined.
Significance Indicator: The significance indicator
is turned on or off to indicate the significance or
nonsignificance, respectively, of subsequent source
digits or message bytes. Significant source digits
replace their corresponding digit selectors or
significance starters in the result. Significant
message bytes remain unchanged in the result.
The significance indicator, by its on or off state,
indicates also the negative or positive value,
respectively, of a completed source field and is used
as one factor in the setting of the condition code.
The indicator is set to off at the start of the
editing operation, after a field separator is
encountered, or after a source byte is examined
that has a plus code in the rightmost four bit
positions.
The indicator is set to on when a significance
starter is encountered whose source digit is a valid
decimal digit, or when a digit selector is
encountered whose source digit is a nonzero
decimal digit, provided that in both instances the
source byte does not have a plus code in the
rightmost four bit positions.
In all other situations, the indicator is not
changed. A minus sign code has no effect on the
significance indicator.
Result Bytes: The result of an editing operation
replaces and is equal in length to the pattern. It is
composed of pattern bytes, fill bytes, and zoned
source digits.
If the pattern byte is a message byte and the
significance indicator is on, the message byte
remains unchanged in the result. If the pattern
byte is a field separator or if the significance
indicator is off when a message byte is encountered
in the pattern, the fill byte replaces the pattern
byte in the result.
If the digit selector or significance starter is
encountered in the pattern with the significance
indicator off and the source digit zero, the source
digit is considered nonsignificant, and the fill byte
replaces the pattern byte. If the digit selector or
significance starter is encountered with either the
significance indicator on or with a nonzero decimal
source digit, the source digit is considered
significant, is changed to the zoned format, and
replaces the pattern byte in the result.
Condition Code: The sign and magnitude of the
last field edited are used to set the condition code.
The term "last field" refers to those source bytes in
the second operand selected by digit selectors or
significance starters after the last field separator.
When the pattern contains no field separator, there
is only one field, which is considered to be the last
field. The last field is considered to be of zero
length if no digit selectors or significance starters
appear in the pattern, if none appear after the last
field separator, or if the last byte in the pattern is a
field separator.
Condition code 0 is set when the last field is
zero or of zero length.
Condition code 1 is set when the last field edited
is nonzero and the significance indicator is on,
indicating a result less than zero.
Condition code 2 is set when the last field edited
is nonzero and the significance indicator is off,
indicating a result greater than zero.
The figure "Summary of EDIT Functions"
summarizes the functions of the editing operation.
The leftmost four columns list all the significant
combinations of the four conditions that can be
encountered in the execution of an editing
operation. The rightmost two columns list the
action taken for each case-the type of byte placed
in the result field and the new setting of the
significance indicator.
Resulting Condition Code:
o
Last field. is zero or of zero length
1
Last fie.ld is less than zero
2
Last field is greater than zero
3
Program Exceptions:
Access (fetch, operand 2; fetch and store,
operand 1)
Data
Chapter 8. Decimal Instructions
8-7

Advertisement

loading