CPU16
REFERENCE MANUAL
INSTRUCTION SET
MOTOROLA
5-3
5.2.5 Exchange Instructions
These instructions exchange the contents of pairs of registers or accumulators. There
are specialized exchange instructions for indexing. Refer to the appropriate summary
for more information.
5.3 Mathematic Instructions
The CPU16 has a full set of 8- and 16-bit mathematic instructions. There are instruc-
tions for signed and unsigned arithmetic, division and multiplication, as well as a com-
plete set of 8- and 16-bit Boolean operators.
Special arithmetic and logic instructions aid stacking operations, indexing, extended
addressing, BCD calculation, and condition code register manipulation. There are also
dedicated multiply and accumulate unit instructions. Refer to the appropriate instruc-
tion summary for more information.
5.3.1 Addition and Subtraction Instructions
Signed and unsigned 8- and 16-bit arithmetic instructions can be performed between
registers or between registers and memory. Instructions that also add or subtract the
value of the CCR carry bit facilitate multiple precision computation.
Table 5-4 Transfer Summary
Mnemonic
TAB
TBA
TDE
TED
Function
Transfer A to B
Transfer B to A
Transfer D to E
Transfer E to D
Operation
(A)
B
(B)
A
(D)
E
(E)
D
Table 5-5 Exchange Summary
Mnemonic
XGAB
XGDE
Function
Exchange A with B
Exchange D with E
Operation
(A)
(B)
(D)
(E)
Table 5-6 Addition Summary
Mnemonic
ABA
ADCA
ADCB
ADCD
ADCE
ADDA
ADDB
ADDD
ADDE
ADE
Function
Add B to A
Add with Carry to A
Add with Carry to B
Add with Carry to D
Add with Carry to E
Add to A
Add to B
Add to D
Add to E
Add D to E
Operation
(A) + (B)
A
(A) + (M) + C
A
(B) + (M) + C
B
(D) + (M : M + 1) + C
D
(E) + (M : M + 1) + C
E
(A) + (M)
A
(B) + (M)
B
(D) + (M : M + 1)
D
(E) + (M : M + 1)
E
(E) + (D)
E
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.