INSTRUCTION DESCRIPTIONS
A - 34 INSTRUCTION SET DETAILS MOTOROLA
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
:
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.
ANDI AND Immediate with Control Register ANDI
Before Execution After Execution
CCR CCR
$31 $30