According to the manual...
"To run the second program (after downloading with a #slot 1 directive) use the
command ‘run 1’. This command stops the current program and starts the second
program running immediately. Variables and pin conditions are not reset, so can
be shared between the programs."
Using a 40x2, and incrementing the timer variable, jumping to slot 1 resets this. Does this mean that the above statement only applies to general variables, and that system variables are reset, or is there an fault?
I can work around this in my program, but was curious
test code
"To run the second program (after downloading with a #slot 1 directive) use the
command ‘run 1’. This command stops the current program and starts the second
program running immediately. Variables and pin conditions are not reset, so can
be shared between the programs."
Using a 40x2, and incrementing the timer variable, jumping to slot 1 resets this. Does this mean that the above statement only applies to general variables, and that system variables are reset, or is there an fault?
I can work around this in my program, but was curious
test code
Code:
#picaxe 40x2
#slot 0
sertxd ("timer = ",#timer,lf)
pause 500
do
inc timer
sertxd ("timer = ",#timer,lf)
pause 500
if timer=>10 then
run 1
end if
loop
Code:
#picaxe 40x2
#slot 1
sertxd ("timer = ",#timer,lf) 'this should still be '10'
pause 1000
timer=0 'this should be needed to reset the timer, but isnt
run 0