Keil Logo

ANL

The ANL instruction performs a bitwise logical AND operation between the specified byte or bit operands and stores the result in the destination operand.

Note

When this instruction is used to modify an output port, the value used as the port data will be read from the output data latch, not the input pins of the port.

See Also: ORL, XRL

ANL A, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
01010100 immediate
Operation
ANL
A = A AND immediate
Example
ANL A, #3Fh
ANL A, @Ri
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
0101011i
Operation
ANL
A = A AND (Ri)
Example
ANL A, @R0
ANL A, direct
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
01010101 direct
Operation
ANL
A = A AND (direct)
Example
ANL A, 40h
ANL A, Rn
C AC F0 RS1 RS0 OV   P
Bytes 1
Cycles 1
Encoding
01011nnn
Operation
ANL
A = A AND Rn
Example
ANL A, R4
ANL C, /bit
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
10110000 bit
Operation
ANL
C = C AND NOT (bit)
Example
ANL C, /22h
ANL C, bit
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 2
Encoding
10000010 bit
Operation
ANL
C = C AND (bit)
Example
ANL C, 22h
ANL direct, A
C AC F0 RS1 RS0 OV   P
Bytes 2
Cycles 1
Encoding
01010010 direct
Operation
ANL
(direct) = (direct) AND A
Example
ANL 40h, A
ANL direct, #immediate
C AC F0 RS1 RS0 OV   P
Bytes 3
Cycles 2
Encoding
01010011 direct immediate
Operation
ANL
(direct) = (direct) AND immediate
Example
ANL 30h, #77h
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.