Skip to main content


I wanted to work out how to construct a loop in uxn and this is what I came up with.

I do not know if this is the best way of doing it, but it works.

It takes a bit of adjusting the way you think working on a stack machine.
in reply to James Chip

for sure! #uxn also encourages you to consider whether to check the exit condition at the start of the loop (as you've done here) or at the end after the first iteration (replacing the final jump with a JCN).

it's definitely a different way of thing from what i was used to.
#uxn
in reply to ⛧ esoterik ⛧

there's many ways to build loop-like things, I think, the next step would be to pass the width and height of the rect through the stack, that will reveal a lot of interesting things about stack machines.

Lo, thar be cookies on this site to keep track of your login. By clicking 'okay', you are CONSENTING to this.