Siemens CPU 948 Programming Manual page 133

Simatic s5 s5-155u
Table of Contents

Advertisement

Shift operations
Table 3-22
Shift operations
Operation
Operand
SLW
0 to 15
SRW
0 to 15
SLD
0 to 32
SSW
0 to 15
SSD
0 to 32
RLD
0 to 32
RRD
0 to 32
CPU 948 Programming Guide
C79000-G8576-C848-04
Function (operation with ACCU 1)
Shift a word to the left (vacant positions
to the right are padded with zeros)
Shift a word to the right (vacant position
to the left are padded with zeros)
Shift a double word to the left (vacant positions
to the right are padded with zeros)
Shift a word with sign to the right (vacant positions
to the left are padded with the sign - bit 15)
Shift a double word with sign to the right (vacant
positions to the left are padded with the sign - bit 31)
Rotate to the left
Rotate to the right
Only ACCU 1 is involved in the execution of shift operations. The
parameter part of these operations specifies the number of positions by
which the accumulator contents should be shifted or rotated. For the
SLW, SRW and SSW operations, only the low word of ACCU 1 is
involved in the shift operations. For SLD, SSD, RLD and RRD
operations, the entire contents of ACCU 1 (32 bits) are involved.
Shift operations are executed regardless of conditions.
You can use jump operations to scan the value of the last bits shifted
out using CC 1/CC 0.
Shift: last
bit shifted
0
1
Executive Operations
CC 1
CC 0
0
0
1
0
Jump operation
JZ=
JN=
JP=
3 - 61

Advertisement

Table of Contents
loading

Table of Contents