Yahoo Groups archive

AVR-Chat

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

Thread

more problems with stack

more problems with stack

2007-01-03 by Thomas Keller

OK.  i updated to the latest service pack on AVR Studio, which changed 
the problems I am having with the stack.

   Now, when I  am simulating it, and I trace the PC and the SP, I get 
some strange results.   The stack pointer is tasking on some strnage 
values, such as 0xdd, when the first rcall is executed.   But stranger 
still  is when I hit the RET instruction in the subroutine.  Despite the 
value of 0xdd in the stack pointer register, the code returns to address 
0x0000.    WHY is it doing this?

tom

Re: [AVR-Chat] more problems with stack

2007-01-03 by John Samperi

At 02:32 PM 3/01/2007, you wrote:
>some strnage
>values, such as 0xdd, when the first rcall is executed.

Again perfectly normal, 0xdf (ramend) -2 bytes of the return address
takes you to 0xdd

 >the code returns to address
>0x0000.

Works perfectly here, just checked it again. Try reassembling
again (build and run)

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

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.