Atmel C51 Manual Página 26

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 116
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 25
The 8051 Instruction Set
Atmel 8051 Microcontrollers Hardware Manual 1-24
4316E–8051–01/07
1.14.2 ADD A,<src-byte>
Function: Add
Description: ADD adds the byte variable indicated to the Accumulator, leaving the result in the Accumulator. The carry and
auxiliary-carry flags are set, respectively, if there is a carry-out from bit 7 or bit 3, and cleared otherwise. When
adding unsigned integers, the carry flag indicates an overflow occurred.
OV is set if there is a carry-out of bit 6 but not out of bit 7, or a carry-out of bit 7 but not bit 6; otherwise, OV is
cleared. When adding signed integers, OV indicates a negative number produced as the sum of two positive
operands, or a positive sum from two negative operands.
Four source operand addressing modes are allowed: register, direct, register-indirect, or immediate.
Example: The Accumulator holds 0C3H (1100001lB), and register 0 holds 0AAH (10101010B). The following instruction,
ADD A,R0
leaves 6DH (01101101B) in the Accumulator with the AC flag cleared and both the carry flag and OV set to 1.
ADD A,R
n
Bytes: 1
Cycles: 1
Encoding: 0 0 1 0 1 r r r
Operation: ADD
(A) (A) + (R
n
)
ADD A,direct
Bytes: 2
Cycles: 1
Encoding: 0 0 1 0 0 1 0 1 direct address
Operation: ADD
(A) (A) + (direct)
ADD A,@R
i
Bytes: 1
Cycles: 1
Encoding: 0 0 1 0 0 1 1 i
Operation: ADD
(A) (A) + ((R
i
))
ADD A,#data
Bytes: 2
Cycles: 1
Encoding: 0 0 1 0 0 1 0 0 immediate data
Operation: ADD
(A) (A) + #data
Vista de página 25
1 2 ... 21 22 23 24 25 26 27 28 29 30 31 ... 115 116

Comentários a estes Manuais

Sem comentários