h8s-2161b Renesas Electronics Corporation., h8s-2161b Datasheet - Page 141

no-image

h8s-2161b

Manufacturer Part Number
h8s-2161b
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
PUSH.L
POP.W
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'FFEFFF
Rn
ERn
Rn
ERn
Condition code register
Program counter
General register R1L
Stack pointer
(or MOV.W Rn, @-SP)
(or MOV.L ERn, @-SP)
(or MOV.W @SP+, Rn)
(or MOV.L @SP+, ERn)
TRAPA instruction executed
Figure 4.3 Operation when SP Value Is Odd
SP
Data saved above SP
CCR
PC
MOV.B R1L, @–ER7 executed
Rev. 3.00 Mar 21, 2006 page 87 of 788
SP
Contents of CCR lost
Section 4 Exception Handling
R1L
PC
REJ09B0300-0300
H'FFEFFA
H'FFEFFB
H'FFEFFC
H'FFEFFD
H'FFEFFF
Address

Related parts for h8s-2161b