
67
Chapter 3
CPU Function
User’s Manual U16702EE3V2UD00
(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 prohib-
ited.
Bits 31 to 8 are reserved (fixed to 0) for future function expansion.
Figure 3-6:
Program Status Word (PSW) Format (1/2)
Bit position
Flag name
Meaning
31 to 8
RFU
Reserved field. Fixed to 0.
7
NP
Indicates that a non-maskable interrupt (NMI) is being serviced. This bit is set to 1
when an NMI request is acknowledged, disabling multiple interrupts.
0: NMI is not being serviced.
1: NMI is being serviced.
6
EP
Indicates that an exception is being processed. This bit is set to 1 when an excep-
tion occurs. Even if this bit is set, interrupt requests are acknowledged.
0: Exception is not being processed.
1: Exception is being processed.
5
ID
Indicates whether a maskable interrupt can be acknowledged.
0: Interrupt enabled
1: Interrupt disabled
4
SAT
Note
Indicates that the result of a saturation operation has overflowed and is saturated.
Because this is a cumulative flag, it is set to 1 when the result of a saturation opera-
tion instruction is saturated, and is not cleared to 0 even if the subsequent operation
result is not saturated. Use the LDSR instruction to clear this bit. This flag is neither
set to 1 nor cleared to 0 by execution of an arithmetic operation instruction.
0: Not saturated
1: Saturated
3
CY
Indicates whether a carry or a borrow occurs as a result of an operation.
0: Carry or borrow does not occur.
1: Carry or borrow occurs.
2
OV
Note
Indicates whether an overflow occurs during operation.
0: Overflow does not occur.
1: Overflow occurs.
1
S
Note
Indicates whether the result of an operation is negative.
0: The result is positive or 0.
1: The result is negative.
0
Z
Indicates whether the result of an operation is 0.
0: The result is not 0.
1: The result is 0.
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
0
PSW
RFU
After reset
00000021H
8 7
NP
6
EP
5
ID
4
SAT
3
CY
2
OV
1
S Z
electronic components distributor
Содержание V850E/RS1
Страница 6: ...6 User s Manual U16702EE3V2UD00 Downloaded from Elcodis com electronic components distributor...
Страница 206: ...206 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 232: ...232 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 366: ...366 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 402: ...402 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 684: ...684 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 766: ...766 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 798: ...798 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 832: ...832 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 834: ...834 User s Manual U16702EE3V2UD00 MEMO Downloaded from Elcodis com electronic components distributor...
Страница 848: ...848 User s Manual U16702EE3V2UD00 Downloaded from Elcodis com electronic components distributor...
Страница 852: ...Downloaded from Elcodis com electronic components distributor...