Motorola HC12 Refrence Manual page 188

Table of Contents

Advertisement

LEAS
Effective Address ⇒ SP
Operation:
Description:
Loads the stack pointer with an effective address specified by the pro-
gram. The effective address can be any indexed addressing mode oper-
and address except an indirect address. Indexed addressing mode
operand addresses are formed by adding an optional constant supplied
by the program or an accumulator value to the current value in X, Y, SP,
or PC. See
LEAS does not alter condition code bits. This allows stack modification
without disturbing CCR bits changed by recent arithmetic operations.
Operation is a bit more complex when LEAS is used with auto-increment
or aut-odecrement operand specifications and the SP is the referenced
index register. The index register is loaded with what would have gone
out to the address bus in the case of a load index instruction. In the case
of a pre-increment or pre-decrement, the modification is made before the
index register is loaded. In the case of a post-increment or post-decre-
ment, modification would have taken effect after the address went out on
the address bus, so post-modification does not affect the content of the
index register.
Condition Codes and Boolean Formulas:
S
None affected.
Addressing Modes, Machine Code, and Execution Times:
Source Form
LEAS oprx0_xysp
LEAS oprx9,xysp
LEAS oprx16,xysp
Notes:
1. Due to internal CPU requirements, the program word fetch is performed twice to the same address during this
instruction.
MOTOROLA
6-128
Load Stack Pointer with
Effective Address
3.8 Indexed Addressing Modes
X
H
I
N
Z
Address Mode
IDX
1B xb
IDX1
1B xb ff
IDX2
1B xb ee ff
INSTRUCTION GLOSSARY
for more details.
V
C
Object Code
LEAS
Cycles
Access Detail
1
2
PP
2
PO
2
PP
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents