area cannot be used. Because TEST AND SET per
mits no otherCPU access to the test byte between
the moment of fetching (for testing) and the mo
ment of storing all ones (setting), the possibility is
eliminated of a second program's testing the byte
before the first program is able to set it.
It should-be noted that TEST AND SET does not
interlock against storage accesses by channels.
Test Under Mask
TMlSI] 91 D1
o 8 1620 31
Thestat6Jt)f the first-operand bits selected by a mask
is used to set the condition code.
The byte of immediate data,12, is used as an
eight-bit mask. The bits of the mask are made to
correspond one for one with the bits of the character
in storage specified by the first-operand address.
A mask bit of one indicates that the storage bit is
to be tested. When the mask bit is ,zero, the storage
bit is ignored. When all storage bits thus selected
are zero, the condition code is madeO. The code is
also made0 when the mask is all zeros. When the
selected bits are all ones, the code is made 3; other
wise, the code is made 1. The character in storage is
not changed.
Access exceptions associated with the storage
operand are recognized for one byte, even when the
mask is all zeros.
Resulting Condition Code:
o Selected bits all zeros; or the mask is all zeros
1 Selected bits mixed zeros and ones
2 -
3 Selected bits all ones
Program Exceptions:
Access (fetch, operand 1)
Translate
[SS]
The eight-bit bytes of the first operand are used as
arguments to reference the list designated by the
second-operand address. Each eight-bit function
byte selected from the list replaces the correspond
ing argument in thefirst operand.
The L field applies only to the first operand.
The bytes of the first operand are selected one by
one for translation, proceeding left to right. Each
argument byte is added to the initial second-operand
address. The addition is performed following the
rules for address arithmetic, with the argument byte
treated as an eight-bit unsigned integer and extended
with high-order zeros. The sum is used as the ad
dress of the function byte, which then replaces the
original argument byte.
The operation proceeds until the first-operand
field is exhausted. The list is not altered unless an
overlap occurs.
When the operands overlap, the result is obtained
as if each result byte were stored immediately after
the corresponding function byte is fetched.
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2; fetch and store, oper
and 1)PTogranumrnng The instruction TRANSLATE may be used to con
vert data from one code to another code.
Another purpose for which the instruction may be
used is to rearrange data. This may be accomplished
by placing a pattern in the destination area, by desig
nating the pattern as the first operand of TRANS
LATE, and by designating the data that is to be re
arranged as the second operand. Each byte of the
pattern contains an eight-bit number specifying the
byte destined for this position. Thus, when the in
struction is executed, the pattern selects the bytes of
the second operand in the desired order.
Because the eight-bit argument byte is added to
the initial second-operand address to obtain the ad
dress of a function byte, the list may contain 256
bytes. In cases where it is known that not all eight
bit argument values will occur, it is possible to re
duce the size of the list.
The fetch and subsequent store accesses to a par
ticular byte in the first-operand field do not neces
sarily occur one immediately after the other.
Translate and TestLo-.-D---LD _L-----'----1-..fB, I 8 16 20 32 36 47 o
General Instructions 145
mits no other
the moment of fetching (for testing) and the mo
ment of storing all ones (setting), the possibility is
eliminated of a second program's testing the byte
before the first program is able to set it.
It should-be noted that TEST AND SET does not
interlock against storage accesses by channels.
Test Under Mask
TM
o 8 16
The
is used to set the condition code.
The byte of immediate data,
eight-bit mask. The bits of the mask are made to
correspond one for one with the bits of the character
in storage specified by the first-operand address.
A mask bit of one indicates that the storage bit is
to be tested. When the mask bit is ,zero, the storage
bit is ignored. When all storage bits thus selected
are zero, the condition code is made
also made
selected bits are all ones, the code is made 3; other
wise, the code is made 1. The character in storage is
not changed.
Access exceptions associated with the storage
operand are recognized for one byte, even when the
mask is all zeros.
Resulting Condition Code:
o Selected bits all zeros; or the mask is all zeros
1 Selected bits mixed zeros and ones
2 -
3 Selected bits all ones
Program Exceptions:
Access (fetch, operand 1)
Translate
[SS]
The eight-bit bytes of the first operand are used as
arguments to reference the list designated by the
second-operand address. Each eight-bit function
byte selected from the list replaces the correspond
ing argument in the
The L field applies only to the first operand.
The bytes of the first operand are selected one by
one for translation, proceeding left to right. Each
argument byte is added to the initial second-operand
address. The addition is performed following the
rules for address arithmetic, with the argument byte
treated as an eight-bit unsigned integer and extended
with high-order zeros. The sum is used as the ad
dress of the function byte, which then replaces the
original argument byte.
The operation proceeds until the first-operand
field is exhausted. The list is not altered unless an
overlap occurs.
When the operands overlap, the result is obtained
as if each result byte were stored immediately after
the corresponding function byte is fetched.
Condition Code:
The code remains unchanged.
Program Exceptions:
Access (fetch, operand 2; fetch and store, oper
and 1)
vert data from one code to another code.
Another purpose for which the instruction may be
used is to rearrange data. This may be accomplished
by placing a pattern in the destination area, by desig
nating the pattern as the first operand of TRANS
LATE, and by designating the data that is to be re
arranged as the second operand. Each byte of the
pattern contains an eight-bit number specifying the
byte destined for this position. Thus, when the in
struction is executed, the pattern selects the bytes of
the second operand in the desired order.
Because the eight-bit argument byte is added to
the initial second-operand address to obtain the ad
dress of a function byte, the list may contain 256
bytes. In cases where it is known that not all eight
bit argument values will occur, it is possible to re
duce the size of the list.
The fetch and subsequent store accesses to a par
ticular byte in the first-operand field do not neces
sarily occur one immediately after the other.
Translate and Test
General Instructions 145