60
CHAPTER 3 CPU
r Carry flag (C)
Set when a carry from bit 7 or borrow to bit 7 occurs as a result of an arithmetic operation.
Cleared otherwise. Set to the shift-out value in case of a shift instruction.
Figure 3.2-3 "Change of Carry Flag by Shift Instruction" shows the change of the carry flag by a
shift instruction.
Figure 3.2-3 Change of Carry Flag by Shift Instruction
Check:
The condition code register is part of the program status (PS) and cannot be accessed
independently.
Note:
In practice, the flag bits are rarely fetched and used directly. Instead, the bits are used
indirectly by instructions such as branch instructions (such as BNZ) or the decimal
adjustment instructions (DAA, DAS). The content of the flags after a reset is indeterminate.
s Interrupt Acceptance Control Bit
r Interrupt enable flag (I)
Interrupt is enabled when this flag is set to "1"and the CPU accepts interrupt. Interrupt is
prohibited when this flag is set to "0" and the CPU does not accept interrupt.
The initial value after a reset is "0".
Normal practice is to set the flag to "1" by the SETI instruction and clear to "0" by the CLRI
instruction.
r Interrupt level bits (IL1, IL0)
These bits indicate the level of the interrupt currently being accepted by the CPU. The value is
compared with the interrupt level setting registers (ILR1 to ILR3) which have a setting for each
peripheral function interrupt request (IRQ0 to IRQB).
Given that the interrupt enable flag is enabled (I = "1"), the CPU only performs interrupt
processing for interrupt requests with an interrupt level value that is less than the value of these
bits. Table 3.2-1 "Interrupt Level" lists the interrupt level priorities. The initial value after a reset
is "11".
C
Bit 7
Bit 0
Bit 7
Bit 0
Left shift (ROLC)
Right shift (RORC)
C