HD6413003RVF RENESAS [Renesas Technology Corp], HD6413003RVF Datasheet - Page 90

no-image

HD6413003RVF

Manufacturer Part Number
HD6413003RVF
Description
microcontroller (MCU)
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
4.6 Notes on Stack Usage
When accessing word data or longword data, the H8/3003 regards the lowest address bit as 0. The
stack should always be accessed by word access or longword access, 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-6 shows an example of what
happens when the SP value is odd.
SP
Legend
CCR:
PC:
R1L:
SP:
Note: The diagram illustrates modes 3 and 4.
PUSH.W Rn (or MOV.W Rn, @–SP)
PUSH.L ERn (or MOV.L ERn, @–SP)
POP.W Rn
POP.L ERn
Condition code register
Program counter
General register R1L
Stack pointer
SP set to H'FFFEFF
TRAPA instruction executed
(or MOV.W @SP+, Rn)
(or MOV.L @SP+, ERn)
Figure 4-6 Operation when SP Value is Odd
SP
Data saved above SP
CCR
PC
72
MOV. B RIL, @-ER7
SP
CCR contents lost
RIL
PC
H'FFFEFA
H'FFFEFB
H'FFFEFC
H'FFFEFD
H'FFFEFF

Related parts for HD6413003RVF