PACK - Pack Instruction

PACK - Pack Instruction - Convert from character to packed decimal






Example:    PACK    PACKEDFIELD,CHARACTERFIELD

Explained:    pack instruction - field where the characters will be packed into - location of characters that will be packed

English:  the format of the second operand is changed from zoned to signed packed decimal and the result is placed at the first operand location

How it works:
 * 1) Flips the low order byte
 * 2) Strips the zones
 * 3) packs everything together
 * 4) pads the result with high order bytes of x'00'

Principles of Operation Page:    7-182