91
Chapter 3
CPU Functions
User’s Manual U16580EE3V1UD00
(4)
Program status word (PSW)
The program status word (PSW) is a collection of flags that indicate the program status
(instruction execution result) and the CPU status.
When the contents of this register are changed using the LDSR instruction, the new contents
become valid immediately following completion of the LDSR instruction execution. However, if the
ID flag is set to 1, interrupt request acknowledgement during LDSR instruction execution is
prohibited.
Bits 31 to 8 are reserved (fixed to 0) for future function expansion.
Figure 3-6:
Program Status Word (PSW)
Note:
During saturated operation, the saturated operation results are determined by the contents of
the OV flag and S flag. The SAT flag is set to 1 only when the OV flag is set to 1 during
saturated operation. This is explained on the following table.
31
26 25
8 7 6 5
4
3 2 1 0
After reset
00000020H
PSW
RFU
NP EP ID SAT CY OV S Z
Bit position
Bit name
Description
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 to
1 when a NMI request is acknowledged, and disables multiple interrupts.
0: NMI servicing not in progress
1: NMI servicing in progress
6
EP
Indicates that exception processing is in progress. This flag is set to 1 when an
exception occurs. Moreover, interrupt requests can be acknowledged even when this
bit is set.
0: Exception processing not in progress
1: Exception processing in progress
5
ID
Indicates whether maskable interrupt request acknowledgment is enabled.
0: Interrupt enabled
1: Interrupt disabled
4
SAT
Note
Indicates that the result of executing a saturated operation instruction has overflowed
and that the calculation result is saturated. Since this is a cumulative flag, it is set to 1
when the result of a saturated operation instruction becomes saturated, and it is not
cleared to 0 even if the operation results of successive instructions do not become
saturated. This flag is neither set nor cleared when arithmetic operation instructions
are executed.
0: Not saturated
1: Saturated
3
CY
Indicates whether carry or borrow occurred as the result of an operation.
0: No carry or borrow occurred
1: Carry or borrow occurred
2
OV
Note
Indicates whether overflow occurred during an operation.
0: No overflow occurred
1: Overflow occurred.
1
S
Note
Indicates whether the result of an operation is negative.
0: Operation result is positive or 0.
1: Operation result is negative.
0
Z
Indicates whether operation result is 0.
0: Operation result is not 0.
1: Operation result is 0.
Summary of Contents for V850E/PH2
Page 6: ...6 Preface User s Manual U16580EE3V1UD00...
Page 16: ...16 User s Manual U16580EE3V1UD00...
Page 28: ...28 User s Manual U16580EE3V1UD00...
Page 32: ...32 User s Manual U16580EE3V1UD00...
Page 84: ...84 Chapter 2 Pin Functions User s Manual U16580EE3V1UD00 MEMO...
Page 144: ...144 Chapter 3 CPU Functions User s Manual U16580EE3V1UD00 MEMO...
Page 192: ...192 Chapter 5 Memory Access Control Function PD70F3187 only User s Manual U16580EE3V1UD00 MEMO...
Page 312: ...312 Chapter 9 16 Bit Timer Event Counter P User s Manual U16580EE3V1UD00 MEMO...
Page 534: ...534 Chapter 11 16 bit Timer Event Counter T User s Manual U16580EE3V1UD00...
Page 969: ...969 Chapter 20 Port Functions User s Manual U16580EE3V1UD00 MEMO...
Page 970: ...970 Chapter 20 Port Functions User s Manual U16580EE3V1UD00...
Page 976: ...976 Chapter 22 Internal RAM Parity Check Function User s Manual U16580EE3V1UD00 MEMO...
Page 984: ...984 Chapter 23 On Chip Debug Function OCD User s Manual U16580EE3V1UD00 MEMO...
Page 1006: ...1006 Chapter 24 Flash Memory User s Manual U16580EE3V1UD00 MEMO...
Page 1036: ...1036 Chapter 27 Recommended Soldering Conditions User s Manual U16580EE3V1UD00 MEMO...
Page 1046: ...1046 Appendix A Index User s Manual U16580EE3V1UD00 MEMO...
Page 1052: ...1052 User s Manual U16580EE3V1UD00...
Page 1053: ......