I'd just like to know if I can set a SR in a TP program, something like:
SR[1] = 'ABC' ;
If that's impossible, I'd like to describe what I'd like to use this for to see if there are any simpler methods for accomplishing it.
I'm writing a system that generates TP code, translating it from some other easier to work with language into .LS files. One feature that I need is to be able to start concurrently running processes that run in a loop. I'm going to do this by writing a TP program called `START_LOOP` that looks like this:
! START_LOOP - start running a program in a loop
LBL[1]
CALL <program name>
WAIT <sleep time>
JMP LBL[1]
I will then run this START_LOOP function as follows:
RUN START_LOOP
Ideally, I would like to pass the <program name> in as an argument to START_LOOP, like this:
RUN START_LOOP 'MY_PROGRAM'
but you can't pass strings in as arguments. Instead, I was thinking of doing something like this:
And then START_LOOP could use the argument as the index of a string register:
CALL SR[AR[1]]
But apparently you can't do this either, because you can't set string registers programmatically?