Renesas H8/300 Series Programming Manual page 12

Table of Contents

Advertisement

1.2.1 General Registers
All the general registers can be used as both data registers and address registers. When used as
address registers, the general registers are accessed as 16-bit registers (R0 to R7). When used
as data registers, they can be accessed as 16-bit registers (R0 to R7), or the high (R0H to R7H)
and low (R0L to R7L) bytes can be accessed separately as 8-bit registers. The register length
is determined by the instruction.
R7 also functions as the stack pointer, used implicitly by hardware in processing interrupts and
subroutine calls. In assembly language, the letters SP can be coded as a synonym for R7. As
indicated in figure 1-4, R7 (SP) points to the top of the stack.
SP (R7)
1.2.2 Control Registers
The CPU has a 16-bit program counter (PC) and an 8-bit condition code register (CCR).
(1) Program Counter (PC): This 16-bit register indicates the address of the next instruction
the CPU will execute. Instructions are fetched by 16-bit (word) access, so the least significant
bit of the PC is ignored (always regarded as 0).
(2) Condition Code Register (CCR): This 8-bit register indicates the internal status of the
CPU with an interrupt mask (I) bit and five flag bits: half-carry (H), negative (N), zero (Z),
overflow (V), and carry (C) flags. The two unused bits are available to the user. The bit
configuration of the condition code register is shown below.
Figure 1-4. Stack Pointer
6
Unused area
Stack area

Advertisement

Table of Contents
loading

Table of Contents