Atmel C51 Handbuch Seite 29

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 116
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 28
The 8051 Instruction Set
1-27 Atmel 8051 Microcontrollers Hardware Manual
4316E–8051–01/07
1.14.5 ANL<dest-byte>,<src-byte>
Function: Logical-AND for byte variables
Description: ANL performs the bitwise logical-AND operation between the variables indicated and stores the results in the
destination variable. No flags are affected.
The two operands allow six addressing mode combinations. When the destination is the Accumulator, the source
can use register, direct, register-indirect, or immediate addressing; when the destination is a direct address, the
source can be the Accumulator or immediate data.
Note: When this instruction is used to modify an output port, the value used as the original port data will be read
from the output data latch, not the input pins.
Example: If the Accumulator holds 0C3H (1100001lB), and register 0 holds 55H (01010101B), then the following
instruction,
ANL A,R0
leaves 41H (01000001B) in the Accumulator.
When the destination is a directly addressed byte, this instruction clears combinations of bits in any RAM
location or hardware register. The mask byte determining the pattern of bits to be cleared would either be a
constant contained in the instruction or a value computed in the Accumulator at run-time. The following
instruction,
ANL P1,#01110011B
clears bits 7, 3, and 2 of output port 1.
ANL A,R
n
Bytes: 1
Cycles: 1
Encoding: 0 1 0 1 1 r r r
Operation: ANL
(A) (A)
(R
n
)
ANL A,direct
Bytes: 2
Cycles: 1
Encoding: 0 1 0 1 0 1 0 1 direct address
Operation: ANL
(A) (A)
(direct)
ANL A,@R
i
Bytes: 1
Cycles: 1
Encoding: 0 1 0 1 0 1 1 i
Operation: ANL
(A) (A)
((R
i
))
Seitenansicht 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 115 116

Kommentare zu diesen Handbüchern

Keine Kommentare