Page of G A22-7 0004 Revis.ed September 1, 1975
By TNL: GN22-0498
The eight-bit bytes of the first operand are used as
arguments to reference the list designated by the
second-operand address.
The L field applies only to the first operand.
Each eight-bit function byte thus selected from
the list is used to determine the continuation of the
operation. When the function byte is a zero, the
operation proceeds by fetching and translating the
next argument byte. When the function byte is
nonzero, the operation is completed by inserting the
relat.ed argument address in general register 1 and by
inserting the function byte in general register 2.
The bytes of the first operand are selected one by
one for translation, proceeding from left to right.
The first operand remains unchanged in storage.
Fetching of the function byte from the list is per
formed as in TRANSLATE. The function byte re
trieved from the list is inspected for the all-zero
combination.
When the function byte is zero, the operation
proceeds with the next operand byte. When the first
operand field is exhausted before a nonzero function
byte is encountered, the operation is completed by
setting condition codeO. The contents of general
registers 1 and 2 remain unchanged."'hen the function byte is nonzero, the related
argument address is inserted in the low-order 24 bits
ofgtmeral register 1. This address points to the ar gtim1ent last translated. The high-order eight bits of
register 1 remain unchanged. The function byte is
insetted in the low-order eight bits of general regis
ter 2. Bits 0-23 of register 2 remain unchanged.
Condition code 1 is set when one or more argu
ment bytes remain to be translated. Condition code
2 isset if the last function byte is the only nonzero
byte.Resu'iting Condition Code:
o All function bytes are zero
1 Nonzero function byte before the first operand
field is exhausted
2 The last function byte is the only nonzero byte
3 -Pros'ram Exceptiom: Access (fetch, operands 1 and 2)
Programming Note
The instruction TRANSLATE AND TEST may be
used to scan the first operand for characters with
spedal meaning. The second operand, or list, is set
up with all-zero function bytes for those characters
to be skipped over and with nonzero function bytes
for the characters to be detected.
146System/370 Principles of Operation Unpack I F3 I L, I L2 I B, I o 8 12 16 20 32 36 47
The format of the second operand is changed from
packed to zoned, and the result is placed in the first
operand location.
The digits and sign of the packed operand are
placed unchanged in the first-operand location, using
the zoned format. Zones with coding of 1111 are
supplied for all bytes except the low-order byte,
which receives the sign of the packed operand. The
operand sign and digits are not checked for valid
codes.
The result is obtained as if the fields were pro
cessed right to left. The second operand is extended
with high-order zero digits before unpacking, if nec
essary. If the first-operand field is too short to con
tain all significant digits of the second operand, the
remaining high-order digits are ignored.
When the operands overlap, the result is obtained
as if the operands were processed one byte at a time
and each result byte were stored immediately after
the necessary operand byte is fetched. The entire
rightmost second-operand byte is used in forming
the first result byte. For the remainder of the field,
information for two result bytes is obtained from a
single second-operand byte, and the high-order digit
of the byte remains available and is not refetched.
Thus, two result bytes are stored immediately after
fetching a single operand byte.
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2; store, operand 1)
Programming Notes
A field that is to be unpacked can be destroyed by
improper overlapping. If it is desired to save storage
space for unpacking by overlapping the operand
fields, the low-order position of the first operand
must be to the right of the low-order position of the
second operand by the number of bytes in the sec
ond operand minus two. If only one or two bytes are. to be unpacked, the low-order positions of the two
operands may coincide.
By TNL: GN22-0498
The eight-bit bytes of the first operand are used as
arguments to reference the list designated by the
second-operand address.
The L field applies only to the first operand.
Each eight-bit function byte thus selected from
the list is used to determine the continuation of the
operation. When the function byte is a zero, the
operation proceeds by fetching and translating the
next argument byte. When the function byte is
nonzero, the operation is completed by inserting the
relat.ed argument address in general register 1 and by
inserting the function byte in general register 2.
The bytes of the first operand are selected one by
one for translation, proceeding from left to right.
The first operand remains unchanged in storage.
Fetching of the function byte from the list is per
formed as in TRANSLATE. The function byte re
trieved from the list is inspected for the all-zero
combination.
When the function byte is zero, the operation
proceeds with the next operand byte. When the first
operand field is exhausted before a nonzero function
byte is encountered, the operation is completed by
setting condition code
registers 1 and 2 remain unchanged.
argument address is inserted in the low-order 24 bits
of
register 1 remain unchanged. The function byte is
insetted in the low-order eight bits of general regis
ter 2. Bits 0-23 of register 2 remain unchanged.
Condition code 1 is set when one or more argu
ment bytes remain to be translated. Condition code
2 is
byte.
o All function bytes are zero
1 Nonzero function byte before the first operand
field is exhausted
2 The last function byte is the only nonzero byte
3 -
Programming Note
The instruction TRANSLATE AND TEST may be
used to scan the first operand for characters with
spedal meaning. The second operand, or list, is set
up with all-zero function bytes for those characters
to be skipped over and with nonzero function bytes
for the characters to be detected.
146
The format of the second operand is changed from
packed to zoned, and the result is placed in the first
operand location.
The digits and sign of the packed operand are
placed unchanged in the first-operand location, using
the zoned format. Zones with coding of 1111 are
supplied for all bytes except the low-order byte,
which receives the sign of the packed operand. The
operand sign and digits are not checked for valid
codes.
The result is obtained as if the fields were pro
cessed right to left. The second operand is extended
with high-order zero digits before unpacking, if nec
essary. If the first-operand field is too short to con
tain all significant digits of the second operand, the
remaining high-order digits are ignored.
When the operands overlap, the result is obtained
as if the operands were processed one byte at a time
and each result byte were stored immediately after
the necessary operand byte is fetched. The entire
rightmost second-operand byte is used in forming
the first result byte. For the remainder of the field,
information for two result bytes is obtained from a
single second-operand byte, and the high-order digit
of the byte remains available and is not refetched.
Thus, two result bytes are stored immediately after
fetching a single operand byte.
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2; store, operand 1)
Programming Notes
A field that is to be unpacked can be destroyed by
improper overlapping. If it is desired to save storage
space for unpacking by overlapping the operand
fields, the low-order position of the first operand
must be to the right of the low-order position of the
second operand by the number of bytes in the sec
ond operand minus two. If only one or two bytes are
operands may coincide.