number of digits allowed is recognized as a decimal

divide exception. The operation is suppressed, and a

program interruption occurs. Divisor and dividend re

main unchanged in their storage locations.

The divisor and dividend fields may overlap only if

their

Addressing

Protection

Specification

Data

Decimal divide

Programming Note

The maximum dividend size is 31 digits and sign.

Since the smallest remainder size is one digit and sign,

the maximum quotient size is 29 digits and sign.

The condition for a divide exception can be deter

mined by a trial subtraction. The leftmost digit of the

divisor field is aligned with the leftmost-less-one digit

of the dividend field. When the divisor, so aligned, is

less than or equal to the dividend, a divide exception

is indicated.

A decimal-divide exception occurs if the dividend

does not have at least one leading zero.

Pack

PACK

7 8 11 12 1516

The format of the second operand is changed from

zoned to packed, and the result is placed in the first

operand location.

The second operand is assumed to have the zoned

format. All zones are ignored, except the zone over the

low-order digit, which is assumed to represent a sign.

The sign is placed in the right four bits of the low

order byte, and the digits are placed adjacent to the

sign and to each other in the remainder of the result

field.

first operand field and are not checked for valid codes.

The fields are processed right to left. If necessary,

the second operand is extended with high-order zerO's.

If the first operand field is too short to contain all

significant digits of the second operand field, the re

maining digits are ignored.

occur and are processed by storing each result byte

immediately after the necessary operand bytes are

fetched.

38

Condition Code: The code remains unchanged.

Protection

Addressing

Unpack

UNPK

7 8 11 12 1516

The format of the second operand is changed from

packed to zoned, and the result is placed in the first

aperand lacation.

The digits and sign of the packed operand are

placed unchanged in the first operand location, using

the zoned format. Zones with coding 1111 in the bin

aJ'y-coded-decimal mode and coding

byte, which receives the sign of the packed operand.

The operand sign and digits are not checked for valid

codes.

The fields are processed right to left. The second

operand is extended with zero digits before unpack

ing, if necessary. If the first operand field is too short

to contain all significant digits of the second operand,

the remaining digits are ignored. The first and second

operand fields may overlap and are processed by stor

ing a result byte immediately after the necessary op

erand bytes are fetched.

Condition Code: The code remains unchanged.

Addressing

Protection

Move with Offset

The second operand is placed to the left of and ad

jacent to the low-order four bits of the first operand.

The low-order four bits of the first operand are at

tached as low-order bits to the second operand, the

second operand bits are offset by four bit positions,

and the result is placed in the first operand location.

The first and second operand bytes are not checked

for valid codes.

The fields are processed right to left. If necessary,

the second operand is extended with high-order