English
Language : 

H8S2116 Datasheet, PDF (70/842 Pages) Renesas Technology Corp – Renesas 16-Bit Single-Chip Microcomputer H8S Family / H8S/2100 Series
Section 2 CPU
2.4.4 Condition-Code Register (CCR)
This 8-bit register contains internal CPU status information, including an interrupt mask bit (I) and
half-carry (H), negative (N), zero (Z), overflow (V), and carry (C) flags.
Operations can be performed on the CCR bits by the LDC, STC, ANDC, ORC, and XORC
instructions. The N, Z, V, and C flags are used as branching conditions for conditional branch
(Bcc) instructions.
Bit Bit Name Initial Value R/W Description
7I
1
R/W Interrupt Mask Bit
Masks interrupts other than NMI when set to 1. NMI is
accepted regardless of the I bit setting. The I bit is set to 1
at the start of an exception-handling sequence. For details,
see section 5, Interrupt Controller.
6 UI
Undefined
R/W User Bit or Interrupt Mask Bit
Can be written to and read from by software using the
LDC, STC, ANDC, ORC, and XORC instructions.
5H
Undefined
R/W Half-Carry Flag
When the ADD.B, ADDX.B, SUB.B, SUBX.B, CMP.B or
NEG.B instruction is executed, this flag is set to 1 if there is
a carry or borrow at bit 3, and cleared to 0 otherwise.
When the ADD.W, SUB.W, CMP.W, or NEG.W instruction
is executed, the H flag is set to 1 if there is a carry or
borrow at bit 11, and cleared to 0 otherwise. When the
ADD.L, SUB.L, CMP.L, or NEG.L instruction is executed,
the H flag is set to 1 if there is a carry or borrow at bit 27,
and cleared to 0 otherwise.
4U
Undefined
R/W User Bit
Can be written to and read from by software using the
LDC, STC, ANDC, ORC, and XORC instructions.
3N
Undefined R/W Negative Flag
Stores the value of the most significant bit of data as a sign
bit.
2Z
Undefined
R/W Zero Flag
Set to 1 when data is zero, and cleared to 0 when data is
not zero.
1V
Undefined
R/W Overflow Flag
Set to 1 when an arithmetic overflow occurs, and cleared
to 0 otherwise.
Rev. 1.00 Mar. 02, 2006 Page 30 of 798
REJ09B0255-0100