Spin memory layout
David Betz
Posts: 14,516
in Propeller 1
I'm working on a byte code interpreter written in PASM but with some Spin code used to interface to things like serial ports, SD cards, LCDs, and keyboards. I'm trying to figure out a good layout for my code and was wondering how a Spin program is laid out in memory. I'm assuming that the main code is loaded into hub memory starting at $0000 but where does the stack start and in what direction does it grow? I'm particular, I'm wondering if I can assume that high memory above the Spin/PASM code and above the Spin stack is available for my use.
Comments
Except that the main Spin cog has no set stack size and could use all of the remaining memory, if it wanted too...
-Phil
This should be
The single @ character will get you the address of a variable. The double @ is used to convert an object offset to an absolute address. It adds the address of the beginning of the object to the value after the double @.
I don't think the "file" directive imposes any particular alignment on the file contents, so if you need it long aligned put an empty "long" in front of it.