Operation: Source (Unpacked BCD) + adjustment -->;
Destination (Packed BCD)
Compatability: MC68020/MC68030/MC68040
Assembler Syntax:
PACK -(Ax), -(Ay), #<adjustment>
PACK Dx, Dy, #<adjustment>
Attributes: Unsized
Description: Adjusts and packs the low four bits of each of
two bytes into a single byte.
When both operands are data registers, the adjustment
is added to the value contained in the source register.
Bits [11:8] and [3:0] of the intermediate result are
concatenated and placed in bits [7:0] of the destination
register. The remainder of the destination register is
unaffected.
Condition Codes:
Not affected.
Instruction Format:
\i1+---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 operand is data register to data register.
1 -- The operation is memory to memory.
Register Dx/Ax field -- Specifies the source 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. This word is zero to pack ASCII
or EBCDIC codes. Other values can be used for other
codes.
.473475