English
Language : 

UPD17717 Datasheet, PDF (61/408 Pages) NEC – 4-BIT SINGLE-CHIP MICROCONTROLLERS WITH DEDICATED HARDWARE FOR DIGITAL TUNING SYSTEM
µPD17717, 17718, 17719
7.4 Cautions on Using ALU
7.4.1 Cautions on execution operation to program status word
If an arithmetic operation is executed to the program status word, the result of the operation is stored to the
program status word.
The CY and Z flags in the program status word are usually set or reset by the result of the arithmetic operation.
If an arithmetic operation is executed to the program status word itself, the result of the operation is stored to
the program status word, and consequently, it cannot be judged whether a carry or borrow occurs or whether
the result of the operation is zero.
If the CMP flag is set, however, the result of the operation is not stored to the program status word. Therefore,
the CY and Z flags are set or reset normally.
7.4.2 Cautions on executing decimal operation
The decimal operation can be executed only when the result of the operation falls within the following ranges:
(1) Result of addition : 0 to 19 in decimal
(2) Result of subtraction: 0 to 9 or –10 to –1 in decimal
If a decimal operation is executed exceeding or falling below the above ranges, the result is a value greater
than 1010B (0AH).
61