Shop OBEX P1 Docs P2 Docs Learn Events
Run 1, Run 2 Multi Slots---Got a problem — Parallax Forums

Run 1, Run 2 Multi Slots---Got a problem

GuidoGuido Posts: 195
edited 2005-03-19 17:01 in BASIC Stamp
I have been trying to get my bs2sx to work on different slots.
I know I must be doing something wrong, but just can't seem to figure this out.
Attached is a sample programs right out of the book, will not work!!!
I download Run1.bs2 then I download Run2.bs2 and I only get the last download to work, or basically Run2, it never goes to slot 1. Any help would be appreciated
Thank You
Guido

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-19 14:07
    The reason your second program isn't running is that you haven't linked it into the first so that the compiler will download it. In RUN1.BS2, change your $STAMP declaration line to:

    ' {$STAMP BS2sx, RUN2.BS2}

    This will tell the compiler to tokenize RUN2 and download it into slot 1.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-03-19 14:34
    Guido -

    If you want to load BOTH of them into the Stamp at the same time, you must use this extended form of the $STAMP directive:
    ' {$STAMP BS2sx, RUN1.BS2, RUN2.BS2} ' for two programs

    This same directive can be used to load up all 8 slots, using the same conventions:
    ' {$STAMP BS2sx, RUN2.BS2, RUN3.BS2, RUN4.BS2, RUN5.BS2, RUN6.BS2, RUN7.BS2 etc}

    Regards,

    Bruce Bates
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2005-03-19 16:13
    You don't need to specify the slot 0 program, just slots 1 and higher (slot 0 is the "master" program). Assuming your master is called SLOT0.BSX, here's what a full-blown defintiion might look like:

    ' {$STAMP BS2sx, SLOT1.BSX, SLOT2.BSX, SLOT3.BSX, SLOT4.BSX, SLOT5.BSX, SLOT6.BSX, SLOT7.BSX}

    After your SLOT0.BSX program is saved with this definition, it will automatically load all the other slot files into the editor the next time it's opened.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    Dallas, TX· USA
  • GuidoGuido Posts: 195
    edited 2005-03-19 17:01
    Thank you both! When reading I completely missed that part. Actually Jon, You and Bruce answered my second question,,,,,,!
    Thank You both very much
    Guido
Sign In or Register to comment.