
MOTOROLA
4-140
INSTRUCTION SET
CPU32
REFERENCE MANUAL
SBCD
Subtract Decimal with Extend
SBCD
Operation:
Assembler
Syntax:
Attributes:
Description:
tion operand and stores the result in the destination location. The subtraction is per-
formed using binary coded decimal arithmetic; the operands are packed BCD
numbers. The instruction has two modes:
1. Data register to data register: The data registers specified by the instruction
contain the operands.
2. Memory to memory: The address registers specified by the instruction
access the operands from memory using the predecrement addressing
mode.
Condition Codes:
Destination
10
– Source
10
– X
→
Destination
SBCD Dx, Dy
SBCD –(Ax), –(Ay)
Size = (Byte)
Subtracts the source operand and the extend bit from the destina-
X
N
Z
V
C
Set the same as the carry bit.
Undefined.
Cleared if the result is nonzero. Unchanged otherwise.
Undefined.
Set if a borrow (decimal) is generated. Cleared otherwise.
NOTE
Normally the Z condition code bit is set via programming before the
start of an operation. This allows successful tests for zero results
upon completion of multiple-precision operations.
Instruction Format:
Instruction Fields:
Register Dy/Ay field — Specifies the destination register.
If R/M = 0, specifies a data register.
If R/M = 1, specifies an address register for the predecrement addressing
mode.
R/M field — Specifies the operand addressing mode:
0 — The operation is data register to data register.
1 — The operation is memory to memory.
Register Dx/Ax field — Specifies the source register:
If R/M = 0, specifies a data register.
If R/M = 1, specifies an address register for the predecrement addressing
mode.
X
*
N
U
Z
*
V
U
C
*
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
1
0
0
0
REGISTER Ry
1
0
0
0
0
R/M
REGISTER Rx
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.