Keil Logo

Ax51 Introduction ANL

Logical AND

Description  

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

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
ANL A, #immediate_data
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, @Rn
C AC F0 RS1 RS0 OV P
Bytes   1
Cycles   1
Encoding   0101011n
Operation  
ANL
A = A AND (Rn)
Example  
ANL A, @R0
ANL A, direct_address
C AC F0 RS1 RS0 OV P
Bytes   2
Cycles   1
Encoding   01010101, direct_address
Operation  
ANL
A = A AND (direct_address)
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_address
C AC F0 RS1 RS0 OV P
Bytes   2
Cycles   2
Encoding   10110000, bit_address
Operation  
ANL
C = C AND NOT (bit_address)
Example  
ANL C, /22h
ANL C, bit_address
C AC F0 RS1 RS0 OV P
Bytes   2
Cycles   2
Encoding   10000010, bit_address
Operation  
ANL
C = C AND (bit_address)
Example  
ANL C, 22h
ANL direct_address, A
C AC F0 RS1 RS0 OV P
Bytes   2
Cycles   1
Encoding   01010010, direct_address
Operation  
ANL
(direct_address) = (direct_address) AND A
Example  
ANL 40h, A
ANL direct_address, A
C AC F0 RS1 RS0 OV P
Bytes   2
Cycles   1
Encoding   01010011, direct_address, immediate
Operation  
ANL
(direct_address) = (direct_address) 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.