Usage Note - Renesas H8S/2100 Series Hardware Manual

6-bit single-chip microcomputer
Hide thumbs Also See for H8S/2100 Series:
Table of Contents

Advertisement

5.7

Usage Note

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:
PUSH.W
Rn
PUSH.L ERn (or MOV.L ERn, @-SP)
Use the following instructions to restore registers:
POP.W
Rn
POP.L ERn (or MOV.L @SP+, ERn)
Setting SP to an odd value may lead to a malfunction. Figure 5.3 shows an example of what
occurs when the SP value is odd.
SP
SP set to H'FFEFFF
[Legend]
CCR:
Condition code register
PC:
Program counter
R1L:
General register R1L
SP:
Stack pointer
Note: This diagram illustrates an example in which interrupt control mode is 0.
(or
MOV.W Rn, @-SP
(or
MOV.W @SP+, Rn
CCR
SP
TRAPA instruction executed
Data saved above SP
Figure 5.3 Operation when SP Value Is Odd
)
)
SP
PC
MOV.B R1L, @-ER7
Contents of CCR lost
Rev. 1.00 May 09, 2008 Page 95 of 954
Section 5 Exception Handling
R1L
H'FFEFFA
H'FFEFFB
H'FFEFFC
PC
H'FFEFFD
H'FFEFFF
REJ09B0462-0100

Advertisement

Table of Contents
loading

This manual is also suitable for:

H8s/2112r

Table of Contents