p2125vps20 Renesas Electronics Corporation., p2125vps20 Datasheet - Page 111

no-image

p2125vps20

Manufacturer Part Number
p2125vps20
Description
16-bit Single-chip Microcomputer H8s Family / H8s/2100 Series
Manufacturer
Renesas Electronics Corporation.
Datasheet
4.7
When accessing word data or longword data, this LSI assumes that the lowest address bit is 0. The
stack should always be accessed in words or longwords, and the value of the stack pointer (SP:
ER7) should always be kept even.
Use the following instructions to save registers:
Use the following instructions to restore registers:
Setting SP to an odd value may lead to a malfunction. Figure 4.3 shows an example of what
occurs when the SP value is odd.
PUSH.W
POP.W
PUSH.L
POP.L
SP
[Legend]
Note: This diagram illustrates an example in which interrupt control mode is 0 in advanced mode.
CCR:
PC:
R1L:
SP:
Usage Note
Condition code register
Program counter
General register R1L
Stack pointer
SP set to H'FFEFFF
Rn
Rn
ERn
ERn
TRAPA instruction executed
Figure 4.3 Operation when SP Value Is Odd
(or
(or
(or
(or
MOV.W Rn, @-SP
MOV.W @SP+, Rn
MOV.L ERn, @-SP
MOV.L @SP+, ERn
SP
Data saved above SP
CCR
PC
)
)
)
)
MOV.B R1L, @-ER7
SP
Rev. 1.00 Sep. 21, 2006 Page 73 of 658
Contents of CCR lost
R1L
PC
Section 4 Exception Handling
H'FFEFFA
H'FFEFFB
H'FFEFFC
H'FFEFFD
H'FFEFFF
REJ09B0310-0100

Related parts for p2125vps20