[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Assembler Language Reference

and (AND) Instruction

Purpose

Logically ANDs the contents of two general-purpose registers and places the result in a general-purpose register.

Syntax

Bits Value
0-5 31
6-10 RS
11-15 RA
16-20 RB
21-30 28
31 Rc
and RA, RS, RB
and. RA, RS, RB

Description

The and instruction logically ANDs the contents of general-purpose register (GPR) RS with the contents of GPR RB and places the result into the target GPR RA.

The and 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
and None None 0 None
and. None None 1 LT,GT,EQ,SO

The two syntax forms of the and 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 ANDs the contents of GPR 4 with the contents of GPR 7 and stores the result in GPR 6:

    # Assume GPR 4 contains 0xFFF2 5730.
    # Assume GPR 7 contains 0x7B41 92C0.
    and 6,4,7
    # GPR 6 now contains 0x7B40 1200.
  2. The following code logically ANDs the contents of GPR 4 with the contents of GPR 7, stores the result in GPR 6, and sets Condition Register Field 0 to reflect the result of the operation:

    # Assume GPR 4 contains 0xFFF2 5730.
    # Assume GPR 7 contains 0xFFFF EFFF.
    and. 6,4,7
    # GPR 6 now contains 0xFFF2 4730.

Related Information

Fixed-Point Processor .

Fixed-Point Logical Instructions .

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]