Logical OR (ORR)/OP=43

Format

OP AF BF A Syllable B Syllable C Syllable

OP = 43

AF is the length of the A Syllable field. AF may be indirect or may indicate the A Syllable is a literal. A value of 00 is equal to a length of 100 units.
BF is the length of the B Syllable field. BF may be indirect. A value of 00 is equal to a length of 100 units.

The A Syllable is the address of the A source field. Address may be indexed, indirect or extended. The final address controller data type must be UN or UA and must be the same as the other address controllers.
The B Syllable is the address of the B source field. Address may be indexed, indirect or extended. The final address controller data type must be UN or UA and must be the same as the other address controllers.
The C Syllable is the address of the result field. Address may be indexed, indirect or extended. The final address controller data type must be UN or UA and must be the same as the other address controllers.

If the data types are not all UA or all UN cause an Invalid Instruction (IEX = 03) fault. See Compatibility Notes A.11.1.

Function

The Logical AND instruction stores the logical sum (OR) of two data fields (A & B), located in memory, into a third memory location (C).

The C field length is equal to the larger of AF or BF. If the A and B fields are not of equal length, pad the shorter by adding trailing characters/digits of all zero bits.

Comparison Flags

Set the Comparison Flags to HIGH if the least significant bit of the result is a one; otherwise, set them to EQUAL.

Overlap

Total overlap or matching type-address overlap of any of the fields is allowed. Partial overlap of the A or B fields with C other than matching type-address overlap may produce incompatible results. See Compatibility Notes A.11.2.

Examples

Example (1) OR Two Numeric Fields

OP AF BF A Syllable B Syllable C Syllable
43 02 03 A field (UN) B field (UN) C Field (UN)
                    BEFORE         AFTER
  A FIELD             81         unchanged
  B FIELD            223         unchanged
  C FIELD            nnn            A33
  COMPARISON          nn           HIGH

Example (2) OR Two Alpha Fields

OP AF BF A Syllable B Syllable C Syllable
43 03 02 A field (UA) B field (UA) C field (UA)
                    BEFORE         AFTER
  A FIELD           C1C2C4       unchanged
  B FIELD             F2F3       unchanged
  C FIELD          nnnnnn         F3F3C4
  COMPARISON          nn            EQUAL
instructions/orr.txt · Last modified: 2008/11/25 14:08 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