Shop OBEX P1 Docs P2 Docs Learn Events
Need more Ram — Parallax Forums

Need more Ram

Jim C.Jim C. Posts: 8
edited 2011-02-14 07:26 in BASIC Stamp
I am building a project and running out of room to store my variables. Can I add some Ram ? I need 3-4 more words.
I am using a BS-2 stamp

Thanks

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-14 07:15
    There's no way to add more RAM. There are a variety of techniques to make more efficient use of what exists. These include using smaller storage units and defining multiple names for the same storage space when one variable is used in only one area of the program and can be reused under a different name in another area of the program. You can define variables as bits, nibbles (4-bits), bytes (8-bits), and words (16-bits). You can even have a word variable used as such in one part of the program, then that's redefined as a byte variable, a nibble variable, and 4 bit variables elsewhere in the program. Look at the section of the Basic Stamp Syntax and Reference Manual that discusses "aliases".
  • Jim C.Jim C. Posts: 8
    edited 2011-02-14 07:26
    Mike Green wrote: »
    There's no way to add more RAM. There are a variety of techniques to make more efficient use of what exists. These include using smaller storage units and defining multiple names for the same storage space when one variable is used in only one area of the program and can be reused under a different name in another area of the program. You can define variables as bits, nibbles (4-bits), bytes (8-bits), and words (16-bits). You can even have a word variable used as such in one part of the program, then that's redefined as a byte variable, a nibble variable, and 4 bit variables elsewhere in the program. Look at the section of the Basic Stamp Syntax and Reference Manual that discusses "aliases".

    Thanks Mike will do. I only need to reduce it a little so maybe "aliases" will work.
Sign In or Register to comment.