49
CHAPTER 3 CPU ARCHITECTURE
Figure 3-7. Stack Pointer Configuration
Figure 3-9. Data to be Reset from Stack Memory
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.
Figure 3-8. Data to be Saved to Stack Memory
SP
15
0
SP15 SP14 SP13 SP12 SP11 SP10 SP9 SP8 SP7 SP6 SP5 SP4 SP3 SP2 SP1 SP0
Interrupt and
BRK Instruction
PSW
PC15 to PC8
PC15 to PC8
PC7 to PC0
Register Pair, Low
SP SP _ 2
SP _ 2
Register Pair, High
CALL, CALLF, and
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
RETI and RETB
Instructions
PSW
PC15 to PC8
PC15 to PC8
PC7 to PC0
Register Pair, Low
SP SP + 2
SP
Register Pair, High
RET Instruction
POP rp Instruction
SP + 1
PC7 to PC0
SP SP + 2
SP
SP + 1
SP + 2
SP
SP + 1
SP SP + 3
Содержание mPD780973 Series
Страница 2: ...2 MEMO ...
Страница 66: ...66 MEMO ...
Страница 98: ...98 MEMO ...
Страница 138: ...138 MEMO ...
Страница 164: ...164 MEMO ...
Страница 182: ...182 MEMO ...
Страница 204: ...204 MEMO ...
Страница 244: ...244 MEMO ...
Страница 262: ...262 MEMO ...
Страница 278: ...278 MEMO ...
Страница 290: ...290 MEMO ...