Table of Contents

Move Repeat (MVR)/OP=14

Format

OP AF BF A Syllable B Syllable

OP = 14

AF is the length of the A field. A value of 00 is equal to a length of 100 units (digits or characters as specified by the A address controller). AF may be indirect or may indicate that the A Syllable is a literal.
BF is the number of repetitions. A value of 00 is equal to 100 repetitions. BF may be indirect.

The A Syllable is the address of the source data field. Address may be indexed, indirect or extended. The final address controller data type should be UN or UA. An SN data type will be treated as UN.
The B Syllable is the address of the destination data field. Address may be indexed, indirect or extended. The final address controller data type should be UN or UA. An SN data type will be treated as UN.

Function

The Move Repeat instruction moves AF number of digits or characters depending on the address controllers from the source field to the destination field such that there are BF consecutive copies of the result in the destination field.

When both address controllers specify 8-bit format (UA), move each character.

When both address controllers specify unsigned 4-bit format (UN), move each digit.

When the A and B controllers specify UA and UN respectively, only move the low order digit from each character in the source data field to the destination data field.

When the A and B controllers specify UN and UA respectively, move each digit and set the zone (high order) digit of the character in the destination data field to the standard EBCDIC numeric subset code (F).

Comparison Flags

The Comparison Flags are unchanged by this instruction.

Overlap

A and B may totally overlap or may have matching type-address overlap (see 3.5.3).

Partial overlap of A and B other than matching type-address overlap may produce incompatible results. See Compatibility Notes A.15.

Examples

Example (1) Repeat a 3 digit numeric field 4 times

OP AFBF A Syllable B Syllable
14 0304 A Field UN B Field UN
                    BEFORE              AFTER
   A Field            057             unchanged
   B Field       nnnnnnnnnnnn       057057057057
   Comparison Flags   nn              unchanged
   Overflow Flag      nn              unchanged

Example (2) Repeat a 3 character alpha field twice in a numeric field

OP AFBF A Syllable B Syllable
l4 0302 A Field UA B Field UN
                    BEFORE              AFTER
   A Field          D4D5D6            unchanged
   B Field          nnnnnn             456456
   Comparison Flags   nn              unchanged
   Overflow Flag      nn              unchanged