Based Addressing; Stack Addressing - NEC 78K/0S Series User Manual

8-bit single-chip microcontroller
Table of Contents

Advertisement

3.2.6 Based addressing

[Function]
This addressing is to address the memory by using the result of adding 8-bit immediate data to the contents of
the base register, i.e., the HL register pair. The 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 the entire memory
space.
[Operand format]
Operand
[HL + byte]
[Description example]
MOV A, [HL+10H]; When setting "byte" to 10H
Instruction code

3.2.7 Stack addressing

[Function]
This addressing is to indirectly address the stack area with the stack pointer (SP) contents.
This addressing method is automatically employed when the PUSH, POP, subroutine call, or RETURN
instructions is executed or when the register is saved/restored upon generation of an interrupt request.
Stack addressing can address the internal high-speed RAM area only.
[Description example]
In the case of PUSH DE
Instruction code
38
CHAPTER 3 ADDRESSING
Description
0
0
1
0
1
1
0
1
0
0
0
1
0
0
0
0
1
0
1
0
1
0
1
0
User's Manual U11047EJ3V0UM00

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents