popquiz

Simple Click For Loop

4 posts in this topic

To populate the first eight DS registers, I might use a For loop.  In python it would look like:

DS = {}
index = range(1,9)
for i in index:
  DS = i
print(DS) 

{DS1:1, DS2:2, ... DS8:8}

To accomplish the same with a 'Click' For loop, I need to be able to use indirect addressing in the result field of the Math instruction.  For ex: If I could replace DS1 with DS[DS9] below, then the python loop and the Click loop would be functionaly equivalent.  Without this capability, I don't see a concise way of going about this.  Any ideas?

Capture.PNG.a25d88ca5ebabb17aab528d66378

 

Edited by popquiz

Share this post


Link to post
Share on other sites

It seems the only indirect/pointer function is in the Single Copy command.

Share this post


Link to post
Share on other sites

This logic looks like it would accomplish what you are looking to do.

Regards,
Garry

 

Click indirect test.png

1 person likes this

Share this post


Link to post
Share on other sites

Thank you for the replies and the elegant code.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now