beautypg.com

FUJITSU Semiconductor Controller MB89950/950A User Manual

Page 48

background image

34

CHAPTER 3 CPU

Features of general-purpose registers

General-purpose registers have the following features:

RAM can be accessed at high-speed using short instructions (general-purpose register addressing).

Registers are grouped in blocks in the form of register banks. This simplifies the process of saving

register contents and dividing registers by function.

Dedicated register banks can be permanently assigned for each interrupt processing or vector call (CALLV

#0 to #7) processing routine by general-purpose register. For example, register bank 4 interrupt 2.

For example, a particular interrupt processing routine only uses a particular register bank which cannot be

written to unintentionally by other routines. The interrupt processing routine only needs to specify its

dedicated register bank at the start of the routine to effectively save the general-purpose registers in use

prior to the interrupt. Therefore, saving the general-purpose registers to the stack or other memory location

is not necessary. This allows high-speed interrupt handling while maintaining simplicity.

Also, as an alternative to saving general-purpose registers in subroutine calls, register banks can be used to

create reentrant programs (programs that do not use fixed addresses and can be entered more than once)

usually made by the index register (IX).

Note:

If an interrupt processing routine changes the register bank pointer (RP), ensure that the program does

not also change the interrupt level bits in the condition code register (CCR: IL1, IL0) when specifying

the register bank.