MOTOROLA
INSTRUCTION SET OVERVIEW
CPU12
5-2
REFERENCE MANUAL
5.3 Transfer and Exchange Instructions
Transfer instructions copy the content of a register or accumulator into another register
or accumulator. Source content is not changed by the operation. TFR is a universal
transfer instruction, but other mnemonics are accepted for compatibility with the
M68HC11. The TAB and TBA instructions affect the N, Z, and V condition code bits in
the same way as M68HC11 instructions. The TFR instruction does not affect the con-
dition code bits.
Exchange instructions exchange the contents of pairs of registers or accumulators.
The SEX instruction is a special case of the universal transfer instruction that is used
to sign-extend 8-bit two’s complement numbers so that they can be used in 16-bit op-
erations. The 8-bit number is copied from accumulator A, accumulator B, or the con-
dition codes register to accumulator D, the X index register, the Y index register, or the
stack pointer. All the bits in the upper byte of the 16-bit result are given the value of
the MSB of the 8-bit number.
SECTION 6 INSTRUCTION GLOSSARY
contains information concerning other
transfers and exchanges between 8- and 16-bit registers.
is a summary of transfer and exchange instructions.
Table 5-1 Load and Store Instructions
Load Instructions
Mnemonic
Function
Operation
LDAA
Load A
(M)
⇒
A
LDAB
Load B
(M)
⇒
B
LDD
Load D
(M
:
M
+
1)
⇒
(A
:
B)
LDS
Load SP
(M
:
M
+
1)
⇒
SP
LDX
Load Index Register X
(M
:
M
+
1)
⇒
X
LDY
Load Index Register Y
(M
:
M
+
1)
⇒
Y
LEAS
Load Effective Address into SP
Effective Address
⇒
SP
LEAX
Load Effective Address into X
Effective Address
⇒
X
LEAY
Load Effective Address into Y
Effective Address
⇒
Y
Store Instructions
Mnemonic
Function
Operation
STAA
Store A
(A)
⇒
M
STAB
Store B
(B)
⇒
M
STD
Store D
(A)
⇒
M, (B)
⇒
M
+
1
STS
Store SP
(SP)
⇒
M
:
M
+
1
STX
Store X
(X)
⇒
M
:
M
+
1
STY
Store Y
(Y)
⇒
M
:
M
+
1
Summary of Contents for CPU12
Page 8: ...MOTOROLA CPU12 viii REFERENCE MANUAL ...
Page 14: ...MOTOROLA INTRODUCTION CPU12 1 4 REFERENCE MANUAL ...
Page 20: ...MOTOROLA OVERVIEW CPU12 2 6 REFERENCE MANUAL ...
Page 38: ...MOTOROLA INSTRUCTION QUEUE CPU12 4 6 REFERENCE MANUAL ...
Page 300: ...MOTOROLA DEVELOPMENT AND DEBUG SUPPORT CPU12 8 16 REFERENCE MANUAL ...
Page 338: ...MOTOROLA MEMORY EXPANSION CPU12 10 8 REFERENCE MANUAL ...
Page 364: ...MOTOROLA INSTRUCTION REFERENCE CPU12 A 26 REFERENCE MANUAL ...
Page 386: ...MOTOROLA HIGH LEVEL LANGUAGE SUPPORT CPU12 C 6 REFERENCE MANUAL ...
Page 438: ...MOTOROLA SUMMARY OF CHANGES CPU12 S 2 REFERENCE MANUAL ...
Page 439: ......