I'm new to the AVR, but it does seem to be a bit odd. I was trying to keep ZH:ZL in sync with PCH:PCL and this is what seems to work. fireweaver On 11/24/2011 11:02 AM, Don Kinzer wrote: > --- 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 > > >
Message
Re: [AVR-Chat] Re: Some questions about the stack in an AVR ATmega168A
2011-11-25 by fireweaver