Hello, forum,
Is it possible for me, in default ROBOGUIDE, to increment a PR position? I mean like if I have an for loop with a register incrementing to use something like PR[X+R[Y]]?
If I'm not clear enough I'm meaning if I use something like PR[10+R[counter]] the 'output' will be something like this : Pr[10] (because of 10 + 0 ), the next iteration PR[11] ( 10 + 1 ) and so on.
PR[X+R[Y]] to increment PR
-
cristi_sb23 -
March 7, 2025 at 7:42 PM -
Thread is Unresolved
-
-
SkyeFire
March 7, 2025 at 7:43 PM Approved the thread. -
set a Register equal to the PR number, then do an indirect reference to the PR. R[2] would be the counter register and R[1] is the reference register. PR[[2] is set to the value of the PR with the indirect reference.
R[1] = 10 + R[2]
PR[2] = PR[R[1]]
-
Yes that is possible with indirect addressing: