Propeller Memory-Organization Question.
JonTitus
Posts: 193
I'm helping students understand the Propeller I software and will soon explain how pointers work. Unfortunately I cannot find a diagram that shows how the Propeller saves bytes in memory (little-endian) and assigns them addresses or pointers. So far I assume bytes in an array get stored as shown in the diagram I have included below. But, does the Propeller assign addresses as shown, or does it use the physical address for a 32-bit memory location and then use an "offset" to indicate the array element to extract from the 32-bit location. I want to ensure students get the correct information. Thanks for helping. --Jon
Comments
Note that when Spin compiles variable addresses into constants (as in a DAT section), it stores the offset of the variable from the start of the variables in the object, not the absolute address of the variable. The "@@" operator is used to correct this at run-time. Look at the description of the "@@" operator in the Propeller Manual.
I had a lot of difficulty with just reading texts and accepting what the Propeller is supposed to do. I found it quite delightful that I can now interactively PEEK and POKE to just about any memory locations. Non-destructive hacking is a valid educational tool.
Cog Dumps, Hub RAM Dumps and EEprom Dumps are all useful as well
I am using pfth version 1.00 now, but PropForth V5.5 and Tachyon 2.x are equally worthy of considering. I am sure that students will gain more confidence if they can actually confirm where things go, what is present, and when bytes, words, and longs are most useful.
Things like: pByte:=@ByteArray
and then: Byte5:=byte[pByte+5] or Byte5:=byte[pbyte][5]