AND (IX+d)
AND (IY+d)
Bitwise AND
Rabbit 2000/3000/4000 Instruction
|
|
DD A6 d
|
AND (IX+d)
|
|
A = A & (IX+d)
|
|
FD A6 d
|
AND (IY+d)
|
|
A = A & (IY+d)
|
Description
Performs a bitwise AND operation between A and the byte whose address is:
- the sum of IX and the 8-bit signed displacement d, or
- the sum of IY and the 8-bit signed displacement d
The result is stored in A.
The Rabbit 4000 assembler views "AND A,(IX+d)" and "AND (IX+d)" as equivalent instructions. The
same is true for "AND A,(IY+d)" and "AND (IY+d)."
Example
If the byte in A contains the value 1011 1100 and the byte at memory location IX+d contains the value
1101 0101, then the execution of the instruction:
AND (IX+d)
would result in the byte in A becoming 1001 0100.