1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

stack pointer at the start of the task's stack array

Discussion in 'Embedded' started by 2005, Nov 7, 2006.

  1. 2005

    2005 Guest

    What value should it be so that the stack pointer at the start of the
    task's stack array?

    StackA[?] = (int) taskX ;
     
    2005, Nov 7, 2006
    #1
    1. Advertisements

  2. No clue what you're asking...
     
    Grant Edwards, Nov 7, 2006
    #2
    1. Advertisements

  3. Brilliant! Now my coffee's all over the place/screen....

    Meindert
     
    Meindert Sprang, Nov 7, 2006
    #3
  4. 2005

    2005 Guest

    "Data is pushed onto the stack, the stack pointer is decremented, so
    set the stack pointer at the start of the task's stack array - it must
    be near the end to get full use of the stack."

    So what should be value of the "?"
     
    2005, Nov 7, 2006
    #4
  5. That's certainly one possibility.

    Robert
     
    Robert Adsett, Nov 7, 2006
    #5
  6. No clue. What are "StackA" and "taskX"?
     
    Grant Edwards, Nov 7, 2006
    #6
  7. 2005

    FreeRTOS.org Guest


    Weird, I Googled this and the only link that came up was to my own site!

    http://www.google.co.uk/search?sour...+the+stack,+the+stack+pointer+is+decremented"

    Regards,
    Richard.

    + http://www.FreeRTOS.org
    + http://www.SafeRTOS.com
    for Cortex-M3, ARM7, ARM9, HCS12, H8S, MSP430
    Microblaze, Coldfire, AVR, x86, 8051, PIC24 & dsPIC

    "
     
    FreeRTOS.org, Nov 7, 2006
    #7
  8. 2005

    karel Guest

    dear 2005,
    do not ever worry
    the stars are shining brightly over you
    no need to help them there

    evidently, some bad spirit inspired you to believe
    that you need to initialise the stack pointer
    from inside hogh level language
    this is pof course an abomination
    of the idea of high level langiuage

    in high level language like cobol or fortran
    the comiler will set stack pointer for ou
    never need to worry
    keep smiling

    if ever you gt mancrafty aboout programmiation
    then you will write assemble and then yes indeed
    init stack pointer manuaiilly
    something like
    LDX #STACKTOP
    TXS
    but his of coorse dependint off cpu arxchitecture

    may the sun be bright upon sour sooul!
    KA
     
    karel, Nov 7, 2006
    #8
  9. 2005

    Bill Davy Guest

    Which 9*5 base 13 in an unlucky universe.
     
    Bill Davy, Nov 8, 2006
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.