Stos w AVR

Nov 29, 2003 3 Replies

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."

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.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required