Operations:

Syntax:

Operation:

Operands:

Program Counter:

Opcode

Comment

Stack

MOVW Rd,Rr

R[d+1]:Rd = R[r+1]:Rr

d ∈ {0,2,...,30}, r ∈ {0,2,...,30}

PC = PC + 1

00000001ddddrrrr

Description

This instruction makes a copy of one register pair into another register pair. The source register pair Rr+1:Rr is left unchanged, while the destination register pair Rd+1:Rd is loaded with a copy of Rr + 1:Rr.

This instruction is not available on all devices. Refer to Appendix A.

Status Register (SREG) and Boolean Formula

I

T

H

S

V

N

Z

C

Example:

        movw  r17:16,r1:r0  ; Copy r1:r0 to r17:r16
        call  check         ; Call subroutine
        ...
check:  cpi   r16,0x11      ; Compare r16 to 0x11
        ...
        cpi   r17,0x32      ; Compare r17 to 0x32
        ...
        ret                 ; Return from subroutine

Words

1 (2 bytes)

Table Cycles

Name

Cycles

AVRe

1

AVRxm

1

AVRxt

1

AVRrc

N/A