NEC PD75402A User Manual page 38

4-bit single-chip microcomputer
Table of Contents

Advertisement

CHAPTER 3. FEATURES OF ARCHITECTURE AND MEMORY MAP
(6) Stack addressing
This addressing mode is for the saving/restoring operation during the interrupting process, subroutine process.
The data memory is addressed indirectly according to the content of the stack pointer (SP : 8 bits).
The memory bank (MB) addressed in this addressing mode is fixed to 0. Also as the stack pointer's high-order
3 bits are fixed to 001, the addressable area is limited to 020H to 03FH.
This addressing mode is also applied at register save/restore by the PUSH, POP instruction in addition to the
interrupting process, subroutine process.
Note
The Evachip packaged on the board for evaluation can address the whole area of Memory bank 0 in this
addressing mode unlike in the PD75402A. To eliminate such a difference during the evaluation, a value
not to access beyond the range of 20H to 3FH should be set in the stack pointer.
Example
1. Save/restore the register during the subroutine process.
SUB:
2. Transfer the content of the HL register pair to the XA register pair.
3. Branch to the address indicated by the (XAHL) register.
PUSH
XA
PUSH
HL
POP
HL
POP
XA
RET
PUSH
HL
POP
XA
PUSH
HL
PUSH
XA
RET
; XA
HL
; Branch to address XAHL
27

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd75p402

Table of Contents