Login
Plus/4 EncyclopediaFirstBackNextLast

AND
Category
Reference/6502 Programming/Assembly

Topic
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.

Example
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 modeSyntaxOpcodeBytesCycles
Immediate addressing modeAND #$44$2922
Zero PageAND $44$2522
Zero Page,XAND $44,X$3523
AbsoluteAND $4400$2D34
Absolute,XAND $4400,X$3D34+
Absolute,YAND $4400,Y$3934+
Indirect,XAND ($44,X)$2126
Indirect,YAND ($44),Y$3125+


+ add 1 cycle if page boundary crossed


See Also
EOR, ORA 



Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon