h8s-2158 Renesas Electronics Corporation., h8s-2158 Datasheet - Page 123

no-image

h8s-2158

Manufacturer Part Number
h8s-2158
Description
Renesas 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
happens when the SP value is odd.
PUSH.W
POP.W
PUSH.L
POP.L
SP
Usage Note
Legend:
CCR:
PC:
R1L:
SP:
Note: This diagram illustrates an example in which the interrupt control mode is 0 in advanced mode.
SP set to H'FFFEFF
Condition code register
Program counter
General register R1L
Stack pointer
Rn
ERn
Rn
ERn
TRAPA instruction executed
Figure 4.3 Operation when SP Value Is Odd
(or
(or
(or
(or
MOV.W Rn, @-SP
MOV.L ERn, @-SP
MOV.W @SP+, Rn
MOV.L @SP+, ERn
SP
Data saved above SP
CCR
PC
)
)
)
)
MOV.B R1L, @-ER7 executed
SP
Rev. 3.00 Jan 25, 2006 page 71 of 872
Contents of CCR lost
Section 4 Exception Handling
R1L
PC
REJ09B0286-0300
H'FFFEFA
H'FFFEFB
H'FFFEFC
H'FFFEFD
H'FFFEFF
Address

Related parts for h8s-2158