Operations:

Syntax:

Operation:

Operands:

Program Counter:

Opcode

Comment

Stack:

RJMP

PC = PC + k + 1

k -2K <= k < 2K

PC = PC + k + 1

1100kkkkkkkkkkkk

Unchanged

Description

Relative jump to an address within PC - 2K +1 and PC + 2K (words). For AVR microcontrollers with pogram memory not exceeding 4K words (8 KB), this instruction can address the entire memory from every address location. See also JMP.

Status Register (SREG) and Boolean Formula

I

T

H

S

V

N

Z

C

Example:

      cpi   r16,0x42  ; Compare r16 to 0x42
      brne  error     ; Branch if r16 <> 0x42
      rjmp  ok        ; Unconditional branch
error:
      add   r16,r17   ; Add r17 to r16
      inc   r16       ; Increment r16
ok: 
      nop             ; Destination for rjmp (do nothing)

Words

1 (2 bytes)

Table Cycles

Name

Cycles

AVRe

2

AVRxm

2

AVRxt

2

AVRrc

2