Operations:

Syntax:

Operation:

Operands:

Program Counter:

Opcode

Comment:

Stack:

ICALL

PC(15:0) = Z(15:0)

None

See Operation

1001010100001001

Devices with 16-bit PC, 128 KB program memory maximum.

STACK = PC + 1

SP = SP - 2 (2 bytes, 16 bits)

ICALL

PC(15:0) = Z(15:0)

PC(21:16) = 0

None

See Operation

1001010100001001

Devices with 22-bit PC, 8 MB program memory maximum.

STACK = PC + 1

SP = SP - 3 (3 bytes, 22 bits)

Description

Indirect call of a subroutine pointed to by the Z (16-bit) Pointer Register in the Register File. The Z-Pointer Register is 16 bits wide and allows a call to a subroutine within the lowest 64K words (128 KB) section in the program memory space. The Stack Pointer uses a post-decrement scheme during ICALL.

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:

      mov   r30,r0  ; Set offset to call table
      icall         ; Call routine pointed to by r31:r30

Words

1 (2 bytes)

Table Cycles

Name

Cycles

9/16-bit PC

22-bit PC

AVRe

3(1)

4(1)

AVRxm

2(1)

3(1)

AVRxt

2

3

AVRrc

3

N/A

Note:

1.

Cycle times for data memory access assume internal RAM access and are not valid for accessing external RAM.