section 7 - Index of

section 7 - Index of section 7 - Index of

11.07.2015 Views

ANDIAND Immediate with Control RegisterANDIOperation:Assembler Syntax:#xx. D .... DAND(I) #xx,Dwhere • denotes the logical AND operatorDescription: Logically AND the 8-bit immediate operand (#xx) with the contents of thedestination control register D and store the result in the destination control register. Thecondition codes are affected only when the condition code register (CCR) is specified asthe destination operand.Restrictions: The ANDI #xx,MR instruction cannot be used immediately before anENDDO 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 condo code registerBefore ExecutionCCR~I _______ $_3_1 ______ ~After ExecutionCCR~I _______ $_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 thecondition code register.-

ANDIAND Immediate with Control RegisterANDICondition Codes:15 14 13 12 11 10 9 8 7 6 5 4 3 2I: I DM I T I·· J:' I so I 11 I '~ I: I LIE I U CCR N I zFor CCR Operand:S - Cleared if bit 7 of the immediate operand is clearedL - Cleared if bit 6 of the immediate operand is clearedE - Cleared if bit 5 of the immediate operand is clearedU - Cleared if bit 4 of the immediate operand is clearedN - Cleared if bit 3 of the immediate operand is clearedZ - Cleared if bit 2 of the immediate operand is clearedV - Cleared if bit 1 of the immediate operand is clearedC - Cleared if bit 0 of the immediate operand is clearedoFor MR and OMR Operands: The condition codes are not affected using these operands.Instruction Format:AND(I) #xx,DOpcode:23 16 1510 0 0 0 0 0 0 o 1 i i8 7 oi 11 o 1 1 1 0 E E IInstruction Fields:#xx=8-bit Immediate Short Data -iii iii i iDEEMR 00CCR 01OMR 10Timing: 2 oscillator clock cyclesMemory: 1 program word

ANDIAND Immediate with Control RegisterANDIOperation:Assembler Syntax:#xx. D .... DAND(I) #xx,Dwhere • denotes the logical AND operatorDescription: Logically AND the 8-bit immediate operand (#xx) with the contents <strong>of</strong> thedestination control register D and store the result in the destination control register. Thecondition codes are affected only when the condition code register (CCR) is specified asthe destination operand.Restrictions: The ANDI #xx,MR instruction cannot be used immediately before anENDDO or RTI instruction and cannot be one <strong>of</strong> 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 condo code registerBefore ExecutionCCR~I _______ $_3_1 ______ ~After ExecutionCCR~I _______ $_30 ______ ~Explanation <strong>of</strong> 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 <strong>of</strong> the condition code register and stores the result in thecondition code register.-

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!