EasyManua.ls Logo

Atmel AVR - 62 ICALL - Indirect Call to Subroutine; Description; Status Register (SREG) and Boolean Formula

Atmel AVR
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
62. ICALL – Indirect Call to Subroutine
62.1. Description
Calls to a subroutine within the entire 4M (words) Program memory. The return address (to the instruction
after the CALL) will be stored onto the Stack. See also RCALL. The Stack Pointer uses a post-decrement
scheme during CALL.
This instruction is not available in all devices. Refer to the device specific instruction set summary.
Operation: Comment:
(i) PC(15:0) ← Z(15:0) Devices with 16-bit PC, 128KB Program memory maximum.
(ii) PC(15:0) ← Z(15:0)
PC(21:16) ← 0
Devices with 22-bit PC, 8MB Program memory maximum.
Syntax: Operands: Program Counter: Stack:
(i) ICALL None See Operation STACK ← PC + 1
SP ← SP - 2 (2 bytes,
16 bits)
(ii) ICALL None See Operation STACK ← PC + 1
SP ← SP - 3 (3 bytes,
22 bits)
16-bit Opcode:
1001 0101 0000 1001
62.2. 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)
Cycles 3 devices with 16-bit PC
4 devices with 22-bit PC
Cycles XMEGA
®
2 devices with 16-bit PC
3 devices with 22-bit PC
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
98

Table of Contents

Related product manuals