AVR Instruction Set Nomenclature: Status Register (SREG ...
AVR Instruction Set Nomenclature: Status Register (SREG ...
AVR Instruction Set Nomenclature: Status Register (SREG ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
EICALL - Extended Indirect Call to Subroutine<br />
<strong>Instruction</strong> <strong>Set</strong><br />
Description:<br />
Indirect call of a subroutine pointed to by the Z (16 bits) pointer register in the register file and the EIND register in the I/O<br />
space. This instruction allows for indirect calls to the entire program memory space. This instruction is not implemented for<br />
devices with 2 bytes PC, see ICALL. The stack pointer uses a post-decrement scheme during EICALL.<br />
Operation:<br />
(i) PC(15:0) ← Z(15:0)<br />
PC(21:16) ← EIND<br />
Syntax: Operands: Program Counter: Stack:<br />
(i) EICALL None See Operation STACK ← PC + 1<br />
SP ← SP - 3 (3 bytes, 22 bits)<br />
16-bit Opcode:<br />
<strong>Status</strong> <strong>Register</strong> (<strong>SREG</strong>) and Boolean Formula:<br />
Example:<br />
1001 0101 0001 1001<br />
I T H S V N Z C<br />
- - - - - - - -<br />
ldi r16,$05 ; <strong>Set</strong> up EIND and Z pointer<br />
out EIND,r16<br />
ldi r30,$00<br />
ldi r31,$10<br />
eicall ; Call to $051000<br />
Words: 1 (2 bytes)<br />
Cycles: 4 (only implemented in devices with 22 bit PC)<br />
57