Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Some questions about the stack in an AVR ATmega168A

2011-11-24 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, fireweaver <firewevr@...> wrote:
> On calls and interrupts, push low PC first, then high PC.
That is correct.  Note, too, that on devices with more than 128K of flash (e.g. mega2560 or xmega128A1) the third, most significant, byte of the PC is pushed last.

I've always thought that this order was odd for the AVR since the return address ends up in big-endian form in RAM.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.