Based Indexed Addressing; Stack Addressing - NEC mPD178054 Series User Manual

8-bit single-chip microcontrollers
Table of Contents

Advertisement

3.4.8 Based indexed addressing

[Function]
This addressing mode is used to address a memory location specified by the result of adding the contents of
the B or C register specified in the instruction word to the contents of the HL register pair which is used as a base
register. The HL, B, and C registers accessed are the registers in the register bank specified by the register bank
select flags (RBS0 and RBS1).
Addition is performed by expanding the offset data as a positive number to 16 bits. A carry from the 16th bit
is ignored. This addressing can be carried out for all the memory spaces.
[Operand format]
Symbol
[Example]
In the case of MOV A, [HL + B]

3.4.9 Stack addressing

[Function]
The stack area is indirectly addressed with the stack pointer (SP) contents.
This addressing method is automatically employed when the PUSH, POP, subroutine call and RETURN
instructions are executed or the register is saved/restored upon generation of an interrupt request.
Stack addressing enables to address the internal high-speed RAM area only.
[Example]
In the case of PUSH DE
CHAPTER 3 CPU ARCHITECTURE
Description
[HL + B], [HL + C]
Operation code
1 0 1 0 1 0 1 1
Operation code
1 0 1 1 0 1 0 1
User's Manual U15104EJ2V0UD
67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mpd178053Mpd178054Mpd178f054

Table of Contents