English
Language : 

MC68030 Datasheet, PDF (88/602 Pages) Motorola, Inc – ENHANCED 32-BIT MICROPROCESSOR
Instruction Set Summary
3.2.7 Binary–coded Decimal Instructions
Five instructions support operations on binary-coded decimal (BCD) numbers. The
arithmetic operations on packed BCD numbers are add decimal with extend (ABCD),
subtract decimal with extend (SBCD), and negate decimal with extend (NBCD). PACK and
UNPACK instructions aid in the conversion of byte encoded numeric data, such as ASCII or
EBCDIC strings, to BCD data and vice versa. Table 3–7 is a summary of the BCD
operations.
Instruction
ABCD
NBCD
PACK
SBCD
UNPK
Operand Syntax
Dn,Dn
–(An)
〈ea〉
–(An),–(An)
#〈data〉
Dn,Dn,# 〈data〉
Dn,Dn
–(An),–(An)
–(An)
#〈data〉
Dn,Dn,#〈data〉
Table 3-7. BCD Operations
Operand Size
8
8
8
16→8
16→8
8
8
8→16
8→16
Operation
source10 + destination10 + X → destination
0 - destination10 –X → destination
unpackaged source + immediate data → packed
destination
destination10 - source10 – X → destination
packed source → unpacked source
unpacked source + immediate data →
unpacked destination
3-10
MC68030 USER’S MANUAL
MOTOROLA