#859 pic16 stack pragma not right / needs better description


I'm looking at an email dated Nov 14, 2004 & it says:

>I"ve updated the sdccman.lyx file. Use the pragma
directive like this:
> #pragma stack [stack_begin] [stack_size]

but when I look at the currently checked in (1.109)
sdccman.lyx file I see the following:
/* initializes stack at RAM address 0x5ff */
\layout LyX-Code

#pragma stack 0x5ff
\layout List
\labelwidthstring 00.00.0000

Which way is correct?


  • Weston T. Schmidt

    • summary: pic16 stack pragma not right --> pic16 stack pragma not right / needs better description
  • Weston T. Schmidt

    Logged In: YES

    Additonally it would be VERY helpful (I spent several weeks
    trying to figure this one out) to add that the beginning of
    the stack is the lower bound in memory.

    For better or worse, it has been my experience that since a
    stack typically grows downward in memory, the "beginning" of
    the stack is where the stack grows from:

    My stack grows from 0x5ff & is 64 bytes deep --> the stack
    will at most extend to 0x5c0. I will specify #pragma stack
    0x5ff 64.

    Problem with above -- the stack actually uses memory from
    0x5ff to 0x63e, and grows from 0x63e.

    A bit more discription in the documentation should be all it
    takes to make sure that people from either "school" of
    thought can figure it out.

  • Vangelis Rokas

    Vangelis Rokas - 2005-01-11

    Logged In: YES

    Documentation updated update for stack in SDCC #925.


  • Vangelis Rokas

    Vangelis Rokas - 2005-01-11
    • milestone: --> fixed
    • assigned_to: nobody --> vrokas
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks