
C165UTAH
Central Processor Unit
Data Sheet
71
2001-02-23
Boolean bit operations with two operands the V-flag represents the logical ORing of the
two specified bits.
Table 12
Shift Right Rounding Error Evaluation
Z-Flag:
The Z-flag is normally set to '1', if the result of an ALU operation equals zero,
otherwise it is cleared.
For the addition and subtraction with carry the Z-flag is only set to '1', if the Z-flag already
contains a '1' and the result of the current ALU operation additionally equals zero. This
mechanism is provided for the support of multiple precision calculations.
For Boolean bit operations with only one operand the Z-flag represents the logical
negation of the previous state of the specified bit. For Boolean bit operations with two
operands the Z-flag represents the logical NORing of the two specified bits. For the
prioritize ALU operation the Z-flag indicates, if the second operand was zero or not.
E-Flag:
The E-flag can be altered by instructions, which perform ALU or data
movement operations. The E-flag is cleared by those instructions which cannot be
reasonably used for table search operations. In all other cases the E-flag is set
depending on the value of the source operand to signify whether the end of a search
table is reached or not. If the value of the source operand of an instruction equals the
lowest negative number, which is representable by the data format of the corresponding
instruction ('8000
H
' for the word data type, or '80
H
' for the byte data type), the E-flag is
set to '1', otherwise it is cleared.
MULIP-Flag:
The MULIP-flag will be set to '1' by hardware upon the entrance into an
interrupt service routine, when a multiply or divide ALU operation was interrupted before
completion. Depending on the state of the MULIP bit, the hardware decides whether a
multiplication or division must be continued or not after the end of an interrupt service.
The MULIP bit is overwritten with the contents of the stacked MULIP-flag when the
return-from-interrupt-instruction (RETI) is executed. This normally means that the
MULIP-flag is cleared again after that.
Note:
The MULIP flag is a part of the task environment! When the interrupting service
routine does not return to the interrupted multiply/divide instruction (ie. in case of
a task scheduler that switches between independent tasks), the MULIP flag must
be saved as part of the task environment and must be updated accordingly for the
new task before this task is entered.
C-Flag
V-Flag
Rounding Error Quantity
0
0
1
1
0
1
0
1
-
0 <
No rounding error
Rounding error
Rounding error
Rounding error
-
<
1
/
2
LSB
=
1
/
2
LSB
>
1
/
2
LSB