EasyManua.ls Logo

Motorola MC68030 - Binary-Coded Decimal Instructions

Motorola MC68030
254 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Instruction Set Summary
3-10 MC68030 USER’S MANUAL MOTOROLA
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.
Table 3-7. BCD Operations
Instruction Operand Syntax Operand Size Operation
ABCD Dn,Dn
–(An)
8
8
source
10
+ destination
10
+ X destination
NBCD ea 8 0 - destination
10
–X destination
PACK –(An),–(An)
#data
Dn,Dn,# data
168
168
unpackaged source + immediate data packed
destination
SBCD Dn,Dn
–(An),–(An)
8
8
destination
10
- source
10
– X destination
UNPK –(An)
#data
Dn,Dn,#data
816
816
packed source unpacked source
unpacked source + immediate data
unpacked destination

Table of Contents

Related product manuals