NEC PD754144 User Manual page 44

4-bit single-chip microcontrollers
Table of Contents

Advertisement

CHAPTER 3 FEATURES OF ARCHITECTURE AND MEMORY MAP
(7) Stack addressing
This addressing mode is used to save or restore data when interrupt servicing or subroutine processing is
executed.
The address of data memory bank 0 pointed to by the stack pointer (8 bits) is specified in this addressing mode.
In addition to being used during interrupt servicing or subroutine processing, this addressing is also used to
save or restore register contents by using the PUSH or POP instruction.
Examples 1. To save or restore register contents during subroutine processing
SUB :
2. To transfer contents of register pair HL to register pair DE
3. To branch to address specified by registers [XABC]
44
PUSH XA
PUSH HL
PUSH BS ; Saves MBS and RBS
POP
BS
POP
HL
POP
XA
RET
PUSH HL
DE ; DE ← HL
POP
PUSH BC
PUSH XA
RET
; To branch address XABC
User's Manual U10676EJ3V0UM

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pd754244

Table of Contents