NEC mPD789026 Subseries User Manual page 55

8-bit single-chip
Table of Contents

Advertisement

(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.
15
SP
SP15
SP14
SP13 SP12 SP11 SP10 SP9
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-14 and 3-15.
Caution Since RESET input makes SP contents undefined, be sure to initialize the SP before
instruction execution.
PUSH rp
Instruction
SP _ 2
SP
Lower Half
SP _ 2
Register Pairs
Upper Half
SP _ 1
Register Pairs
SP
Figure 3-15. Data to be Restored from Stack Memory
POP rp
Instruction
Lower Half
SP
Register Pairs
Upper Half
SP + 1
Register Pairs
SP
SP + 2
CHAPTER 3 CPU ARCHITECTURE
Figure 3-13. Stack Pointer Configuration
SP8
Figure 3-14. Data to be Saved to Stack Memory
SP _ 2
SP
SP _ 2
SP _ 1
SP
RET Instruction
SP
SP + 1
SP
SP + 2
User's Manual U11919EJ3V0UM00
SP7
SP6
SP5
SP4
CALL, CALLT
Instructions
SP _ 3
SP
SP _ 3
SP _ 2
PC7 to PC0
SP _ 1
PC15 to PC8
SP
PC7 to PC0
SP
PC15 to PC8
SP + 1
SP + 2
SP
SP + 3
0
SP3
SP2
SP1
SP0
Interrupt
PC7 to PC0
PC15 to PC8
PSW
RETI Instruction
PC7 to PC0
PC15 to PC8
PSW
55

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd789022Mpd789024Mpd789025Mpd789026Mpd78f9026a

Table of Contents