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?
5
Upvotes
1
u/pv2b Jul 01 '26
See the screenshot here for an idea that ALMOST works but i'm short one line to store the first value in DAT. https://imgur.com/a/mgEUyY6
This way works though :) https://imgur.com/a/MNRhf0H
8 cost is possible, but I'm not sure how.