UNPK

UNPK

Operation:
Source (Packed BCD) + adjustment -->;
Destination (Unpacked BCD)

Compatibility: MC68020/MC68030/MC68040

Assembler Syntax:
UNPK -(Ax), -(Ay), #<adjustment>
UNPK Dx, Dy, #<adjustment>

Attributes: Unsized

Description: Places the two BCD digits in the source operand
byte into the lower nibbles of two bytes, and places zero
bits in the upper nibbles of both bytes. Adds the adjustment
value to this unpacked value. Condition codes are not altered.

When both operands are data registers, the instruciton
unpacks the source register contents, adds the extension
word, and places the result in the destination register.
The high word of the distination register is unaffected.

When the specified addressing mode is predecrement, the
instruction extracts two BCD digits from a byte at the source
address. After unpacking the digits and adding the adjustment
word, the instruction writes the two bytes to the destination
address.

Condition Codes:
Not affected.

Instruction Format:
\i2+---3Reg Dy/Ay,++---1RM,3Reg Dx/Ax,016-bit Extension: Adjustment,

Instruction Fields:
Register Dy/Ay field -- Specifies the destination register.
If RM = 0, specifies a data register.
If RM = 1, specifies an address register in the
predecrement addressing mode.
RM 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 data register.
If RM = 0, specifies a data register.
If RM = 1, specifies an address register in the
predecrement addressing mode.
Adjustment field -- Immediate data word that is added to the
source operand. Appropriate constants can be used as
the adjustment, to translate from BCD to the desired
code. The constant used for ASCII is $3030; for
EBCDIC, $F0F0.

Related Instructions:
PACK,474
.498000