![NEC mPD17120 Subseries User Manual Download Page 50](http://html.mh-extra.com/html/nec/mpd17120-subseries/mpd17120-subseries_user-manual_249259050.webp)
CHAPTER 6 STACK
The stack is a register used to save information such as the program return address and the contents of the system
register during execution of subroutine calls, interrupts and similar operations.
6.1 STACK CONFIGURATION
Figure 6-1 shows the stack configuration.
The stack consists of the following parts: one 3-bit binary counter stack pointer, five 10-bit address stack registers,
and one 5-bit interrupt stack registers.
Figure 6-1. Stack Configuration
b
9
Address Stack Register
(ASR)
b
8
b
7
b
6
b
5
b
4
b
3
b
2
b
1
b
0
b
10
Address stack register 0
Address stack register 1
Address stack register 2
Address stack register 3
Address stack register 4
0H
1H
2H
3H
4H
b
2
SPb
2
b
1
SPb
1
b
0
SPb
0
Stack Pointer
(SP)
BCDSK
Interrupt Stack Register
(INTSK)
CMPSK
CYSK
ZSK
IXESK
0H
6.2 FUNCTIONS OF THE STACK
The stack is used to save the return address during execution of subroutine calls and table reference instructions.
When an interrupt occurs, the program return address and the program status word (PSWORD) are automatically
saved in the stack.
Remark
All the 5 bits of PSWORD are automatically cleared to zero after being saved in the interrupt stack
register.
35
Summary of Contents for mPD17120 Subseries
Page 15: ... x MEMO ...
Page 23: ... MEMO 8 ...
Page 45: ... MEMO 30 ...
Page 49: ... MEMO 34 ...
Page 55: ... MEMO 40 ...
Page 93: ... MEMO 78 ...
Page 99: ... MEMO 84 ...
Page 102: ...CHAPTER 11 ARITHMETIC AND LOGIC UNIT 87 MEMO ...
Page 119: ... MEMO 104 ...
Page 175: ... MEMO 160 ...
Page 199: ... MEMO 184 ...
Page 265: ... MEMO 250 ...
Page 281: ...266 MEMO ...
Page 285: ... MEMO 270 ...
Page 289: ... MEMO 274 ...