English
Language : 

PD17012_15 Datasheet, PDF (52/320 Pages) Renesas Technology Corp – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DIGITAL TUNING SYSTEM HARDWARE
µPD17012, 17P012
5.8.2 Function of program status word
The program status word is a register that sets the condition of an operation or transfer instruction of the ALU
(Arithmetic Logic Unit) or indicates the result of an executed operation.
Table 5-2 outlines the function of each flag of the program status word.
For details, refer to 7. ALU (Arithmetic Logic Unit) BLOCK.
Table 5-2. Functional Outline of Program Status Word
(RP)
Program status word
(PSWORD)
RPL
PSW
b3 b2 b1 b0 b3 b2 b1 b0
BCCZ I
CMY
X
DP
E
Flag Name
Index enable flag
(IXE)
Zero flag
(Z)
Carry flag
(CY)
Compare flag
(CMP)
BCD flag
(BCD)
Function
This flag modifies the address of the data memory when a data
memory manipulation instruction is executed.
0: No modification
1: Modification
This flag indicates that the result of an arithmetic operation
executed is 0.
Note that the status of 0 or 1 differs depending on the contents of the
compare flag.
This flag indicates the occurrence of a carry or borrow as a result of
execution of an addition or subtraction instruction.
It is reset to 0 if a carry/borrow does not occur; it is set to 1 if a
carry/borrow occurs.
This flag is also used as the shift bit of the “RORC r” instruction.
This flag is used avoid storing the result of an arithmetic operation to
the data memory or general register.
0: Result stored
1: Result not stored
This flag is used to execute an arithmetic operation in decimal.
0: Binary operation executed
1: Decimal operation executed
5.8.3 Notes on using program status word
If an arithmetic operation (addition or subtraction) instruction is executed for the program status word, the
result of the arithmetic operation is stored in the program status word.
For example, even if an operation that causes a carry to occur is executed, if the result of the operation is
0000B, 0000B is stored in the PSW.
5.9 Notes on Using System Register
The data of the system register fixed to 0 is not affected even if a write instruction is executed to it.
This data is always 0 when it is read.
50
Data Sheet U10101EJ4V0DS