NEC mPD780973 Series Preliminary User's Manual page 49

8-bit single-chip microcontrollers
Table of Contents

Advertisement

15
SP
SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0
The SP is decremented prior to 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-8 and 3-9.
Caution
Since RESET input makes SP contents undefined, be sure to initialize the SP before
instruction execution.
PUSH rp Instruction
SP _ 2
SP
SP _ 2
Register Pair, Low
SP _ 1
Register Pair, High
SP
Figure 3-9. Data to be Reset from Stack Memory
POP rp Instruction
SP
Register Pair, Low
Register Pair, High
SP + 1
SP
SP + 2
CHAPTER 3 CPU ARCHITECTURE
Figure 3-7. Stack Pointer Configuration
Figure 3-8. Data to be Saved to Stack Memory
CALL, CALLF, and
CALLT Instructions
SP _ 2
SP
SP _ 2
PC7 to PC0
SP _ 1
PC15 to PC8
SP
RET Instruction
SP
PC7 to PC0
SP + 1
PC15 to PC8
SP
SP + 2
0
Interrupt and
BRK Instruction
SP _ 3
SP
SP _ 3
PC7 to PC0
SP _ 2
PC15 to PC8
SP _ 1
PSW
SP
RETI and RETB
Instructions
SP
PC7 to PC0
SP + 1
PC15 to PC8
SP + 2
PSW
SP
SP + 3
49

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd780973aMpd780974

Table of Contents