MB95630H Series
12
FUJITSU SEMICONDUCTOR LIMITED
MN702-00009-1v0-E
CHAPTER 2 CPU
2.2 General-purpose Register
■
Features of General-purpose Registers
The general-purpose register has the following features.
•
High-speed access to RAM with short instructions (general-purpose register addressing).
•
Grouping registers into a block of register banks facilitates data protection and division of
registers in terms of functions.
A general-purpose register bank can be allocated exclusively to an interrupt service routine or a
vector call (CALLV #0 to #7) processing routine. For instance, the fourth register bank is
always assigned to the second interrupt.
Data of a general-purpose register before an interrupt can be saved to a dedicated register bank
by just specifying that register bank at the beginning of an interrupt service routine. This
therefore eliminates the need to save data of a general-purpose register in a stack, thereby
enabling the CPU to receive interrupts at high speed.
Note:
In an interrupt service routine, include one of the following in a program to ensure that
values of the interrupt level bits (CCR:IL[1:0]) of the condition code register are not
modified when modifying a register bank pointer (RP) to specify a register bank.
•
Read the interrupt level bits and save their values before writing a value to the RP.
•
Directly write a new value to the RP mirror address "0x0078" to update the RP.
•
As for a product whose RAM size is 256 bytes, the area available for general-registers
is from "0x0100" to "0x018F", which is half of that of the product whose RAM size is
512 bytes or above. Therefore, when using a program development tool such as a C
compiler to set a general-register area, ensure that the area used as a general-register
area does not exceed the size of RAM installed.