tmp88cs38ng TOSHIBA Semiconductor CORPORATION, tmp88cs38ng Datasheet - Page 28

no-image

tmp88cs38ng

Manufacturer Part Number
tmp88cs38ng
Description
Cmos 8-bit Microcontroller
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
(a) Saving/restoring by register bank changeover
Time
Main task
Bank m
m
m
(2) Saving/restoring general-purpose registers
Acceptance
of interrupt
Interrupt return
status word (PSW) are automatically saved on the stack, but not the accumulator and
other registers. These registers are saved by the program if necessary. Also, when
nesting multiple interrupt services, it is necessary to avoid using the same data
memory area for saving registers.
1.
2.
During interrupt acceptance processing, the program counter (PC) and the program
The following method is used to save/restore the general-purpose registers.
General-purpose register save/restore by automatic register bank changeover
register bank that is not in use. Normally, the bank0 is used for the main task and
the banks 1 to 15 are assigned to interrupt service tasks. To increase the efficiency
of data memory utilization, the same bank is assigned for interrupt sources which
are not nested.
instruction [RETI] or [RETN]. Therefore, it is not necessary for a program to save
the RBS.
General-purpose register save/restore by register bank changeover
register bank that is not in use. Normally, the bank0 is used for the main tank and
the banks 1 to 15 are assigned to interrupt service tasks.
Example: Register bank changeover
Example: Register bank changeover
Figure 1.5.4 Saving/Restoring General-purpose Registers
The general-purpose registers can be saved at high speed by switching to a
The switched bank is automatically restored by executing an interrupt return
The general-purpose registers can be saved at high speed by switching to a
Interrupt
service task
PINTxx:
VINTxx:
PINTxx:
VINTxx:
m
n
Switch to bank n by
LD, RBS and n
instruction
Switch to bank n
automatically
Restore to bank m
automatically by
[RETI]/[RETN]
Interrupt processing
RETI
DP
DB
LD RBS, n
Interrupt processing
RETI
DP
DB
88CS38-28
PINTxx
0
PINTxx
1
(b) Saving/restoring using push/pop or data transfer instructions
Main task
m
;
;
;
Restores bank and returns
Interrupt service routine entry address
RBS ← RBS + 1
Acceptance
of interrupt
Interrupt return
TMP88CS38/CM38A/CP38A
Interrupt
service task
2007-09-12
Saving
registers
Restoring
registers

Related parts for tmp88cs38ng