
The central processing unit (CPU)
UM0404
68/564
DocID13284 Rev 2
PSW (FF10h / 88h)
SFR
Reset Value: 0000h
ALU status (N, C, V, Z, E, MULIP)
The condition flags (N, C, V, Z, E) within the PSW indicate the ALU status due to the last
performed ALU operation. They are set by most of the instructions due to specific rules,
which depend on the ALU or data movement operation performed by an instruction.
After execution of an instruction which explicitly updates the PSW register, the condition
flags cannot be interpreted as described in the following, because any explicit write to the
PSW register supersedes the condition flag values, which are implicitly generated by the
CPU.
Explicitly reading the PSW register supplies a read value which represents the state of the
PSW register after execution of the immediately preceding instruction.
Note:
After reset, all of the ALU status bits are cleared.
N-Flag:
For most of the ALU operations, the N-flag is set to '1' if the most significant bit of
the result contains a '1', otherwise it is cleared. In the case of integer operations the N-flag
can be interpreted as the sign bit of the result (negative: N=’1’, positive: N=’0’). Negative
numbers are always represented as the 2's complement of the corresponding positive
number. The range of signed numbers extends from '–8000h' to '+7FFFh' for the word data
type, or from '–80h' to '+7Fh' for the byte data type. For Boolean bit operations with only one
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
ILVL
IEN
HLD
EN
-
-
-
USR0
MUL
IP
E
Z
V
C
N
RW
RW
RW
RW
RW
RW
RW
RW
RW
RW
Bit
Function
N
Negative Result
Set when the result of an ALU operation is negative.
C
Carry Flag
Set when the result of an ALU operation produces a carry bit.
V
Overflow Result
Set when the result of an ALU operation produces an overflow.
Z
Zero Flag
Set when the result of an ALU operation is zero.
E
End of Table Flag
Set when the source operand of an instruction is 8000h or 80h.
MULIP
Multiplication/Division In Progress
‘0’: There is no multiplication/division in progress.
‘1’: A multiplication/division has been interrupted.
USR0
User General Purpose Flag
May be used by the application software.
HLDEN,
ILVL, IEN
Interrupt and EBC Control Fields
Define the response to interrupt requests and enable external bus Arbitration
(Described in