Atmel C51 Handbuch Seite 40

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 116
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 39
The 8051 Instruction Set
Atmel 8051 Microcontrollers Hardware Manual 1-38
4316E–8051–01/07
1.14.17 INC DPTR
1.14.18 JB blt,rel
Function: Increment Data Pointer
Description: INC DPTR increments the 16-bit data pointer by 1. A 16-bit increment (modulo 2
16
) is performed, and an
overflow of the low-order byte of the data pointer (DPL) from 0FFH to 00H increments the high-order byte (DPH).
No flags are affected.
This is the only 16-bit register which can be incremented.
Example: Registers DPH and DPL contain 12H and 0FEH, respectively. The following instruction sequence,
INC DPTR
INC DPTR
INC DPTR
changes DPH and DPL to 13H and 01H.
Bytes: 1
Cycles: 2
Encoding: 1 0 1 0 0 0 1 1
Operation: INC
(DPTR) (DPTR) + 1
Function: Jump if Bit set
Description: If the indicated bit is a one, JB jump to the address indicated; otherwise, it proceeds with the next instruction.
The branch destination is computed by adding the signed relative-displacement in the third instruction byte to the
PC, after incrementing the PC to the first byte of the next instruction. The bit tested is not modified. No flags are
affected.
Example: The data present at input port 1 is 11001010B. The Accumulator holds 56 (01010110B). The following instruction
sequence,
JB P1.2,LABEL1
JB ACC. 2,LABEL2
causes program execution to branch to the instruction at label LABEL2.
Bytes: 3
Cycles: 2
Encoding: 0 0 1 0 0 0 0 0 bit address rel. address
Operation: JB
(PC) (PC) + 3
IF (bit) = 1
THEN
(PC) (PC) + rel
Seitenansicht 39
1 2 ... 35 36 37 38 39 40 41 42 43 44 45 ... 115 116

Kommentare zu diesen Handbüchern

Keine Kommentare