NEC PD750008 User Manual

Page 53

Advertising
background image

3 3

CHAPTER 3 FEATURES OF THE ARCHITECTURE AND MEMORY MAP

(7) Stack addressing

This addressing mode is used for save/restoration operation in interrupt processing or subroutine

processing.

In this addressing mode, the address indicated by the stack pointer (8 bits) of data memory bank 0 is

specified.

This addressing mode can be used for register save/restoration operation using the PUSH or POP

instruction as well as save/restoration operation in interrupt and subroutine processing.

Examples 1. A register is saved and restored in subroutine processing.

SUB:

PUSH

XA

PUSH

HL

PUSH

BS

; Save MBS and RBS

·

·

·

POP

BS

POP

HL

POP

XA

RET

2. The contents of the HL register pair are transferred to the DE register pair.

PUSH

HL

POP

DE

; DE <– HL

3. A branch is made to the address indicated by the [XABC] register.

PUSH

BC

PUSH

XA

RET

; Branch to address XABC

Advertising
This manual is related to the following products: