|
Syntax: |
Operation: |
Operands: |
Program Counter: |
Opcode |
Comment |
Stack: |
|
PUSH Rr |
STACK = Rr |
0 <= r <= 31 |
PC = PC + 1 |
1001001ddddd1111 |
SP = SP - 1 |
This instruction stores the contents of register Rr on the STACK. The Stack Pointer is post-decremented by 1 after the PUSH.
This instruction is not available on all devices. Refer to Appendix A.
|
I |
– |
||
|
T |
– |
||
|
H |
– |
||
|
S |
– |
||
|
V |
– |
||
|
N |
– |
||
|
Z |
– |
||
|
C |
– |
call routine ; Call subroutine
...
routine:
push r14 ; Save r14 on the Stack
push r13 ; Save r13 on the Stack
...
pop r13 ; Restore r13
pop r14 ; Restore r14
ret ; Return from subroutine
1 (2 bytes)
|
Name |
Cycles |
|
AVRe |
2 |
|
AVRxm |
1(1) |
|
AVRxt |
1 |
|
AVRrc |
1 |
Note:
1.
Cycle times for data memory access assume internal RAM access and are not valid for accessing external RAM.