[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

or (OR) Instruction

Purpose

Logically ORs the contents of two general-purpose registers and stores the result in another general-purpose register.

Syntax

or RA,RS,RB
or. RA,RS,RB

See "Extended Mnemonics of Fixed-Point Logical Instructions" for more information.

Description

The or instruction logically ORs the contents of general-purpose register (GPR) RS with the contents of GPR RB and stores the result in GPR RA.

The or instruction has two syntax forms. Each syntax form has a different effect on Condition Register Field 0.

Syntax Form Overflow Exception (OE) Fixed-Point Exception Register Record Bit (Rc) Condition Register Field 0
or None None 0 None
or. None None 1 LT,GT,EQ,SO

The two syntax forms of the or instruction never affect the Fixed-Point Exception Register. If the syntax form sets the Record (Rc) bit to 1, the instruction affects the Less Than (LT) zero, Greater Than (GT) zero, Equal To (EQ) zero, and Summary Overflow (SO) bits in Condition Register Field 0.

Parameters

RA Specifies target general-purpose register where result of operation is stored.
RS Specifies source general-purpose register for operation.
RB Specifies source general-purpose register for operation.

Examples

  1. The following code logically ORs the contents of GPR 4 and GPR 7 and stores the result in GPR 6:
    # Assume GPR 4 contains 0x9000 3000.
    # Assume GPR 7 contains 0x789A 789B.
    or 6,4,7
    # GPR 6 now contains 0xF89A 789B.
  2. The following code logically ORs the contents of GPR 4 and GPR 7, loads the result in GPR 6, and sets Condition Register Field 0 to reflect the result of the operation:
    # Assume GPR 4 contains 0xB004 3000.
    # Assume GPR 7 contains 0x789A 789B.
    or. 6,4,7
    # GPR 6 now contains 0xF89E 789B.

Related Information

Fixed-Point Processor.

Fixed-Point Logical Instructions.


[ Previous | Next | Contents | Home | Search ]