Datasheet

Table 10-1. CCR Register Field Descriptions (continued)
Field Description
3
I
Interrupt Mask Bit — When the interrupt mask is set, all maskable CPU interrupts are disabled.
CPU interrupts are enabled when the interrupt mask is cleared. When a CPU interrupt occurs, the
interrupt mask is set automatically after the CPU registers are saved on the stack, but before the
first instruction of the interrupt service routine is executed.
Interrupts are not recognized at the instruction boundary after any instruction that clears I (CLI or
TAP). This ensures that the next instruction after a CLI or TAP will always be executed without the
possibility of an intervening interrupt, provided I was set.
0 Interrupts enabled
1 Interrupts disabled
2
N
Negative Flag — The CPU sets the negative flag when an arithmetic operation, logic operation, or
data manipulation produces a negative result, setting bit 7 of the result. Simply loading or storing an
8-bit or 16-bit value causes N to be set if the most significant bit of the loaded or stored value was 1.
0 Non-negative result
1 Negative result
1
Z
Zero Flag — The CPU sets the zero flag when an arithmetic operation, logic operation, or data
manipulation produces a result of 0x00 or 0x0000. Simply loading or storing an 8-bit or 16-bit value
causes Z to be set if the loaded or stored value was all 0s.
0 Non-zero result
1 Zero result
0
C
Carry/Borrow Flag — The CPU sets the carry/borrow flag when an addition operation produces a
carry out of bit 7 of the accumulator or when a subtraction operation requires a borrow. Some
instructions — such as bit test and branch, shift, and rotate — also clear or set the carry/borrow flag.
0 No carry out of bit 7
1 Carry out of bit 7
10.3 Addressing Modes
Addressing modes define the way the CPU accesses operands and data. In the HCS08
V6, memory, status and control registers, and input/output (I/O) ports share a single 64
KB CPU address space. This arrangement means that the same instructions that access
variables in RAM can also be used to access I/O and control registers or nonvolatile
program space.
Some instructions use more than one addressing mode. For instance, move instructions
use one addressing mode to specify the source operand and a second addressing mode to
specify the destination address. Instructions such as BRCLR, BRSET, CBEQ, and DBNZ
use one addressing mode to specify the location of an operand for a test and then use
relative addressing mode to specify the branch destination address when the tested
condition is true. For BRCLR, BRSET, CBEQ, and DBNZ, the addressing mode listed in
the instruction set tables is the addressing mode needed to access the operand to be tested,
and relative addressing mode is implied for the branch destination.
Chapter 10 Central processor unit
MC9S08PA60 Reference Manual, Rev. 1, 9/2012
Freescale Semiconductor, Inc. 255