Binary Coded Decimal Instructions; Decrement And Increment Instructions - Motorola HC12 Refrence Manual

Table of Contents

Advertisement

Table 5-4 Addition and Subtraction Instructions
Mnemonic
ABA
ABX
ABY
ADCA
ADCB
ADDA
ADDB
ADDD
Mnemonic
SBA
SBCA
SBCB
SUBA
SUBB
SUBD

5.6 Binary Coded Decimal Instructions

To add binary coded decimal operands, use addition instructions that set the half-carry
bit in the CCR, then adjust the result with the DAA instruction.
of instructions that can be used to perform BCD operations.
Mnemonic
ABA
ADCA
ADCB
ADDA
ADDB
DAA

5.7 Decrement and Increment Instructions

These instructions are optimized 8- and 16-bit addition and subtraction operations.
They are generally used to implement counters. Because they do not affect the carry
bit in the CCR, they are particularly well suited for loop counters in multiple-precision
computation routines. Refer to
cerning automatic counter branches.
ment instructions.
MOTOROLA
5-4
Addition Instructions
Function
Add A to B
Add B to X
Add B to Y
Add with Carry to A
Add with Carry to B
Add without Carry to A
Add without Carry to B
Add to D
Subtraction Instructions
Function
Subtract B from A
Subtract with Borrow from A
Subtract with Borrow from B
Subtract Memory from A
Subtract Memory from B
Subtract Memory from D (A:B)
Table 5-5 BCD Instructions
Function
Add B to A
Add with Carry to A
Add with Carry to B
Add Memory to A
Add Memory to B
Decimal Adjust A
5.19 Loop Primitive Instructions
Table 5-6
INSTRUCTION SET OVERVIEW
Operation
(A) + (B) ⇒ A
(B) + (X) ⇒ X
(B) + (Y) ⇒ Y
(A) + (M) + C ⇒ A
(B) + (M) + C ⇒ B
(A) + (M) ⇒ A
(B) + (M) ⇒ B
(A:B) + (M : M + 1) ⇒ A : B
Operation
(A) – (B) ⇒ A
(A) – (M) – C ⇒ A
(B) – (M) – C ⇒ B
(A) – (M) ⇒ A
(B) – (M) ⇒ B
(D) – (M : M + 1) ⇒ D
Table 5-5
Operation
(A) + (B) ⇒ A
(A) + (M) + C ⇒ A
(B) + (M) + C ⇒ B
(A) + (M) ⇒ A
(B) + (M) ⇒ B
(A) 10
for information con-
is a summary of decrement and incre-
REFERENCE MANUAL
is a summary
CPU12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents