tmp89fm42a TOSHIBA Semiconductor CORPORATION, tmp89fm42a Datasheet - Page 85

no-image

tmp89fm42a

Manufacturer Part Number
tmp89fm42a
Description
8 Bit Microcontroller
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
tmp89fm42aUG
Manufacturer:
TOSHIBA/东芝
Quantity:
20 000
3.5
Interrupt Sequence
RA003
Example :Save/store register using data transfer instructions
Example :Saving/restoring registers, using an instruction for transfer with data memory (with the main task using the
Figure 3-4 Saving/Restoring General-purpose Registers under Interrupt Processing
3.5.3.2
3.5.3.3
register bank BANK0)
PINTxx:
PINTxx:
purpose registers at a time. The register bank function saves (switches) the general-purpose registers by
executing a register bank manipulation instruction (such as LD RBS,1) at the beginning of an interrupt service
task. It is unnecessary to re-execute the register bank manipulation instruction at the end of the interrupt
service task because executing the RETI instruction makes a return automatically to the register bank that
was being used by the main task according to the content of the PSW.
To save only a specific register without nested interrupts, data transfer instructions are available.
In non-multiple interrupt handling, the register bank function can be used to save/restore the general-
Using data transfer instructions
Using a register bank to save/restore general-purpose registers
Note:Two register banks (BANK0 and BANK1) are available. Each bank consists of 8-bit general-purpose
registers (W, A, B, C, D, E, H, and L) and 16-bit general-purpose registers (IX and IY).
LD
Interrupt processing
LD
RETI
LD
Interrupt processing
RETI
Main task
(GSAVA), A
A, (GSAVA)
RBS, 1
Interrupt acceptance Interrupt
Interrupt return
Page 66
; Save A register
; Restore A register
; RETURN
; Switches to the register bank BANK1
; RETURN
(Makes a return automatically to BANK0 that
was being used by the main task when the
PSW is restored)
service task
Saving
registers
Restoring
registers
TMP89FM42A

Related parts for tmp89fm42a