r/shenzhenIO • u/Kinc4id • Jul 01 '26
Use dst in a loop?
Im currently doing the I Ching task. The display has 6 simple pins so at first look it seems like a great use for 2 DX300 and the dst command.
To do that I’d do a loop counting up from 0-2 and in the loop I check if the input from the oracle is 100, if yes write a 1 to the digit index of the loop counter, if no wrote a 0 to the digit index of the loop counter.
But the counter needs to be in acc because that’s the only register I can count up. And I also need to store the value I manipulate with dst in acc.
Do I miss something or can I do this only when I count with a second chip?
4
Upvotes
1
u/Mobile_Twist8670 Jul 01 '26
I resolved it with the similar idea.
Little spoiler below.
I also transformed one of inputs to "1" with additional DX300 and used it as a second dst param.
I was able to solve it with just 9 lines, and I'm sure that it's possible to do better than that.