Shop OBEX P1 Docs P2 Docs Learn Events
Multiple programs on the BS2E — Parallax Forums

Multiple programs on the BS2E

ArchiverArchiver Posts: 46,084
edited 2001-05-08 20:58 in General Discussion
>Can someone shed some light on this for me. I have a bs2e running
>about 5 programs in different slots. Is there a way to be in say
>slot2 or program two, which ever is correct, and with a line of code
>tell it to go to say program4 but start at a certain line of code,
>like in the middle of the program, and not the first line?

Bank 4 has to be prepared with a BRANCH command that uses a variable
as a pointer to the target routines:

' in bank 4
BRANCH BSxto,[noparse][[/noparse]routine0,routine1]

routine0:
' stuff

routine1:
' stuff

The program in slot 2 has to that variable before it switches banks:

' in bank 2
BSxto = 1 ' will cause branch to routine1 in bank 4
RUN 4

The variable BSxto has to be in the same position in both banks 2 and
bank 4. More info on one approach to all this at:
http://www.emesystems.com/BS2SX.htm


-- Tracy Allen

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2001-05-08 20:58
    Can someone shed some light on this for me. I have a bs2e running
    about 5 programs in different slots. Is there a way to be in say
    slot2 or program two, which ever is correct, and with a line of code
    tell it to go to say program4 but start at a certain line of code,
    like in the middle of the program, and not the first line?
Sign In or Register to comment.