| AND | Reference/6502 Programming/Assembly
AND (bitwise AND with accumulator) Affected flags: S Z
This opcode performs a bitwise AND operation between Accumulator and the operand. The end result will always be in the Accumulator.
LDA $FF07 AND #$40 at this point, A will contain $FF07 AND $40 = $00 (on PAL systems) or $40 on NTSC systems. BEQ pal_stuff
Addressing mode | Syntax | Opcode | Bytes | Cycles | Immediate addressing mode | AND #$44 | $29 | 2 | 2 | Zero Page | AND $44 | $25 | 2 | 2 | Zero Page,X | AND $44,X | $35 | 2 | 3 | Absolute | AND $4400 | $2D | 3 | 4 | Absolute,X | AND $4400,X | $3D | 3 | 4+ | Absolute,Y | AND $4400,Y | $39 | 3 | 4+ | Indirect,X | AND ($44,X) | $21 | 2 | 6 | Indirect,Y | AND ($44),Y | $31 | 2 | 5+ |
+ add 1 cycle if page boundary crossed
EOR, ORA |
| |
Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon |