Atmel C51 Manual Página 36

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 116
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 35
The 8051 Instruction Set
Atmel 8051 Microcontrollers Hardware Manual 1-34
4316E–8051–01/07
1.14.13 DECbyte
Function: Decrement
Description: DEC byte decrements the variable indicated by 1. An original value of 00H underflows to 0FFH. No flags are
affected. Four operand addressing modes are allowed: accumulator, register, direct, or register-indirect.
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: Register 0 contains 7FH (01111111B). Internal RAM locations 7EH and 7FH contain 00H and 40H, respectively.
The following instruction sequence,
DEC @R0
DEC R0
DEC @R0
leaves register 0 set to 7EH and internal RAM locations 7EH and 7FH set to 0FFH and 3FH.
DEC A
Bytes: 1
Cycles: 1
Encoding: 0 0 0 1 0 1 0 0
Operation: DEC
(A) (A) - 1
DEC R
n
Bytes: 1
Cycles: 1
Encoding: 0 0 0 1 1 r r r
Operation: DEC
(R
n
) (R
n
) - 1
DEC direct
Bytes: 2
Cycles: 1
Encoding: 0 0 0 1 0 1 0 1 direct address
Operation: DEC
(direct) (direct) - 1
DEC @R
i
Bytes: 1
Cycles: 1
Encoding: 0 0 0 1 0 1 1 i
Operation: DEC
((R
i
)) ((R
i
)) - 1
Vista de página 35
1 2 ... 31 32 33 34 35 36 37 38 39 40 41 ... 115 116

Comentários a estes Manuais

Sem comentários