Siemens SIMATIC S5 Manual page 167

Hide thumbs Also See for SIMATIC S5:
Table of Contents

Advertisement

S5-115F Manual
Conditon code generation for shift operations
Execution of shift operations sets CC 0 and CC 1. It does not affect the overflow condition code
( Table 3-33).
Code setting depends on the state of the last bit shifted out.
Table 3-33. Condition Code Settings for Shift Operations
Value of
the last bit
shifted out
"0"
"1"
Condition code generation for conversion operations
The formation of the two's complement (CSW) sets all condition codes ( Table 3-34). The state of
the condition codes is based on the result of the conversion function.
Table 3-34. Condition Code Settings for Conversion Operations
Result after
arithmetic operation
is executed
- 32768
*
- 32767 to - 1
0
+1 to +32767
* This number is the result of the conversion of KH = 8000.
EWA 4NEB 811 6149-02
Condition codes
CC 1
CC 0
0
0
1
0
Condition codes
CC 1
CC 0
0
1
0
1
0
0
1
0
STEP 5 Operations
Possible
jump operations
OV
JZ
JN, JP
Possible
jump operations
OV
1
JN, JP, JO
0
JN, JM
0
JZ
0
JN, JP
3-71

Advertisement

Table of Contents
loading

This manual is also suitable for:

S5-115f

Table of Contents