Siemens SIMATIC S5-95F Manual page 249

Table of Contents

Advertisement

S5-95F
Condition Code Generation for Digital Logic Operations
Digital logic operations set CC 0 and CC 1. They do not affect the overflow condition code (see
Table 8-32). The setting depends on the contents of the ACCU after the operation has been pro-
cessed.
Table 8-32. Condition Code Settings for Digital Logic Operations
Contents
of the
ACCU
Zero (KH = 0000)
Not zero
Condition Code Generation for Shift Operations
Execution of shift operations sets CC 0 and CC 1. It does not affect the overflow condition code
(see Table 8-33).
Code setting depends on the state of the last bit shifted out.
Table 8-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 (see Table 8-34). The state
of the condition codes is based on the result of the conversion function.
Table 8-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 812 6210-02
Condition Codes
CC 1
CC 0
0
0
1
0
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
JZ
JN, JP
Possible
Jump Operations
OV
1
JN, JM, JO
0
JN, JM
0
JZ
0
JN, JP
8-69

Advertisement

Table of Contents
loading

Table of Contents