Shop OBEX P1 Docs P2 Docs Learn Events
RAM shortage — Parallax Forums

RAM shortage

ArchiverArchiver Posts: 46,084
edited 2002-04-24 18:58 in General Discussion
This is probably a common problem, but I am new to Stamps, and would
like to understand if there is a work around. I have developed three
programs to accomplish a task, but when combined, I am running out of
RAM. Can I access these programs separately and pass variables to
get around my RAM limitation? I understand that the Stamp I have,
BS2P40 has the capability of running separate programs, but I don't
know if this would allow me access to more RAM.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-04-24 18:58
    If you're combining programs you might want to look for a way to combine
    temporary variables. Most programs have them and there's no point in holding
    onto the data if it isn't necessary.

    Another thing to do is make sure you're using the proper type for the data
    your variable stores. For example, if a variable will never do anything but
    count to 10, there is no point in making it a Byte when Nibble (Nib) will
    hold the information. This frees up four valuable bits.

    Finally, you can save variables to the Scratchpad RAM area (with PUT) and the
    retrieve them later (with GET). This is often used as a communications
    mechanism when switching program banks, but it can also be used as a
    temporary storage space.

    -- Jon Williams
    -- Parallax


    In a message dated 4/24/02 12:39:37 PM Central Daylight Time, j71950@a...
    writes:


    > This is probably a common problem, but I am new to Stamps, and would
    > like to understand if there is a work around. I have developed three
    > programs to accomplish a task, but when combined, I am running out of
    > RAM. Can I access these programs separately and pass variables to
    > get around my RAM limitation? I understand that the Stamp I have,
    > BS2P40 has the capability of running separate programs, but I don't
    >




    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.