ANDI
Operation:
•
#xx
D 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
:
Before Execution
CCR
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 DESCRIPTIONS
AND Immediate with Control Register
;clear carry bit C in cond. code register
$31
INSTRUCTION SET DETAILS
Assembler Syntax:
AND(I) #xx,D
After Execution
CCR
$30
ANDI
MOTOROLA