Jump to a spesific place in a program slot

orjanjan

New Member
Hi

Is it possible to jump to a specific place in a program slot. Say like.

run 2 (but i like it to jump directly to a specific routine in that program on slot 2)



Thanks
 

nick12ab

Senior Member
The run command itself cannot do it. However you can use a variable and if or branch commands to do something different depending on what the value of a variable is.

Example:

Code:
#slot 0
#no_table
symbol thingy = b4

let thingy = pinB.1
run 1
Code:
#slot 1
#no_table
symbol thingy = b4

branch thingy,(thing1,thing2)

thing1:
        high B.0
        high B.2
        run 0

thing2:
        low B.0
        low B.2
        run 0
 

JimPerry

Senior Member
Set a variable (say b10=1) then check the variable in new slot at beginning if b10=1 then goto subroutineb10 etc :confused:

EDIT Better explained by Nic12ab !
 

orjanjan

New Member
Thanks for your help. I liked the branch command.
The problem is that my navigation menu uses almost all the slot0 memory, so i have to jump to other slots, but not always the same place.
 

nick12ab

Senior Member
The problem is that my navigation menu uses almost all the slot0 memory, so i have to jump to other slots, but not always the same place.
So is this still a problem? Stating the problem now suggests that it is.

It's likely that the reason for that is poor and inefficient code. Post it and see if the forum can make it more efficient for you.
 
Top