Hello, try with this code:
b0 var byte

Main:

... some code
b0=123
gosub test
...some code
goto Main

test:
if b0=123 then
...code
endif
return