Move Data (MVD)/OP=08

Format

OP AF BF A Syllable B Syllable C Syllable

OP = 08

AF is the Forward/Backward Variant. AF = 00 means move data Forward. Otherwise, move data Backward. AF may be indirect. A literal flag will cause an Invalid Instruction fault (IEX = 21). See Compatibility Notes A.20.2.
BF unused and reserved, but may be specified as an indirect field length.

The A Syllable is the address of the source data field. Address may be indexed, indirect or extended. The final address controller is ignored.
The B Syllable is the starting address of the destination data field. Address may be indexed, indirect or extended. The final address controller is ignored.
The C Syllable is the end address of the destination data field. Address may be indexed, indirect or extended. The final address controller is ignored.

Function

The Move Data instruction moves data from the source data field to the destination data field starting with the B address and continuing until the C address.

Move Forward Variant

If AF == 00, a move forward takes place. The end C address must be greater than the starting B address, otherwise the instruction has no effect. source field digits are moved to the destination field in an ascending manner until the B address is equal to or greater than the C address. No data is moved into the C address memory location.

Move Backward Variant

If AF == 01, a move backward takes place. The end C address must be less than the starting B address, otherwise the instruction has no effect. source field digits are moved to the destination field in a descending order until the B address is equal to or less than the C address. No data is moved into the B address location. No data is moved from the A address location.

Comparison Flags

The Comparison Flags and Overflow Flags are unchanged by this instruction.

Overlap

Partial overlap of A and B may produce inconsistent results. See Compatibility Notes A.20.1.

Examples

Example (1) Forward Move

OP AF BF A Syllable B Syllable C Syllable
08 00 00 001000 002000 002016
                    BEFORE              AFTER
   001000       0123456789ABCDEF      unchanged
   002000       nnnnnnnnnnnnnnnn   0123456789ABCDEF

Example (2) Backward Move

OP AF BF A Syllable B Syllable C Syllable
08 01 00 005010 006032 006020
                    BEFORE         AFTER
   004098       9876543210AB     unchanged
   006020       nnnnnnnnnnnn   9876543210AB
instructions/mvd.txt · Last modified: 2008/05/13 07:22 (external edit)
 
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