CHAPTER 3 CPU FUNCTIONS
(4) Program status word (PSW)
A 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.
(1/2)
31
8 7 6 5 4 3 2 1 0
After reset
00000020H
PSW
RFU
NP EP ID SAT CY OV S Z
Bit position Flag name
Description
31 to 8
7
RFU
NP
Reserved field. Fixed to 0.
Indicates that non-maskable interrupt (NMI) servicing is in progress. This flag is set to 1 when
an 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
4
ID
Indicates whether maskable interrupt request acknowledgment is enabled.
0: Interrupt enabled
1: Interrupt disabled
SATNote
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
2
1
0
CY
Indicates whether carry or borrow occurred as the result of an operation.
0: No carry or borrow occurred
1: Carry or borrow occurred
OVNote
SNote
Z
Indicates whether overflow occurred during an operation.
0: No overflow occurred
1: Overflow occurred.
Indicates whether the result of an operation is negative.
0: Operation result is positive or 0.
1: Operation result is negative.
Indicates whether operation result is 0.
0: Operation result is not 0.
1: Operation result is 0.
Remark Note is explained on the following page.
User’s Manual U15862EJ3V0UD
104