beautypg.com

Chapter 3 cpu function – NEC PD78214 User Manual

Page 78

background image

49

Chapter 3 CPU Function

3

(2) Function

General-purpose registers can be operated in units of eight bits. They can also be operated in units of 16 bits,
that is, a pair of eight-bit registers can be operated as a single unit (AX, BC, DE, HL).

Each register can temporarily hold operation results or can be used as an operand of an arithmetic/logical
instruction between registers.

General-purpose registers are grouped into four register banks. By separating the register banks to be used
for ordinary operation from those for interrupt handling, an efficient program can be created.

The registers have different functions as described below:

A (R1)

: Central register for the transfer of 8-bit data or arithmetic/logical operations. This

register can also hold bit data.

The register can also hold the offset value for indexed addressing.

AX (RP0)

: Central register for the transfer of 16-bit data or arithmetic/logical operations

X (R0)

: Register that can hold bit data

B (R3)

: Register with the functions of a loop counter. The register can be used by the DBNZ

instruction.

This register can also hold the offset value for indexed addressing.

C (R2)

: Register with the functions of a loop counter. The register can be used by the DBNZ

instruction.

DE (RP2), HL (RP3) : Registers with the functions of a pointer. The registers specify a base address for register

indirect addressing and base addressing.

This register can also hold the offset value for indexed addressing.

Each register can be identified by a name representing its function (X, A, C, B, E, D, L, H, AX, BC, DE, HL) or
by an absolute name (R0 to R7, RP0 to RP3). For details of the relationship between the function names and
absolute names, see Table 3-3.

Table 3-3 Function Names and Absolute Names

X

A

C

B

E

D

L

H

Function name

Absolute name

R0

R1

R2

R3

R4

R5

R6

R7

AX

BC

DE

HL

Function name

Absolute name

RP0

RP1

RP2

RP3

This manual is related to the following products: