INSTRUCTION DESCRIPTIONS

 

ANDI

AND Immediate with Control Register

ANDI

Operation:

Assembler Syntax:

 

 

#xx DD

AND(I) #xx,D

 

where denotes the logical AND operator

Description: Logically AND the 8-bit immediate operand (#xx) with the contents of the destination control register D and store the result in the destination control register. The condition codes are affected only when the condition code register (CCR) is specified as the destination operand.

Restrictions: The ANDI #xx,MR instruction cannot be used immediately before an ENDDO or RTI instruction and cannot be one of the last three instructions in a DO loop (at LA-2, LA-1, or LA).

The ANDI #xx,CCR instruction cannot be used immediately before an RTI instruction.

Example:

:

AND #$FE,CCR ;clear carry bit C in cond. code register

:

CCR

Before Execution

$31

CCR

After Execution

$30

Explanation of Example: Prior to execution, the 8-bit condition code register (CCR) contains the value $31. The AND #$FE,CCR instruction logically ANDs the immediate 8- bit value $FE with the contents of the condition code register and stores the result in the condition code register.

A - 34

INSTRUCTION SET DETAILS

MOTOROLA

Page 303
Image 303
Motorola 24-Bit Digital Signal Processor, DSP56000 manual Immediate with Control Register, Operation Assembler Syntax