Saving And Restoring The Pc And Psw - Mitsubishi Electric M32R Series User Manual

Mitsubishi 32-bit risc single-chip microcomputers
Table of Contents

Advertisement

4

4.6 Saving and Restoring the PC and PSW

The following describes operation of the M32R at the time when it accepts an EIT and when it
executes the "RTE" instruction.
(1) Hardware preprocessing when an EIT is accepted
Save the SM, IE, and C bits of the PSW register
BSM
BIE
BC
Update the SM, IE, and C bits of the PSW register
SM
IE
C
Save the PC register
BPC
Set the vector address in the PC register
Branches to the EIT vector and executes the branch instruction ("BRA" instruction) written
in it, thereby transferring control to the user-created EIT handler.
(2) Hardware postprocessing when the "RTE" instruction is executed
Restore the SM, IE, and C bits of the PSW register from their backup bits.
SM
IE
C
Restore the value of the PC register from the BPC register
PC
Note: The value of the BPC register and those of the BSM, BIE, and BC bits of the PSW register
after execution of the "RTE" instruction are indeterminate.
← SM
← IE
← C
← Remains unchanged (RIE, AE, TRAP)
or set to 0 (SBI, EI, RI)
← Set to 0
← Set to 0
← PC
← BSM
← BIE
← BC
← BPC
4-8
4.6 Saving and Restoring the PC and PSW
EIT
Ver.0.10

Advertisement

Table of Contents
loading

Table of Contents