English
Language : 

MC68HC11G5 Datasheet, PDF (156/195 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcontroller
Freescale Semiconductor, Inc.
12.3.1.2
Arithmetic Operations
This group of instructions supports arithmetic operations on a variety of operands. 8 and 16-bit
operations are supported directly and can easily be extended to support multiple word operands.
Twos complement (signed) and binary (unsigned) operations are supported directly. BCD arithmetic
is supported by following normal arithmetic instruction sequences with the decimal adjust accumulator
A (DAA) instruction to restore results to BCD format. Compare instructions perform a subtraction
within the CPU to update the condition code bits without altering either operand. Test instructions
are provided but are seldom needed since almost all other operations automatically update the
condition code bits anyway.
Table 12-2. Arithmetic Operations
Function
Mnemonic IMM DIR EXT INDX INDY INH
Add Accumulators
ABA
X
Add Accumulator B to X
ABX
X
Add Accumulator B to Y
ABY
X
Add with Carry to A
ADCA
X
X
X
X
X
Add with Carry to B
ADCB
X
X
X
X
X
Add Memory to A
ADDA
X
X
X
X
X
Add Memory to B
ADDB
X
X
X
X
X
Add Memory to D (16-bit
ADDD
X
X
X
X
X
Compare A to B
CBA
X
Compare A to Memory
CMPA
X
X
X
X
X
Compare B to Memory
CMPB
X
X
X
X
X
Compare D to Memory (16-bit
CPD
X
X
X
X
X
Decimal Adjust A (for BCD
DAA
X
Decrement Memory Byte
DEC
X
X
X
Decrement Accumulator A
DECA
X
Decrement Accumulator B
DECB
X
Increment Memory Byte
INC
X
X
X
Increment Accumulator A
INCA
X
Increment Accumulator B
INCB
X
Twos Complement Memory Byte
NEG
X
X
X
Twos Complement Accumulator A
NEGA
X
Twos Complement Accumulator B
NEGB
X
Subtract with Carry from A
SBCA
X
X
X
X
X
Subtract with Carry from B
SBCB
X
X
X
X
X
Subtract Memory from A
SUBA
X
X
X
X
X
Subtract Memory From B
SUBB
X
X
X
X
X
Subtract Memory From D (16-bit
SUBD
X
X
X
X
X
Test Memory for Zero or Minus
TST
X
X
X
Test A for Zero or Minus
TSTA
X
Test B for Zero or Minus
TSTB
X
12-6
CPU, ADDRESSING MODES AND INSTRUCTION SET
For More Information On This Product,
Go to: www.freescale.com