Binary-Coded Decimal Instructions; Bcd Operations - Motorola MC68030 User Manual

Enhanced 32-811 microprocessor
Hide thumbs Also See for MC68030:
Table of Contents

Advertisement

3.2.7 Binary-Coded Decimal Instructions
3-10
Five instructions support operations on binary-coded decimal (BCD) num-
bers. The arithmetic operations on packed BCD numbers are add decimal
with extend (ABCD), subtract decimal with extend (SBCD), and negate dec-
imal with extend (NBCD). PACK and UNPACK instructions aid in the con-
version 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.
Table 3-7. BCD Operations
Instruction
Operand Syntax
Operand Size
Operation
ABCD
Dn,Dn
8
sourcelO
+
destinationlO
+
X • destination
- (An), - (An)
8
NBCD
(ea)
8
o -
destinationlO - X • destination
PACK
-(An),-(An)
16.8
unpackaged source
+
immediate data. packed
#(data)
destination
Dn,Dn,#(data)
16.8
SBCD
Dn,Dn
8
destinationlO - sourcelO - X. destination
-(An),-(An)
8
UNPK
-(An),-(An)
8.16
packed source. unpacked source
#(data)
unpacked source
+
immediate data.
Dn,Dn,#(data)
8.16
unpacked destination
MC68030 USER'S MANUAL
MOTOROLA

Advertisement

Table of Contents
loading

Table of Contents