Shop OBEX P1 Docs P2 Docs Learn Events
Eprom Map — Parallax Forums

Eprom Map

LKHLKH Posts: 2
edited 2008-02-29 16:25 in BASIC Stamp
I just wrote a program for a stamp2 that i have used approximately 70% of available memory.· I still have quite a bit of code to go and will need a 2e.· This will increase my memory to approx 4000 lines from 500 lines.· I started a new project indicating it was for the 2e, copied the code over.· I then looked at the memory map and it still shows approx 70% used.... what am i doing wrong?· Shouldn't the memory map be showing less than 25% now?

Comments

  • Tracy AllenTracy Allen Posts: 6,666
    edited 2007-12-20 23:44
    You have to understand that the additional memory is not one continuous block. It is partitioned into 8 separate slots, and each one is 2k bytes or around 500 lines of instruction code. The RUN instruction allows you to move the execution from one slot to another. It is like having 8 separate BS2 in one chip, except that they do share the RAM variables. There are tricks to making effective use of that extra program space.

    Look at the lower right corner of the memory map window, and you will see a dropdown box labeled "source code". When you have more than one slot defined, the options there will allow you to look at the contents each additional slot. To activate another slot, choose to create a new program from the file menu and call it "myprog1.bse". Then in the first line of the original program modify the $STAMP directive as follows:
    ' {$STAMP BS2e, myprog1.bse}
    


    Then press ^M and look at the dropdown box again, and you will be able to select myprog1 and at first you can see that the new slot is empty. You can also see that the tab for that new program slot is now associated with the old program. When you go to close it, it will ask you if you want to close the whole project. And when you open the original program, it will open all the associated slot programs.

    Since you are planning to upgrade, you might want to go for the BS2p or the BS2pe, instead of the BS2e. Those have some additional very useful instructions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com

    Post Edited (Tracy Allen) : 12/20/2007 11:53:39 PM GMT
  • LKHLKH Posts: 2
    edited 2007-12-21 00:27
    appreciate the reply... that makes sense. I need to read up on a few things... this brings up a lot of questions. Will do some homework before i start asking more questions. Thanks again for the suggestion on looking at the BS2p and BS2pe
  • akalatiakalati Posts: 31
    edited 2008-02-29 16:25
    Tracy,

    I'm in the same boat. What getting ready to jump into BS2e. What are the few obvious/killer reasons to splurge for a BS2p or 2pe instead of BS2? Also, will all BS2** lines run the same Pbasic code?

    Thanks.
Sign In or Register to comment.