BS1 Memory organization for dummies.
yuright
Posts: 13
I am new to Basic Stamp and programming. I have been working with the BS2 for a few weeks with great success I decided to get a BS1 and try programming it as well. In reading the BS1 manual I have found I have ZERO understanding of the most basic aspects of memory organization and manipulation. I have searched around for a simple tutorial but haven't found one so far. If anyone knows where I could find this kind of information please post it. thanks
Comments
The BS1 is programmed in PBasic 1 instead of 2 or 2.5, so there are numerous differences to be aware of. But it's a solid performer if you can use all 256 bytes of memory!
Yes, the programmer can re-use the variables under different names. This is useful when combining existing pieces of code that use different names, but sometimes can get you into trouble. The different pieces of code can't leave values in the variables or assume that they'll be untouched later. Anyway, it's a useful tool.
On the BS2, people generally let the compiler allocate the variables or they explicitly allocate the variables themselves (by declaring a variable to be the same as, say, B1). You are likely to get into trouble if you mix the two schemes.