Shop OBEX P1 Docs P2 Docs Learn Events
BS2 / BSX-Question — Parallax Forums

BS2 / BSX-Question

ArchiverArchiver Posts: 46,084
edited 2001-07-31 19:27 in General Discussion
Hi Folks,

got a question: wrote a programm for BS2, works fine but I need more
programming space because I have to store a lot of Text to be displayed on a
LCD-screen. Therefore I changed the programm for the SX (changed baud-rates
and all and it works. BUT: when I look at the program-map it shows me the
space is as full as with the BS2.

1) is it really as full or is the map wrong?

2) isn't the BSX supposed to have eight times as much space?

3) Is it dangerous to try and stuff the programming-space till it spills?

4) By the way, is there another intelligent way of storinmg my sentences
instead of making a whole serout-command for each? can a sentence be a
constant?

Thanx a lot for help,

Uli


[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-07-30 16:00
    I believe the SX has 8 program slots the size of the BS2 -- you technically
    have 8x the space, but its not all one chunk. You can write your code to hop
    from one slot to another, but you can't pass too many variables from slot to
    slot.

    Original Message

    > got a question: wrote a programm for BS2, works fine but I need more
    > programming space because I have to store a lot of Text to be displayed on
    a
    > LCD-screen. Therefore I changed the programm for the SX (changed
    baud-rates
    > and all and it works. BUT: when I look at the program-map it shows me the
    > space is as full as with the BS2.
    >
    > 1) is it really as full or is the map wrong?
    >
    > 2) isn't the BSX supposed to have eight times as much space?
    >
    > 3) Is it dangerous to try and stuff the programming-space till it spills?
    >
    > 4) By the way, is there another intelligent way of storinmg my sentences
    > instead of making a whole serout-command for each? can a sentence be a
    > constant?
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-30 16:50
    >Hi Folks,
    >
    >got a question: wrote a programm for BS2, works fine but I need more
    >programming space because I have to store a lot of Text to be displayed on a
    >LCD-screen. Therefore I changed the programm for the SX (changed baud-rates
    >and all and it works. BUT: when I look at the program-map it shows me the
    >space is as full as with the BS2.
    >
    >1) is it really as full or is the map wrong?

    Each of the 8 banks has its own map. You should read the manual,
    BASIC Stamp Manual 2v0 , available online in the downloads section at
    http://www.parallaxinc.com.


    >
    >2) isn't the BSX supposed to have eight times as much space?
    >
    >3) Is it dangerous to try and stuff the programming-space till it spills?

    No, it will warn you. You can safely have a program that uses every
    single byte of program space.

    >
    >4) By the way, is there another intelligent way of storinmg my sentences
    >instead of making a whole serout-command for each? can a sentence be a
    >constant?

    The whole serout command is very inefficient at storing your data.
    Store it as DATA, each string terminated with a null. Also a little
    routine to read it out. (Each char in the whole serout command uses
    14 bits of memory, while each char in DATA uses 8).

    hi DATA "Hello there",0
    bye DATA "goodbye now",0

    printstring: ' enter with string number to print 1,2,...
    lookup id,[noparse][[/noparse]hi,bye,...],adrs
    printloop:
    read adrs,char
    if char=0 then exitprintloop
    serout ... [noparse][[/noparse]char]
    adrs=adrs+1
    goto printloop
    exitprintloop:
    return




    >
    >Thanx a lot for help,
    >
    >Uli


    I hope that helps,

    -- Tracy
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-30 20:36
    Hi Uli,

    There was a fantastic exchange of messages starting around 8th May this year
    that discussed (in some detail) hosting a program across multiple memory
    slots. The subject started out as "[noparse][[/noparse]basicstamps] Multiple programs on the
    BS2E" and turned into "[noparse][[/noparse]basicstamps] RE: program calling with BS2" (I think
    !)

    Have a look back over these messages and see if that helps you.

    Regards,
    Justin.


    Original Message
    From: ulibasic [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=M9pK2KscbueRnUvALWm1nmmh--kmL-TwKSoPMJdF_QhX8RLs-gspnT7RHirn16NEUG-YZKxDSRvwkI_8tthArP1S1FyaJ_S5]ulibasic@r...[/url
    Sent: 30 July 2001 19:26
    To: basicstamps@yahoogroups.com
    Subject: AW: [noparse][[/noparse]basicstamps] BS2 / BSX-Question



    Hi all,

    Tracy, thanx very much, using DATA has got me out of trouble but still I
    would like to know about slots, couldnot find it in the Manual...could
    anyone tell me on which pages I find it?

    Thanx, Uli


    Urspr
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-30 21:14
    Look in the Stamp manual at the RUN command.

    Original Message

    I believe the SX has 8 program slots the size of the BS2 -- you technically
    have 8x the space, but its not all one chunk. You can write your code to hop
    from one slot to another, but you can't pass too many variables from slot to
    slot.

    Thanks, Rodent,
    but does anyone know how I adress these slots or where I can find a
    description?
  • ArchiverArchiver Posts: 46,084
    edited 2001-07-31 19:27
    Hi Uli,

    I think you'll find lots of informations about the BS2SX on Al Williams's
    FAQ at http://www.al-williams.com/wd5gnr/stampfaq.htm
    Have a look at http://www.emesystems.com/ too. That's where I learned many
    tricks about the SX memory banks, cross-bank calls, global and local
    variables...

    Of course, the manual is also a good think to start with. I think there was
    an addendum about the SX, but this should be included into the last version
    of the manual. If you're using version 1.9, you need this addendum (i can
    send it to you); or you should download the version 2.0 from Parallax.

    When you look at the memory usage, you see only the space of one bank (2K).
    So it looks the same as as BS2. But there is a drop down list, where you may
    choose the bank you want to see. That's the point.

    Hope this helps...

    Best regards,

    Phil.

    Original Message
    From: "ulibasic" <ulibasic@r...>
    To: <basicstamps@yahoogroups.com>
    Sent: Monday, July 30, 2001 8:26 PM
    Subject: AW: [noparse][[/noparse]basicstamps] BS2 / BSX-Question


    >
    > Hi all,
    >
    > Tracy, thanx very much, using DATA has got me out of trouble but still I
    > would like to know about slots, couldnot find it in the Manual...could
    > anyone tell me on which pages I find it?
    >
    > Thanx, Uli
Sign In or Register to comment.