CHAPTER 3 CPU FUNCTION
66
User’s Manual U14492EJ3V0UD
(2) Program status word (PSW)
31
0
PSW
RFU
Initial value
00000020H
8 7
NP
6
EP
5
ID
4
SAT
3
CY
2
OV
1
S Z
Bit Position
Flag
Function
31 to 8
RFU
Reserved field (fixed to 0).
7
NP
Indicates that non-maskable interrupt (NMI) servicing is in progress. This flag is
set when an NMI is acknowledged, and disables multiple interrupts.
0: NMI servicing not under execution.
1: NMI servicing under execution.
6
EP
Indicates that exception processing is in progress. This flag is set when an
exception is generated. Moreover, interrupt requests can be acknowledged
when this bit is set.
0: Exception processing not under execution.
1: Exception processing under execution.
5
ID
Displays whether a maskable interrupt request can be acknowledged or not.
0: Interrupt enabled. (EI)
1: Interrupt disabled. (DI)
4
SAT
Note
Displays that the operation result of a saturated operation processing instruction
is saturated due to overflow. Due to the cumulative flag, if the operation result is
saturated by the saturation operation instruction, this bit is set (1), but is not
cleared (0) even if the operation results of subsequent instructions are not
saturated. To clear (0) this bit, load the data in PSW. Note that in a general
arithmetic operation, this bit is neither set (1) nor cleared (0).
0: Not saturated.
1: Saturated.
3
CY
This flag is set if carry or borrow occurs as result of an operation (if carry or
borrow does not occur, it is reset).
0: Carry or borrow does not occur.
1: Carry or borrow occurs.
2
OV
Note
This flag is set if an overflow occurs during operation (if overflow does not occur,
it is reset).
0: Overflow does not occur.
1: Overflow occurs.
1
S
Note
This flag is set if the result of an operation is negative (it is reset if the result is
positive).
0: The operation result was positive or 0.
1: The operation result was negative.
0
Z
This flag is set if the result of an operation is zero (if the result is not zero, it is
reset).
0: The operation result was not 0.
1: The operation result was 0.
Note
The result of a saturation-processed operation is determined by the contents of the OV and S flags in the
saturation operation. Simply setting the OV flag (1) will set the SAT flag (1) in a saturation operation.
Flag Status
Status of Operation Result
SAT
OV
S
Saturation-Processed
Operation Result
Maximum positive value exceeded
1
1
0
7FFFFFFFH
Maximum negative value exceeded
1
1
1
80000000H
Positive (not exceeding the maximum)
0
Negative (not exceeding the maximum)
Retain
the value
before
operation
0
1
Operation result itself
Содержание V850E/IA1 mPD703116
Страница 2: ...2 User s Manual U14492EJ3V0UD MEMO...