Move Alpha (MVA)/OP=10

Format

OP AF BF A Syllable B Syllable

OP = 10

AF length of the A Syllable. 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 the A Syllable is a literal.
BF length of the B Syllable. A value of 00 is equal to a length of 100 units (digits or characters as specified by the B address controller). BF may be indirect.

The A Syllable is the address of the source data field. Address may be indexed, indirect or extended. Data types may be UN, UA or SN.
The B Syllable is the address of the destination data field. Address may be indexed, indirect or extended. Data types may be UN, UA or SN.

Function

The Move Alpha instruction moves digits or characters, depending on the address controllers, from one location in memory to another memory location, left justified.

AF > BF

If the source data field is longer than the destination data field (AF > BF), move the left most BF units from the A field to the B field, ignoring the remainder of the A field data, and set the Overflow Flag.

AF < BF

If the source data field is shorter than the destination data field (AF < BF), move the data and fill the destination data field with trailing zeros (SN or UN) or EBCDIC blank characters (UA).

UA to UA

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

UN to UN

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

SN to SN

When both address controllers specified signed 4-bit format (SN - SN), move each digit and set the sign of the destination data filed to the standard EBCDIC form (C = positive, D = negative) of the sign of the source data field. Note that a negative zero remains a negative zero.

UA to UN

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

UA to SN

When the A and B address controllers specify UA and SN respectively, only move the low order digit of each character in the source data field to the destination data field. Set the sign of the destination data field to the standard EBCDIC sign for the interpreted value of the sign located in the most significant digit of the source data field.

UN to UA

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

UN to SN

When the A and B address controllers specify UN and SN respectively, move each digit and set the sign of the destionation data field to the standard EBCDIC positive sign code (C).

SN to UN

When the A and B address controllers specify SN and UN respectively, move each digit and ignore the sign of the source data field except for setting the Comparison Flags;

SN to UA

When the A and B address controllers specify SN and UA respectively, move each digit and set the zone (high order) digit of the character to be stored in the destination data field to the standard EBCDIC numeric subset code (F). The most significant digit of the destination data field is set to the standard EBCDIC form of the sign of the source field.

Comparison Flags

Set the Comparison Flags to HIGH if the numeric digits moved from the source data field are non-zero and the sign of the source field is interpreted as positive.

Set the Comparison Flags to EQUAL if the numeric digits moved from the source data field are all zero.

Set the Comparison Flags to LOW if the numeric digits moved from the source data field are non-zero and the sign of the source field is interpreted as negative.

In the case of overlap, if the arithmetic difference between the B and A address is odd, the setting of the Comparison Flags is unspecified. If the arithmetic difference between the B and A address is even, then the setting of the Comparison Flags is based upon the source field consisting only of the digits from the A to the B address.

Overlap

When the A and B address controllers indicate UA data, the field lengths are equal (AF = BF) and the value of the final B address is within the A data field [A + 2, A + (2 * AF)], repeat the source data field between the A and B addresses throughout the destination data field.

Cases of overlaping A and B, other than described above, may produce inconsistent results. See Compatibility Notes A.03.

Examples

Example (1) Move Numeric Field to Signed Numeric Field

OP AF BF A Syllable B Syllable
10 05 03 A Field UN B Field SN
                    BEFORE              AFTER
   A Field           23511            unchanged
   B Field            nnnn               C235
   Comparison Flags   nn                 HIGH
   Overflow Flag      nn                  ON

Example (2) Move Signed Numeric Field to an Alpha Field

OP AF BF A Syllable B Syllable
10 03 03 A Field SN B Field UA
                    BEFORE              AFTER
   A Field           +823             unchanged
   B Field          nnnnnn             C8F2F3
   Comparison Flags   nn                 HIGH
   Overflow Flag      nn              unchanged

Example (3) Move an Alpha field to a Signed Numeric field

OP AF BF A Syllable B Syllable
10 03 05 A Field UA B Field SN
                    BEFORE              AFTER
   A Field          D4D5D6            unchanged
   B Field          nnnnnn             D45600
   Comparison Flags   nn                 LOW
   Overflow Flag      nn              unchanged

Example (4) Repeat first character

OP AF BF A Syllable B Syllable
10 05 05 A Field UA A Field + 2 UA
                    BEFORE              AFTER
   A Field       F0nnnnnnnnnn        F0F0F0F0F0F0
   Comparison Flags   nn                HIGH
   Overflow Flag      nn              unchanged
instructions/mva.txt · Last modified: 2011/07/27 09:02 by scott
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki