Witam,
wogóle nie znam AVR-ów, a potrzebuję na szybko informacji w jaki sposób rośnie stos w tych mikrokontrolerach. Tzn. jeśli robię PUSH-a, to wartość SP jest zmniejszana czy też zwiększana?
Regards, /J.D.
Witam,
wogóle nie znam AVR-ów, a potrzebuję na szybko informacji w jaki sposób rośnie stos w tych mikrokontrolerach. Tzn. jeśli robię PUSH-a, to wartość SP jest zmniejszana czy też zwiększana?
Regards, /J.D.
Jan Dubiec napisal(a):
"Note that the Stack is implemented as growing from higher memory locations to lower memory locations. This implies that a Stack PUSH command decreases the Stack Pointer."
Dzięki panowie.
/J.D.
PUSH - Push Register on Stack Description: This instruction stores the contents of register Rr on the STACK. The stack pointer is post-decremented by 1 after the PUSH.
Opis instrukcji znajdziesz w pdfie zatytulowanym AVR Instruction Set.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required