Binary-Coded Decimal Instructions - Motorola MC68030 User Manual

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

Advertisement

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
Operand Syntax
ABCD
Dn,Dn
–(An)
〈ea〉
NBCD
PACK
–(An),–(An)
#〈data〉
Dn,Dn,# 〈data〉
SBCD
Dn,Dn
–(An),–(An)
UNPK
–(An)
#〈data〉
Dn,Dn,#〈data〉
3-10
Table 3-7. BCD Operations
Operand Size
8
source
+ destination
10
8
8
0 - destination
unpackaged source + immediate data → packed
16→8
destination
16→8
8
destination
8
packed source → unpacked source
8→16
unpacked source + immediate data →
8→16
unpacked destination
MC68030 USER'S MANUAL
Operation
+ X → destination
10
–X → destination
10
– X → destination
- source
10
10
MOTOROLA

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents