memory organization
Mazzini
Posts: 58
Hi ,
I searched on forum about my doubts but there so many thread I'm lost..
Because the first locations are reserved for bootloader and SPIN interpreter inizialization , my application start at 0x010
Why Does the programs start with ORG 0 ?
Because the latest locations are reserved for variable and stack space ,
Which is the last add for user's program or how many locations are reserved for stack and variable ?
Thank
I searched on forum about my doubts but there so many thread I'm lost..
Because the first locations are reserved for bootloader and SPIN interpreter inizialization , my application start at 0x010
Why Does the programs start with ORG 0 ?
Because the latest locations are reserved for variable and stack space ,
Which is the last add for user's program or how many locations are reserved for stack and variable ?
Thank
Comments
PASM programs always start running from location 0 in the cog. This is why they use an ORG 0 at the beginning. This is independent of actual location of the PASM image in hub RAM, which can be located anywhere in hub RAM.
The VAR section is located after the end of the program space. The stack is located after the VAR section.
The VAR section contains space for every instance of an object. The number of instaces is determined by the number of times an object is referenced by another object. The top object has only one instance. The stack space for the top object can extend all the way to the end of hub RAM.