CHAPTER 3 CPU ARCHITECTURE
User’s Manual U15075EJ1V0UM00
63
(3)
Stack pointer (SP)
This is a 16-bit register to hold the start address of the memory stack area. Only the internal high-speed
RAM area can be set as the stack area.
Figure 3-15. Stack Pointer Configuration
0
15
SP14
SP15
SP
SP13 SP12 SP11 SP10
SP9
SP8
SP7
SP6
SP5
SP4
SP3
SP2
SP1
SP0
The SP is decremented ahead of write (save) to the stack memory and is incremented after read (restore)
from the stack memory.
Each stack operation saves/restores data as shown in Figures 3-16 and 3-17.
Caution
Since RESET input makes the SP contents undefined, be sure to initialize the SP before
instruction execution.
Figure 3-16. Data to Be Saved to Stack Memory
Interrupt
PSW
PC15 to PC8
PC15 to PC8
PC7 to PC0
Lower
register pairs
SP SP _ 2
SP _ 2
CALL, CALLT
instructions
PUSH rp
instruction
SP _ 1
SP
SP SP _ 2
SP _ 2
SP _ 1
SP
PC7 to PC0
SP _ 3
SP _ 2
SP _ 1
SP
SP SP _ 3
Higher
register pairs
Figure 3-17. Data to Be Restored from Stack Memory
RETI instruction
PSW
PC15 to PC8
PC15 to PC8
PC7 to PC0
Lower
register pairs
RET instruction
POP rp
instruction
SP
PC7 to PC0
Higher
register pairs
SP + 1
SP SP + 2
SP
SP + 1
SP SP + 2
SP
SP + 1
SP + 2
SP SP + 3
Summary of Contents for mPD789426 Series
Page 2: ...2 User s Manual U15075EJ1V0UM00 MEMO...
Page 6: ...6 User s Manual U15075EJ1V0UM00 MEMO...
Page 10: ...10 User s Manual U15075EJ1V0UM00 MEMO...
Page 24: ...24 User s Manual U15075EJ1V0UM00 MEMO...
Page 36: ...36 User s Manual U15075EJ1V0UM00 MEMO...
Page 46: ...46 User s Manual U15075EJ1V0UM00 MEMO...
Page 176: ...User s Manual U15075EJ1V0UM00 176 MEMO...
Page 196: ...User s Manual U15075EJ1V0UM00 196 MEMO...
Page 210: ...User s Manual U15075EJ1V0UM00 210 MEMO...
Page 262: ...262 User s Manual U15075EJ1V0UM00 MEMO...
Page 278: ...278 User s Manual U15075EJ1V0UM00 MEMO...
Page 296: ...296 User s Manual U15075EJ1V0UM00 MEMO...
Page 298: ...User s Manual U15075EJ1V0UM00 298 MEMO...