6.32.1 Description
Calls to a subroutine within the entire program memory. The return address (to the instruction after the CALL) will be stored on the Stack. (See also RCALL.) The Stack Pointer uses a post-decrement scheme during CALL.
This instruction is not available on all devices. Refer to Appendix A.
|
Operation: | ||||
|
(i) |
PC ← k Devices with 16-bit PC, 128 KB program memory maximum. | |||
|
(ii) |
PC ← k Devices with 22-bit PC, 8 MB program memory maximum. | |||
|
Syntax: |
Operands: |
Program Counter: |
Stack: | |
|
(i) |
CALL k |
0 ≤ k < 64K |
PC ← k |
STACK ← PC+2 SP ← SP-2, (2 bytes, 16 bits) |
|
(ii) |
CALL k | 0 ≤ k < 4M | PC ← k |
STACK ← PC+2 SP ← SP-3 (3 bytes, 22 bits) |
32-bit Opcode:
| 1001 | 010k | kkkk | 111k |
| kkkk | kkkk | kkkk | kkkk |
