S5-95F
STEP 5 Operations
8.2.5
Shift Operations
Shift operations shift a bit pattern in ACCU 1. The contents of ACCU 2 are not affected. Shifting
multiplies or divides the contents of ACCU 1 by powers of two. Table 8-15 provides an overview of
the shift operations. Examples follow the table.
Table 8-15. Overview of Shift Operations
Operation
Meaning
Parameter
0 to 15
Operand
Shift to the left.
The bit pattern in ACCU 1 is shifted to the left.
Shift to the right.
The bit pattern in ACCU 1 is shifted to the right.
SLW
SRW
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a
Processing a Shift Operation
Execution of shift operations is unconditional. The RLO is not affected. However, shift operations
set condition codes.
Consequently, the status of the last bit that is shifted out can be scanned with jump functions.
The shift statement parameter indicates the number of bit positions by which the contents of
ACCU 1 are to be shifted to the left (SLW) or to the right (SRW). Bit positions vacated during
shifting are assigned zeros.
The contents of the bits that are shifted out of ACCU 1 are lost. Following execution of the
operation, the state of bit 2
0
(SRW) or bit 2
15
(SLW) has an influence on the CC1 bit, which can
then be evaluated.
A shift operation with parameter “0” is handled like a “NOP” operation. The central processor pro-
cesses the next STEP 5 statement with no further reaction.
Before executing a shift operation, load the operand to be processed into ACCU 1.
The altered operand is available there for further processing.
EWA 4NEB 812 6210-02
8-47