Register Descriptions; General Registers; Control Registers - Hitachi H8/3152 Hardware Manual

Single-chip microcomputer h8/3150 series
Table of Contents

Advertisement

2.2

Register Descriptions

2.2.1

General Registers

All the general registers can be used as both data registers and address registers.
When used as data registers, they can be accessed as 16-bit registers (R0 to R7), or the high bytes
(R0H to R7H) and low bytes (R0L to R7L) can be accessed separately as 8-bit registers.
When used as address registers, the general registers are accessed as 16-bit registers (R0 to R7).
Registers R4L, R5, and R6 have special functions when the EEPMOV (EEPROM write)
instruction is executed.
R7 also functions as the stack pointer, used implicitly by hardware in exception handling and
subroutine calls. In assembly-language coding, R7 can also be denoted by the symbol SP. As
indicated in figure 2.2, SP (R7) points to the top of the stack.
SP (R7)
2.2.2

Control Registers

The CPU control registers include 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. All instructions are fetched 16 bits (1 word) at a time, so the least significant bit
of PC is ignored (always regarded as 0).
12
Figure 2.2 Stack Pointer
Free area
Stack area

Advertisement

Table of Contents
loading

Table of Contents